cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
lenny
Level II

Capturing the log file during a non interactive JMP script session

Hi there,

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,

Thank you.

6 REPLIES 6
msharp
Super User (Alumni)

Re: Capturing the log file during a non interactive JMP script session

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:

Open Log();

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.

lenny
Level II

Re: Capturing the log file during a non interactive JMP script session

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.

open log();

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.

txnelson
Super User

Re: Capturing the log file during a non interactive JMP script session

Try setting the BatchInteractive() function.  This may solve your issue.

BatchInteractive(0); or BatchInteractive(1);

Jim
msharp
Super User (Alumni)

Re: Capturing the log file during a non interactive JMP script session

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?

Craige_Hales
Super User

Re: Capturing the log file during a non interactive JMP script session

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? 

Craige

Craige

Re: Capturing the log file during a non interactive JMP script session

Craige,

I like your suggestion about using a JSL string and saveTextFile. I might update Export Data Table to HTML​ to do this.

Update: Export Data Table to HTML​ is now updated to work this way.