cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-271145%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EEjecutar%20archivo%20Jsl%20a%20trav%C3%A9s%20de%20un%20programa%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-271145%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHola%2C%3C%2FP%3E%0A%3CP%3ETengo%20un%20archivo%20.bat%20que%20ejecuta%20un%20script%20jsl.%20El%20script%20Jsl%20debe%20ejecutarse%20mediante%20%22my_app.py%22%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOT%3B%20Quiero%20llamar%20a%20este%20archivo%20bat%20en%20otro%20archivo%20jsl.%3C%2FP%3E%0A%3CP%3ESiguiendo%20las%20publicaciones%20a%20continuaci%C3%B3n%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FQuestion-about-using-bat-file-to-execute-JSL-script%2Fm-p%2F5604%23U5604%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3EPregunta%20sobre%20el%20uso%20del%20archivo%20.bat%20para%20ejecutar%20el%20script%20.JSL%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2FRunning-a-JSL-script-within-another-JSL-script%2Fm-p%2F41804%23U41804%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3EEjecutar%20un%20script%20JSL%20dentro%20de%20otro%20script%20JSL%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FDiscussions%2Fcall-exe-let-it-run-and-open-another-jsl-after-exe-closed%2Fm-p%2F193903%23U193903%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-forum-thread%20lia-fa-icon%20lia-fa-forum%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3Ellame%20a%20.exe%2C%20d%C3%A9jelo%20ejecutar%20y%20abra%20otro%20.jsl%20despu%C3%A9s%20de%20cerrar%20.exe%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIntent%C3%B3%3B%20Ejecute%20el%20programa%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ERun%20Program(%22c%3A%5Cpython-x64%5Cpython-x64.exe%22%20-E%20%22C%3A%5CUsers%5CAppData%5CRoaming%5CSAS%5CJMP%5CAddins%5Cmy_app.py%22%20%22C%3A%5Cjsl_script%5Cmy_script.jsl%22%20%2FOutputPath%3D%22C%3A%5Cjsl_script%5Cmy_script.txt%22%20%2FDescription%3D%22my_script%22%20%26gt%3B%20%22C%3A%5Cjsl_script%5Cmy_script.log%22%202%26gt%3B%26amp%3B1)%20%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EPero%20obtuve%20este%20error%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22joshua_0-1591492704350.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22joshua_0-1591492704350.png%22%20style%3D%22width%3A%20384px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22joshua_0-1591492704350.png%22%20style%3D%22width%3A%20384px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F24420i84CF5CCD97591D43%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22joshua_0-1591492704350.png%22%20alt%3D%22joshua_0-1591492704350.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%C2%BFC%C3%B3mo%20podemos%20ejecutar%20comandos%20cmd%20en%20jsl%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-271145%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3Esecuencias%20de%20comandos%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-271289%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Ejecutar%20archivo%20Jsl%20a%20trav%C3%A9s%20de%20un%20programa%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-271289%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F17409%22%20target%3D%22_blank%22%3E%40joshua%3C%2FA%3E%20%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEstoy%20un%20poco%20confundido%20por%20lo%20que%20est%C3%A1s%20tratando%20de%20hacer.%20Sin%20embargo%2C%20he%20adjuntado%20un%20script%20escrito%20para%20el%20libro%20JSL%20Companion%2C%20Applications%20of%20the%20JMP%20Scripting%20Language%2C%20Second%20Edition.%20Para%3CSTRONG%3E%20Ejecute%20el%20programa()%3C%2FSTRONG%3E%20sus%20opciones%20deben%20especificarse%20en%20una%20lista.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEspero%20que%20los%20ejemplos%20y%20comentarios%20provistos%20en%20el%20script%20adjunto%20lo%20ayuden.%20El%20mensaje%20de%20error%20tiene%20sentido%20dada%20la%20nota%20de%20sintaxis%20extra%C3%ADda%20del%20script.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%2F*%20Syntax%0Arp_obj%20%3D%20Run%20Program(%20Executable(%22path%2Ffilename.exe%22)%2C%20Options(%7B%22%2Fa%22%2C%20%22%2Fb%22%2C%20%22...%22%7D)%2C%0A%20%20%20%20%20%20%20%20%20%20%20Read%20Function(expression)%2C%20%0A%20%20%20%20%20%20%20%20%20%20%20Write%20Function(expression)%2C%0A%20%20%20%20%20%20%20%20%20%20%20Parameter(expression)%20%20%20%20%0A%20%20%20%20%20%20%20%20)%3B%20%0A%0ADescription%3A%20%20Runs%20an%20external%20program%20specified%20by%20the%20Executable%20argument%2C%20with%20the%20command%20line%0Aarguments%20specified%20by%20the%20Options%20argument.%0A%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
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.

Recommended Articles