Start Monitor for OnDemand (STRMONRDAR)
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.
| Keyword |
Description |
Choices |
Notes |
| OUTQ |
Output queue |
Qualified object name |
Required, Positional 1 |
| Qualifier 1: Output queue |
Name |
| Qualifier 2: Library |
Name, *LIBL, *CURLIB |
| RPTNAMSRC |
Value to use as report name |
Element list |
Optional |
| Element 1: Check first |
*SPLFNAME, *FORMTYPE, *USERDATA |
| Element 2: Check next |
*NONE, *FORMTYPE, *USERDATA,
*SPLFNAME |
| Element 3: Check last |
*NONE, *USERDATA, *SPLFNAME,
*FORMTYPE |
| VERSION |
Version |
1-99, *HIGHEST |
Optional |
| ERROUTQ |
Error output queue |
Qualified object name |
Optional |
| Qualifier 1: Error output queue |
Name, ERROR |
| Qualifier 2: Library |
Name, QUSRRDARS, *LIBL,
*CURLIB |
| DLTSPLF |
Delete processed spooled files |
*NO, *YES |
Optional |
| PRCOUTQ |
Processed output queue |
Qualified object name |
Optional |
| Qualifier 1: Processed output queue |
Name, PROCESSED |
| Qualifier 2: Library |
Name, QUSRRDARS, *LIBL |
| ENDDATE |
End date |
Character value, *NONE,
*TODAY, *TIME |
Optional |
| ENDTIME |
Time to end |
Time, 235500 |
Optional |
| CHKITV |
Check interval |
0-99999, 90, *IMMED, *MAX |
Optional |
| NBRMON |
Number of monitors to start |
1-99, 1 |
Optional |
| SBMJOB |
Submit to batch |
*YES, *NO |
Optional |
| JOBD |
Job description |
Qualified object name |
Optional |
| Qualifier 1: Job description |
Name, QRDARS400 |
| Qualifier 2: Library |
Name, *LIBL, *CURLIB |
Output queue (OUTQ)
Specifies the name and library of the output queue for which a
monitor is to be started.
This is a required parameter.
Qualifier 1: Output queue
- name
- Specify the name of the output queue to monitor.
Qualifier 2: Library
- *LIBL
- All libraries in the job's library list are searched until the
first match is found.
- *CURLIB
- The current library for the job is where the output queue is
located. If no library is specified as the current library for the
job, QGPL is used.
- name
- Specify the name of the library where the output queue is
located.
Value to use as report name (RPTNAMSRC)
Specifies which spooled file attribute to use as the report name
source. Up to three sources can be specified. If a valid report
definition is not found using the first source, the second source
is used. If a valid report definition is not found using the second
source, the third source is used.
Each value other than *NONE can only be used once.
Element 1: Check first
- *SPLFNAME
- Use the spooled file name as the source for the report
name.
- *FORMTYPE
- Use the form type as the source for the report name.
- *USERDATA
- Use the user data as the source for the report name.
Element 2: Check next and Element 3: Check
last
- *NONE
- No further sources should be checked.
- *SPLFNAME
- Use the spooled file name as the source for the report
name.
- *FORMTYPE
- Use the form type as the source for the report name.
- *USERDATA
- Use the user data as the source for the report name.
Default version to process (VERSION)
Specifies which version of the report definition is used to
store the report.
- *HIGHEST
- The highest defined version of the report definition is
used.
- 01-99
- Specify the version number of the report to use.
Error output queue (ERROUTQ)
Specifies the name of the output queue to receive spooled files
that STRCDSRDAR fails to store.
Qualifier 1: Error output queue
- ERROR
- Spooled files that are not stored are placed in the output
queue named ERROR.
- name
- Specify the name of the output queue to receive spooled files
that fail to store.
Qualifier 2: Library
- QUSRRDARS
- The output queue is located in library QUSRRDARS.
- *LIBL
- All libraries in the job's library list are searched until the
first match is found.
- *CURLIB
- The current library for the job is where the output queue is
located. If no library is specified as the current library for the
job, QGPL is used.
- name
- Specify the name of the library where the output queue is
located.
Delete processed spooled files (DLTSPLF)
Specifies whether or not to delete a spooled file that
STRCDSRDAR stores successfully. If STRCDSRDAR is unsuccessful, the
spooled file is not deleted.
- *NO
- The spooled file is never automatically deleted.
- *YES
- The spooled file is only deleted if the reports were
stored.
Processed output queue (PRCOUTQ)
Specifies the name of the output queue to receive spooled files
that STRCDSRDAR stores.
Qualifier 1: Processed output queue
- PROCESSED
- Spooled files that are stored are placed in the output queue
named PROCESSED.
- name
- Specify the name of the output queue to receive spooled files
that were stored.
Qualifier 2: Library
- QUSRRDARS
- The output queue is located in library QUSRRDARS.
- *LIBL
- All libraries in the job's library list are searched until the
first match is found.
- *CURLIB
- The current library for the job is where the output queue is
located. If no library is specified as the current library for the
job, QGPL is used.
- name
- Specify the name of the library where the output queue is
located.
End date (ENDDATE)
Specifies the date when the monitor will automatically end.
- *NONE
- Do not automatically end the monitor.
- *TODAY
- The monitor ends today at the time specified on the ENDTIME
parameter.
- *TIME
- The monitor will end at the time specified on the ENDTIME
parameter regardless of what date it is. If the ENDTIME is after
the current time, the ENDDATE is set to *TODAY. If the ENDTIME is
before the current time, the ENDDATE is effectively set to
tomorrow's date.
- ending-date
- Specify the date that you want the monitor to end. The date
must be today or later.
Specify a date using the format YYYYMMDD where YYYY represents
the year, MM the month, and DD the day. Do not use any type of
special characters to separate year, month, and day values.
Time to end (ENDTIME)
Specifies the time when the monitor will automatically end.
- 235500
- The monitor will automatically end at 11:55 pm.
- ending-time
- Specify the time that the monitor should end. This time is
specified in HHMMSS format where HH is the hour, MM is the minute
and SS is the second.
Check interval (CHKITV)
Specifies in seconds, how long the monitor will wait for a
spooled file to become ready on the output queue. Once this time
has expired, a check is made to see if:
- The ENDDATE and ENDTIME values are met.
- The ENDMONRDAR command has been issued.
- An ENDJOB with the OPTION(*CNTRLD) has bee issued for this
job.
Note: Specifying a small value will cause the monitor to
use more of the available CPU time.
- 90
- The monitor will wait up to 90 seconds for a spooled file to
become ready.
- *IMMED
- The monitor will not wait for a spooled file to become ready.
It constantly checks to see if a spooled file is ready.
- *MAX
- The monitor will wait forever for a spooled file to become
ready. Whenever a spooled file does become ready, a check is made
to see if the monitor should end (either ending time or ENDMONRDAR
issued or ENDJOB).
- time-interval
- Specify the number of seconds to wait for a spooled file to
become ready in the output queue. The value must be between 0 and
9999 seconds. A value of 0 causes the monitor to continuously check
if there are any spooled files that are ready.
Note: Specifying a smaller number will cause degraded
performance for lower priority jobs.
Number of monitors to start (NBRMON)
Specifies the number of monitors to start with these
characteristics.
- 1
- One monitor is started.
- 1-99
- A number representing the number of monitors to start.
Submit to batch (SBMJOB)
Specifies if you want to monitor the output queues in this
current job or in a another job.
Note: *YES must be specified when the NBRMON parameter is
greater than 1.
- *YES
- This command should be submitted to run in a different
job.
- *NO
- This command should be run within the current job. If you are
entering this command from a terminal, this will prevent you from
doing any other work from this terminal session until this command
completes.
Job description (JOBD)
Specifies the name of the job description used for the submitted
job.
Qualifier 1: Job description
- QRDARS400
- The QRDARS400 job description is used as the job description
for the submitted job.
- name
- Specify the name of the job description used for the job.
Qualifier 2: Library
- *LIBL
- All libraries in the job's library list are searched until the
first match is found.
- *CURLIB
- The current library for the job is used to locate the job
description name. If no library is specified as the current library
for the job, QGPL is used.
- name
- Specify the name of the library where the job description name
is located.
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.
*ESCAPE Messages
- OND0281
- Output queue &1 in library &2 can not be monitored.
Another monitor is already active.
- RDR0184
- Output queue &1 in library &2 can not be monitored. No
data queue is or can be attached.
- RDR0186
- Output Queue &1 in library &2 not found.