I Know this was asked before but the solution mentioned didn't work for me. I want to write to the log and save the output during a specific portion of my script.
The log capture() works when I have JMP11 open but when I run the jsl as a stand alone non interactive session I get no output.
I believe the problem is that there is no log file started initally when the JMP thread starts in the background, so I was wondering if you can open the log window with some jsl??
OR is there a more robust way to capture the log file.
FYI.. the reason I want the log file output is because i am constructing html tables from data tables so I wanted an automated
script rather than me having to open JMP and run my script.
Any suggestions greatly appreciate,
Are you referring to this Re: Can I view the log of an executable (\!) JSL? If not look check it out.
You can open the log and see if it's open with these commands:
Show( Is Log Open() );
But, I think you are missing something when you say: "The log capture() works when I have JMP11 open but when I run the jsl as a stand alone non interactive session I get no output." In order for JSL to run JMP has to open. JSL only runs through jmp.exe which running from a command prompt or anywhere will open JMP.
That is the post I am referring to thanks.
That code snippet you suggested will not work as seen below open log doesn't appear to be a valid command.
show(is log open());
When I open a JMP session and open my script and then run it, the capture log() works in fact I was originally using the save log() command when I ran the script manually, before I started looking at an automated solution.
You are correct when you say JMP has to open but it opens up as a process thread in the background and you cant actually see it, this is why I believe when it opens the log doesn't automatically open with that process.
Thank you for your reply.
I'm interested in how you're accomplishing this:
"You are correct when you say JMP has to open but it opens up as a process thread in the background"
What operating system are you using?
There are many ways to run an automated script that will actually open JMP, for example, through a .bat file. Will this not work either?
Not sure this will do it, but worth a try...in the windows-specific prefs, or submit (in a *previous* run either way, of course)
Preferences(Log Open Strategy( "Startup" ))
Alternatively, if you are building HTML in the log window, consider building it in a JSL string instead, then using saveTextFile to save the string.
What approach are you using to start JMP?