STRDPRAPY: Starting Apply (System i)
Use the Start DPR Apply (STRDPRAPY) command to start an Apply program on your local system. The Apply program continues to run until you stop it or until it detects an unrecoverable error.
After you type the command name on the command line, you can press the F4 key to display the command syntax.
To display a complete description of this command and all of its parameters, move the cursor to the command at the top of the screen and press the F1 key. To display a description of a specific parameter, place the cursor on that parameter and press the F1 key.
>>-STRDPRAPY--+-------------------------+-----------------------> | .-*CURRENT--. | '-USER(--+-*JOBD-----+--)-' '-user-name-' >--+-------------------------------------------------+----------> | .-*LIBL/QZSNDPR---------------------. | '-JOBD(--+-library-name/job-description-name-+--)-' >--+----------------------------------+-------------------------> | .-*USER-----------. | '-APYQUAL(--+-apply-qualifier-+--)-' >--+--------------------------+--+------------------------+-----> | .-*LOCAL---. | | .-*NONE---. | '-CTLSVR(--+-rdb-name-+--)-' '-TRACE(--+-*ERROR--+--)-' +-*ALL----+ +-*PRF----+ '-*REWORK-' >--+-----------------------------------------------+------------> | .-*NONE---------------------. | '-FULLREFPGM(--+-library-name/program-name-+--)-' >--+----------------------------------------------+-------------> | .-*NONE---------------------. | '-SUBNFYPGM(--+-library-name/program-name-+--)-' >--+------------------------+--+------------------------+-------> | .-*YES-. | | .-*YES-. | '-INACTMSG(--+-*NO--+--)-' '-ALWINACT(--+-*NO--+--)-' >--+---------------------------+--------------------------------> | .-6----------. | '-DELAY(--+-delay-time-+--)-' >--+----------------------------------+-------------------------> | .-300-------------. | '-RTYWAIT(--+-retry-wait-time-+--)-' >--+------------------------+--+------------------------+-------> | .-*NO--. | | .-*NO--. | '-COPYONCE(--+-*YES-+--)-' '-TRLREUSE(--+-*YES-+--)-' >--+-------------------------+--------------------------------->< | .-*NO--. | '-OPTSNGSET(--+-*YES-+--)-'
Table 1 lists the invocation parameters.
Parameter | Definition and prompts |
---|---|
USER | Specifies the name of the user ID
for which to start the Apply program. When you run this command, you
must be authorized (have *USE rights) to the specified user profile;
the Apply program runs under this specified user profile. The control tables are located on the relational database specified by the CTLSVR parameter. The same control tables are used regardless of the value specified on the USER parameter.
|
JOBD | Specifies the name of the job description
to use when submitting the Apply program.
|
APYQUAL | Specifies the Apply qualifier to
be used by the Apply program. All subscriptions sets that are grouped
together with this Apply qualifier are run by the Apply program.
|
CTLSVR | Specifies the relational database name of the system that contains
the Apply control tables.
|
TRACE | Specifies whether the Apply program
should generate a trace. The Apply program writes the trace data to
a spool file called QPZSNATRC.
|
FULLREFPGM | Specifies whether the Apply program is to invoke an exit routine
to initialize a target table. When the Apply program is ready to perform
a full refresh of a target table, the Apply program invokes the specified
exit routine rather than performing the full refresh itself. When a full-refresh exit routine is used by the Apply program, the value of the ASNLOAD column in the IBMSNAP_APPLYTRAIL table is Y.
|
SUBNFYPGM | Specifies whether the Apply program is to invoke an exit routine
when the program finishes processing a subscription set. Input to
the exit routine includes the subscription set name, Apply qualifier,
completion status, and statistics with the number of rejects. The notify program allows you to examine the unit-of-work (UOW) table to determine when transactions have been rejected and when to take further actions, such as issuing a message or generating an event.
|
INACTMSG | Specifies whether the Apply program is to generate a message
whenever the program completes its work and becomes inactive for a
period of time.
|
ALWINACT | Specifies whether the Apply program can run in an inactive
(sleep) state.
|
DELAY | Specifies the delay time (in seconds) at
the end of each Apply program cycle when continuous replication is
used.
|
RTYWAIT | Specifies how long (in seconds) the Apply
program is to wait after it encounters an error before it retries
the operation that failed.
|
COPYONCE | Specifies whether the Apply program executes
one copy cycle for each subscription set that is eligible at the time
the Apply program is invoked. Then the Apply program terminates. An
eligible subscription set meets the following criteria:
|
TRLREUSE | Specifies whether the Apply program empties
the IBMSNAP_APPLYTRAIL table when the Apply program starts.
|
OPTSNGSET | Specifies whether the performance of the
Apply program is optimized if only one subscription set is processed.
This parameter does not pertain to replica target tables.
If
you set this parameter to *YES, the Apply program fetches the members
and columns of a subscription set only once and reuses this fetched
information when processing the same subscription set in two or more
consecutive processing cycles.
|
Usage notes
You can set up the system to start the subsystem automatically by adding the command that is referred to in the QSTRUPPGM value on your system. If you use the QDP4/QZSNDPR subsystem, it is started as part of the STRDPRAPY command processing.
If the relational database (RDB) specified by the CTLSVR parameter is a DB2 for i5/OS™ database, the tables on the server are found in the ASN library. If the RDB is not a DB2 for i5/OS database, you can access the tables by using ASN as the qualifier.
Error conditions when starting the Apply program
- If the user does not exist.
- If the user running the command is not authorized to the user profile specified on the command or the job description.
- If an instance of the Apply program is already active on the local system for this combination of Apply qualifier and control server.
- If the RDB name specified by the CTLSVR parameter is not in the relational database directory.
- If the control tables do not exist on the RDB specified by the CTLSVR parameter.
- If no subscription sets are defined for the Apply qualifier specified by the APYQUAL parameter.
Identifying Apply program jobs
- The job is started under the user profile associated with the USER parameter.
- The first 10 characters of the Apply qualifier are truncated and become the job name.
- DB2 DataPropagator for System i maintains an IBMSNAP_APPLY_JOB table named in the ASN library on the local system. The table maps the Apply qualifier and control server values to the correct Apply program job.
- You can view the job log. The Apply qualifier and control server names are used in the call to the Apply program.
- The first 10 characters of the Apply qualifier name are unique.
- The Apply program is started for the local control server only.
Examples for STRDPRAPY
The following examples illustrate how to use the STRDPRAPY command.
Example 1:
STRDPRAPY APYQUAL(AQHR) CTLSVR(*LOCAL) TRACE(*ALL)
Example 2:
STRDPRAPY APYQUAL(AQHR) CTLSVR(*LOCAL) ALWINACT(*NO)
Example 3:
STRDPRAPY APYQUAL(AQHR) CTLSVR(*LOCAL) TRLREUSE(*YES)
Example 4:
STRDPRAPY