cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Executing Jsl file through a program

joshua
Level III

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.