[ string | OFF ]



The string operand specifies an alternate command name to be used, instead of the normal SUBMIT command for this file type, when SUBMIT is issued. This must be the name of another SPFLite primary command (like RUN) or of a valid user Macro name which is to replace the normal processing done by SUBMIT.

It is possible for string to have multiple operands separated by spaces. If specified this way, the string value must be enclosed in quotes.


Disables the SUBCMD feature


The SUBCMD command is used to specify an alternate command to be substituted in place of the normal SUBMIT command. This value is associated with the Profile settings for this file type.

For example, suppose you wanted to treat the SUBMIT of a Windows Batch file as a RUN command, even though .BAT files are supposed to be RUN and not submitted. In the profile for .BAT files, you can say SUBCMD RUN. Then, if SUBMIT is issued for a .BAT file (whether intentionally or not), the file will actually be RUN instead of being submitted. This feature will prevent erroneous SUBMIT streams from being created, which can be helpful if mainframe users get into the habit of frequently issuing SUBMIT.

Another use of SUBCMD is to launch a user-written “submit macro”. To allow such a macro to perform certain processing and then issue its own “submit” process, the command XSUBMIT may be used. XSUBMIT is similar to SUBMIT, except that an explicit file name is used, rather than taking the submitted file from the current edit session. A possible reason for a user-written “submit macro” might be expand user-defined “include” directives.

To disable the SUBCMD feature, the value, use SUBCMD OFF. When the SUBCMD feature is disabled, any SUBMIT command is processed normally without it being substituted by an alternative command. The SUBCMD feature is disabled by default.

When SUBCMD is issued without an operand, the current state of the SUBCMD feature (either the string or OFF) is displayed.

Useful macros for SUBCMD when disabling SUBMIT

For profiles in which you don't want SUBMIT to be issued at all, it is not sufficient to simply set SUBCMD to OFF. OFF allows a normal SUBMIT to proceed. Instead, you may wish to define one or both of the following macros, so that a SUBMIT command would either do nothing, or would issue an error message. The names you select may be anything, of course; the names are a good starting point:



' SUBERR.MACRO                                    

HALT ("SUBMIT not supported for this file type")  

Then, you would issue a command of SUBCMD NOP or SUBCMD SUBERR, as needed.

Disabling SUBMIT in this way is something you might wish to do if you issue the SUBMIT command very frequently, and have an (unfortunate) habit of doing so on file types that shouldn't be submitted in the first place. It is better to quickly receive an error message than wait several seconds for the SUBMIT handler to complete before telling you that you submitted the wrong file.

See SUBMIT - Pass Lines to an External Command File and Working with the SUBMIT Command for more information.

Created with the Personal Edition of HelpNDoc: What is a Help Authoring tool?