Previous Topic: YSTRSPLRTR (Start spooled file router)Next Topic: YTDYRPFSCR (Tidy RPG III Source)


Parameters

Parameter

Definition

Value and Description

DTAQ

Specifies the data queue to be monitored. This data queue should previously have been created with MAXLEN(128) and SEQ(*FIFO), for example:

CRTDTAQ DTAQ(QGPL/YSPLRTRQ) MAXLEN(128) SEQ(*FIFO)

And have been attached to one or more output queues by using the Create Output Queue (CRTOUTQ) or Change Output Queue (CHGOUTQ) command specifying this data queue on the DTAQ parameter:

CHGOUTQ OUTQ(QGPL/QPRINT) DTAQ(QGPL/YSPLRTRQ)

Note: The data queue can have any name, not just YSPLRTRQ, and can be created in any library, not just QGPL, as in the example above. However, a data queue called YSPLRTRQ must be created in QGPL as above, to act as a default data queue for this command.

If a data queue is attached to an output queue, an entry will be added to the data queue every time a spooled file reaches Ready (RDY) status on the output queue. It is these entries which are monitored for by the spooled file router.

Note: A single data queue can be attached to several output queues, or you can create different data queues for different output queues.

 

YSPLRTRQ

Use the default spooled router data queue YSPLRTRQ. This data queue must already have been created as above.

data-queue-name

Enter the name of an existing data queue with the correct attributes (*FIFO, maximum length 128).

  • *LIBL (Default): All libraries in the user and system portions of the job's library list are searched until the first match is found for the specified data queue.
  • *CURLIB: The current library for the job is used to locate the specified data queue. If no library is specified as the current library for the job, the QGPL library is used.
  • library-name: Specify the name of the library to be searched for the specified data queue.
  • Errors allowed (ERRLVL): Specifies the maximum number of command errors that are tolerated during the running of the spooled file router. Command errors occur if the router processes an record in YSPLRTRP file and either the command does not exist, the parameters are incorrect or other errors occur (such as authority problems). If this value is greater than 0 (zero) and an error occurs whilst processing a command on a spooled file, but this value has not been reached, the spooled file router will not end, but no further records are processed for that spooled file (although any secondary commands will still be processed).

    If this value is reached, the spooled file router will end.

  • *NOMAX (Default): No maximum number of errors is specified, and all command errors are tolerated.
  • Number-of-errors: Specify a value that specifies the maximum number of command errors that is tolerated.

LOG

Specifies whether commands processed for spooled files should be written to the job log of the spooled file router job.

  • *NO (Default): Commands are not written to the job log unless an error occurs during the processing of the command, in which case the command is written to the job log following the error message.
  • *YES: All commands are written to the job log of the spooled file router job. If an error occurs during the processing of a command, the error message is written to the job log following the command.