RUN - Execute the current Script

Syntax


RUN

[ script-operands ]


Operands


script-operands

Optional operands to be passed to the script




Description


The RUN command will save the current edit session to the \RUN sub-folder in the SPFLite data directory.  It will then issue the command to start the named script, including any optional operands specified on the RUN command itself.   To properly operate, the file type of the current edit file, must be registered in the system and associated with its appropriate script processor.


For this reason, RUN will only operate on edit sessions where the file is has a single "known name".  It will not function in Clip, Set-Edit, MEdit or Cloned sessions which have no single associated file name.


A given script is executed as usual, being handled by the command handler associated with files of the given type: BAT files are processed directly by CMD.EXE,   Rexx scripts are executed by REXX.EXE (for instance)  etc. just as they would if launched from a Windows command prompt.


Note: For specialized scripts, such as REXX or Perl, you may have to configure Windows so it knows what command processor or script interpreter to use when running your particular script.  At a Windows command prompt, issue the commands HELP FTYPE and HELP ASSOC for more information.  You may also need or wish to modify the contents of the PATHEXT system environment variable.


The RUN command saves a temporary copy of the script for execution purposes, but does not save the file in the edit session.  So, you can RUN scripts containing unsaved changes without having to save them first.  The concept is the same as how SUBMIT can be used to submit jobs that may contain unsaved data changes.


File Cleanup


Because the files are temporarily saved in the SPFLite\RUN folder,  SPFLite will automatically purge this folder of files greater than one day old, to prevent a buildup of these temporary files.  This way, you are not required to maintain these folders yourself.



Command Window Closing


You may control whether the command window opened by the RUN command remains open at the completion of the command.   There is an option under Options => Submit which allows you to specify your choice.  In the RUN parameters box on the Submit tab enter /C to close the window on completion, or /K to keep the window open.



Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily