Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Start Monitor for OnDemand (STRMONOND) command allows you to specify the name of an output queue or directory to monitor. The spooled files in the output queue, or the files in the directory, will be automatically processed by ADDRPTOND.
Once files are processed they are controlled by the value of the DLTSPLF parameter. Spooled files are additional controlled by the settings of the ERROUTQ and the PRCOUTQ parameters. If DLTSPLF is *YES then successfully processed files will be deleted. If it is *NO then successful spooled files will be moved to the output queue named in the PRCOUTQ parameter, successful directory files will have '.PRC' added to the end of file name. Unsuccessful files will never be deleted. Spooled files will end up in the output queue specified in the ERROUTQ parameter, directory files will have '.ERR' added to end of the file name.
You can end the monitor by:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
TYPE | Type | *OUTQ, *DIR | Optional |
OUTQ | Output queue | Qualified object name | Optional, Positional 1 |
Qualifier 1: Output queue | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
DIR | Directory | Path name | Optional |
APPGRPSRC | Value for application group | Element list | Optional |
Element 1: Check first | *SPLFNAME, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *FIRST, *SECOND, *THIRD, *FOURTH | ||
Element 2: Check next | *NONE, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *SPLFNAME, *SECOND, *THIRD, *FOURTH, *FIRST | ||
Element 3: Check last | *NONE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *SPLFNAME, *FORMTYPE, *THIRD, *FOURTH, *FIRST, *SECOND | ||
APPSRC | Value for application name | Element list | Optional |
Element 1: Check first | *APPGRP, *SPLFNAME, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *FIRST, *SECOND, *THIRD, *FOURTH | ||
Element 2: Check next | *NONE, *FORMTYPE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *SPLFNAME, *SECOND, *THIRD, *FOURTH, *FIRST | ||
Element 3: Check last | *NONE, *USERDATA, *JOBNAME, *USRDFNOPT1, *USRDFNOPT2, *USRDFNOPT3, *USRDFNOPT4, *USRDFNDTA, *SPLFNAME, *FORMTYPE, *THIRD, *FOURTH, *FIRST, *SECOND | ||
ERROUTQ | Error output queue | Qualified object name | Optional |
Qualifier 1: Error output queue | Name, ONDERR | ||
Qualifier 2: Library | Name, QUSRRDARS, *LIBL, *CURLIB | ||
DLTSPLF | Delete processed file | *NO, *YES | Optional |
PRCOUTQ | Processed output queue | Qualified object name | Optional |
Qualifier 1: Processed output queue | Name, ONDPROC | ||
Qualifier 2: Library | Name, QUSRRDARS, *LIBL | ||
ENDMON | End monitor automatically | *NO, *NOINPUT, *NBRHRS, *ENDTIME | Optional |
NBRHRS | Number of hours to run | 1-999, 8 | Optional |
ENDTIME | Time to end | Time, 230000 | Optional |
NBRMON | Number of monitors to start | 1-99, 1 | Optional |
INSTANCE | Instance | Character value, QUSROND | Optional |
SBMJOB | Submit to batch | *YES, *NO | Optional |
JOBD | Job description | Qualified object name | Optional |
Qualifier 1: Job description | Name, QOND400 | ||
Qualifier 2: Library | Name, QRDARS, *LIBL, *CURLIB |
Top |
Specifies the type of monitor.
Top |
Specifies the name and library of the output queue for which a monitor is to be started. A value must be provided if TYPE(*OUTQ) is specified.
Qualifier 1: Output queue
Qualifier 2: Library
Top |
Specifies the directory to monitor. A value must be provided if TYPE(*DIR) is specified.
When a directory is monitored, the monitor looks for files to process in that directory. Each file that is found in the directory will be processed. The file names should contain the application group and application name. For example, 'CHECKSTMTS.BIGSTMTS.data'. The monitor can use any one of the first 4 parts of the file name based on the values you specify for the APPGRPSRC and APPSRC parameters. When a file is processed successfully, '.PRC' is appended to the file name unless you have specified DLTSPLF(*YES) . If the load fails or if the values determined for application group and application are not valid, '.ERR' is appended to the file name. Files that end in .PRC or .ERR will not be processed.
Top |
For spooled files specifies which spooled file attribute to use as the application group name. For directory files specifies which part of the file name to use as the application group name. Up to three sources can be specified. If a valid application group name is not found using the first source, the second source is used. If a valid application group name 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
The default source for the second or third source is:
Element 2: Check next and Element 3: Check last
The default source for the second or third source is:
Top |
For spooled files specifies which spooled file attribute to use as the application. For directory files specifies which part of the file name to use as the application name. Up to three sources can be specified. If a valid application name is not found using the first source, the second source is used. If a valid application name 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
The default source for the second or third source is:
Element 2: Check next and Element 3: Check last
The default source for the second or third source is:
Top |
Specifies the name of the output queue to receive spooled files that ADDRPTOND fails to load.
Qualifier 1: Error output queue
Qualifier 2: Library
Top |
Specifies whether or not to delete a spooled file or file that ADDRPTOND loads successfully. If ADDRPTOND is unsuccessful, the spooled file or file is not deleted.
Top |
Specifies the name of the output queue to receive spooled files that ADDRPTOND loads successfully. This occurs only if DLTSPLF is *NO.
Qualifier 1: Processed output queue
Qualifier 2: Library
Top |
Specifies if the monitor will automatically end and how.
Note: Only spooled files in the ready state can be processed.
Top |
Specifies how many hours the monitor is to run before automatically ending.
Top |
Specifies the time when the monitor will automatically end.
Note: If the ENDTIME is after the current time, the monitor will end at the time specified by ENDTIME today. If the ENDTIME is before the current time, the monitor will end at that time tomorrow.
Top |
Specifies the number of monitors to start with these characteristics. Only one monitor can be started when TYPE is *DIR.
Top |
Specifies the name of the instance to use.
When a server name or TCP/IP address is entered, OnDemand uses the instance on that server that is using the default port. In most cases, this will also use the default instance.
Top |
Specify if you want to monitor the output queue or directory in the current job or in a another job.
Note: *YES must be specified when the NBRMON parameter is greater than 1.
Top |
Specifies the name of the job description used for the submitted job.
Qualifier 1: Job description
Qualifier 2: Library
Top |
Example 1: Simple Example
STRMONOND OUTQ(QUSRRDARS/ONDEMANDQ)
This command submits a job to batch that monitors for spooled files that are to be archived into OnDemand Common Server. When issued with no other parameters, the monitor uses the spooled file name attribute of the spooled file as both the application group name and application name. Spooled files that do not archive successfully are moved to the ONDERR output queue in the QUSRRDARS library. Spooled files that do archive successfully are also not deleted; they are moved to the ONDPROC output queue in the QUSRRDARS library. This command as shown will submit the monitor job without any specified end criteria, and will process within the default instance called QUSROND.
Example 2: More Complex Example
STRMONOND OUTQ(QUSRRDARS/ONDEMANDQ) APPGRPSRC(*SPLFNAME *FORMTYPE)APPSRC(*USERDATA) DLTSPLF(*YES) ENDMON(*ENDTIME) ENDTIME(235900) INSTANCE(ACCTING)
This command submits a job to batch that monitors for spooled files that are to be archived into OnDemand Common Server. The monitor attempts to use spooled file name and then form type attributes of the spooled file (in that order) for use as the application group name. The monitor uses the user data attribute of the spooled file as the application name. With this command example, successfully processed spooled files are deleted automatically; spooled files that do not archive successfully are moved to the ONDERR output queue in the QUSRRDARS library. In this example, the monitor will end at one minute before midnight of the current day. All processing will occur within the ACCTING instance.
Example 3: Another More Complex Example
STRMONOND TYPE(*DIR) DIR('/mydir') APPGRPSRC(*SECOND) APPSRC(*THIRD)DLTSPLF(*YES) INSTANCE(ACCTING)
This command submits a job to batch that monitors for stream files that are to be archived into OnDemand Common Server. The monitor uses the second part of the file name as the application group name and the third part of the file name as the application name. With this command example, successfully processed stream files are deleted automatically; stream files that do not archive successfully are retained in their current directory with the suffix of .ERR appended to the end of the file. All processing will occur within the ACCTING instance.
Top |
*ESCAPE Messages
Top |