Syntax


RUN

[ .extension ] [ cmd-line-operands ]


Operands


.extension

Optional operand to override or provide a missing file type extension


cmd-line-operands

Optional operands to be passed on the command line




Description


To properly operate, the file type of the current edit file, must be registered in the system so that Windows can invoke the correct application processor. e.g. a .BAT extension will invoke the system Cmd processor, a .REXX extension would invoke the REXX interpreter.


If the extension of the file in the Edit session is incorrect or missing (as in a CLIP session), then the 1st operand of RUN can be your desired extension which will properly run the file.  This operand will be removed and will NOT be passed to the command with any other specified cmd-line-operands.


For a CLIP session, which has no extension, a default for this first operand of .BAT will be used.


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. 


For this reason, RUN will normally only operate on edit sessions where the file is has a single "known name". It will not function in 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 clean up 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: Free help authoring environment