CL Command Reference - STRMONRDAR
CL Command List > STRMONRDAR Reference
Description:
The Start Monitor for OnDemand (STRMONRDAR) command allows you to specify the name of an output queue to monitor. When a spooled file is added to the output queue, the spooled file is automatically processed by STRCDSRDAR. You can end the monitor by:
. Specifying a date and time to end on this command.
. Running the ENDMONRDAR command.
. Ending the monitor job using the ENDJOB command. Specify OPTION(*CNTRLD) and DELAY(999999). The job will end as soon as the monitor finishes processing the current report.
Examples:
Example 1: Simple Example
STRMONRDAR OUTQ(QUSRRDARS/ONDEMANDQ)
This command submits a job to batch that monitors for spooled files that are to be archived into OnDemand Spooled File Archive. When issued with no other parameters, the monitor uses the spooled file name attribute of the spooled file as the report definition name. Spooled files that do not archive successfully are moved to the ERROR output queue in the QUSRRDARS library. Spooled files that do archive successfully are also not deleted; they are moved to the PROCESSED output queue in the QUSRRDARS library. This command as shown will submit the monitor job without any specified end criteria.
Example 2: More Complex Example
STRMONRDAR OUTQ(QUSRRDARS/ONDEMANDQ)
RPTNAMSRC(*SPLFNAME *FORMTYPE *USERDATA)
DLTSPLF(*YES) ENDDATE(*TIME) ENDTIME(235900)
This command submits a job to batch that monitors for spooled files that are to be archived into OnDemand Spool File Archive. The monitor attempts to use spooled file name and then form type and then user data attributes of the spooled file (in that order) for use as the report definition name. With this command example, successfully processed spooled files are deleted automatically; spooled files that do not archive successfully are moved to the ERROR output queue in the QUSRRDARS library. In this example, the monitor will end at one minute before midnight of the current day.