Use FileExecute to execute a procedure stored in a directory.
FileExecute may also be entered as FileEx[ecute], ExecuteFile, ExecFile, ExFile, or Ex[ecute].
FileExecute is supported for BIM and workstation files only. It is not supported for PDS or VSE files.
Optional Operands
FILE is the BIM or workstation file name of the procedure to be executed.
For BIM files, the file to be executed must be of type PROC.
For workstation files, the file to be executed must have an extension of CMD or PRC. A file with an extension of .CMD is considered a workstation batch file or REXX Procedure. A file with an extension of .PRC is considered a BIM-EDIT/XP procedure.
Default: last referenced file.
For REXX Procedures, additional parameters entered are available through the REXX ARG and PARSE commands.
For host BIM-EDIT procedures, additional parameters are placed in the PARMLIST variable. These parameters are retrievable from within the procedure via the BIM-EDIT PARSE command.
FileExecute is often invoked through the FileProcess command, which in turn is often invoked from ContextProcess command.
BIM-EDIT/XP can be customized to cause a specific procedure to be invoked. See Command Definition Table.
Procedures can be extremely useful where repetitive tasks are performed. Procedures can themselves execute procedures.
FileExecute does not set last referenced file (but the procedure executed may).
When Valid
For host files, the user must have EXEC access level for the FILE directory.
Return Codes
OK Successful.
NF Procedure not found.
SC Inadequate access level.
-- Other codes as determined by commands within the procedure itself.
Examples
Execute the host BIM-EDIT procedure TEMP:
=> ex temp
Execute the REXX Procedure SMAP.CMD, passing two parameters to the procedure:
=> ex smap.cmd rmgl030,yes