Previous Topic: Convert Trigger Data (YCVTTRGDTA)Next Topic: End Trigger Server (YENDTRGSVR)


Start Trigger Server (YSTRTTRGSVR)

The Start Trigger Server (YSTRTTRGSVR) command allows you to start one or more Trigger Server jobs. Once started, these jobs monitor the YTRIGGERQ data queue in the library specified in the command. The YSTRTRGSVR command parameters are as follows:

Trigger Data Queue Library (TRGLIB)

Specifies the name of the library containing the CA 2E Trigger Data Queue, YTRIGGERQ. If a Trigger Data Queue does not exist in the specified library, one is created.

Job Description (JOBD)

This parameter specifies the job description to use for the CA 2E Trigger Server job(s).

Since a Trigger Server runs as a continuous batch process until it is ended with the End Trigger Server (YENDTGRSVR) command, the processor overrides the job description you choose to use JOBQ(QSYS/QSYSNOMAX), to ensure that the Trigger Server is submitted using a job queue that allows multiple active jobs. All other job definition attributes are taken from the job description specified in this parameter.

The possible values are:

*USRPRF

The job description for the user profile used by the job that is currently running is used for the trigger server job.

job-description-name

Specify the name (library-name/job-description-name) of the job description used for the trigger server job.

Number of Servers (NBRSVR)

Specifies the number of Trigger Server jobs that should be started by this command. All Trigger Server jobs use the same job description (as specified in the JOBD parameter) and will all monitor the same Trigger Data Queue YTRIGGERQ in the library specified in the TRGLIB parameter.

Since the Trigger Data Queue is a FIFO (first-in, first-out) data queue, if multiple Trigger Server jobs are running concurrently, each trigger request will be selected from the Trigger Data Queue by the first available Trigger Server job. There is thus no guarantee of the order in which the trigger requests will be processed, since this depends on many factors affecting the speed at which each Trigger Server job runs.

Consequently, if trigger requests must be processed in the same order in which the original trigger fired, you should process the trigger requests synchronously as a direct call by the Trigger Router, or you should ensure that only a single Trigger Server job monitors a specified Trigger Data Queue.

Running more than one Trigger Server job concurrently can improve system performance where many asynchronous trigger requests can appear at once. However, it will not affect the performance of the job in which the trigger was fired.

The values are:

*DFT

A single Trigger Server job is started to monitor the Trigger Data Queue in the library specified in the TRGLIB parameter.

*MAX

9 Trigger Server jobs are started to monitor the Trigger Data Queue in the library specified in the TRGLIB parameter. The maximum number of Trigger Server jobs that can be started is 99, but we retained the value for this parameter as 9 to preserve existing functionality.

Number-of-trigger-server-jobs

Between 1 and 99 Trigger Server jobs can be started to monitor the Trigger Data Queue in the library specified in the TRGLIB parameter.

Clear Data (CLEAR)

Specifies whether data should be cleared from the Trigger Data Queue prior to starting the Trigger Server job(s).

The possible values are:

*YES

Any data queue entries on the YTRIGGERQ Trigger Data Queue is removed before the specified number of Trigger Server jobs are started

*NO

Any data queue entries on the YTRIGGERQ Trigger Data Queue are not removed before the specified number of Trigger Server jobs are started. Consequently, they are processed immediately when the Trigger Server jobs start