Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The COZZI - Send CMD Message (SNDCMDMSG) command Sends a CL command to the Joblog as a Request MSGTYPE(*RQS) message. This allows the command to be retrieve using the F9 function key. The command may be logged and run or simply logged.
Then the TOPGMQ parameter is *PRV or *SAME, the command is simply logged to the joblog for the job. But the end-user may use the Retrieve Command function key (F9) to retreive the command as if it were previously entered. Sending to *PRV or *SAME logs the CL command to the joblog. If TOPGMQ(*EXT) is specified, the command may be left active (not received) in which case upon returning to Command Entry from the CL program that issued the SNDCMDMSG command, the CL command specified on the CMD parameter WILL BE RUN. If several SNDCMDMSG commands are issued in the CL program, they will be run, agin upon returning to the callers Command Entry, as if entered on Command Entry, one after the other.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
CMD | CL Command | Command string | Optional, Positional 1 |
TOPGMQ | To program queue (TOPGMQ) | *SAME, *PRV | Optional, Positional 2 |
OPTION | Run and Log or Log only | *RUN, *LOG | Optional, Positional 3 |
Top |
Specifies a CL command to write to the joblog as a Request message. The command is always written to the joblog regardless of the ACTION parameter setting. If TOPGMQ(*EXT) and ACTION(*RUN) are specified, the command may be run when returning to the Command Entry screen (depending on environment settings). Once the command is logged, it may be retrieved using the Retrieve Previous Command function key, F9 or the QMHRTVRQ API.
Top |
Specifies the program queue to which the CL command is written.
Top |
Top |
Example 1: Simple Command Example
SNDCMDMSG KWD1(PARMVAL1)
This command <...>
Example 2: More Complex Command Example
SNDCMDMSG KWD1(PARMVAL1) KWD2(PARMVAL2) KWD3(PARMVAL3)
This command <...>
Top |
*ESCAPE Messages
Top |