cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
joshua
Level III

Executing Jsl file through a program

Hi,

I have .bat file that executes a jsl script. Jsl script needs to be run by "my_app.py"

 

OTH; I want to call this bat file in another jsl file.

By following posts below;

 

Question about using .bat file to execute .JSL script 

Running a JSL script within another JSL script 

call .exe, let it run and open another .jsl after .exe closed 

 

Tried; Run program 

 

Run Program("c:\python-x64\python-x64.exe" -E "C:\Users\AppData\Roaming\SAS\JMP\Addins\my_app.py" "C:\jsl_script\my_script.jsl" /OutputPath="C:\jsl_script\my_script.txt" /Description="my_script" > "C:\jsl_script\my_script.log" 2>&1) 

But got this error;

 

joshua_0-1591492704350.png

 

How can we execute cmd commands in jsl ?

1 REPLY 1
gzmorgan0
Super User (Alumni)

Re: Executing Jsl file through a program

@joshua,

 

i am a bit confused by what you are trying to do. However, I have attached a script written for the book JSL Companion, Applications of the JMP Scripting Language, Second Edition. For Run Program() your options need sto be specified in a list.

 

I hope the examples and comments provided in the attached script will help you. The error message makes sense given the syntax note excerpted from the script.  

 

/* Syntax
rp_obj = Run Program( Executable("path/filename.exe"), Options({"/a", "/b", "..."}),
           Read Function(expression), 
           Write Function(expression),
           Parameter(expression)   	
        ); 

Description:  Runs an external program specified by the Executable argument, with the command line
arguments specified by the Options argument.