Use the TPPCC general macro with the ACTIVATE_ON_RECEIPT verb specified to
allow the issuing TPF ECB to exit and activate a different ECB at the program
specified after information has been received. The information received
may be data, conversation status, or a confirmation request. The
ACTIVATE_ON_RECEIPT verb is a TPF extension to the LU 6.2
architecture.
Format
- label
- A symbolic name can be assigned to the macro statement.
- ACTIVATE_ON_RECEIPT
- Directs the TPPCC macro to perform the ACTIVATE_ON_RECEIPT verb
function.
- RESID
- Specifies the symbolic name of a field or a register that points to a
field. This is a 4-byte field in which the resource ID is
supplied. This resource ID must be the one assigned on the initial
ALLOCATE for this conversation or one that was assigned by an incoming
ATTACH.
- PARM
- Specifies the parameter information to be passed to the new ECB.
The type of information is based on the option specified, which must be one of
the following:
- DL
- Specifies a TPF data level within the range D1 through DA. After
the information is received, the contents of the working storage block on the
data level specified is passed from the ECB issuing this verb to a 4K block on
the same data level of the ECB created.
- TOKEN
- Specifies the symbolic name of a field or a register that points to a
field. This is an 8-byte field that is saved and passed to EBX000 of
the new ECB that is created after the information is received.
- PGM
- Specifies the symbolic name of a field or a register that points to a
field. This is a 4-byte field containing the TPF real-time program
segment to be activated after the information has been received. This
TPF real-time segment must be defined in the TPF transaction program name
table (TPNT) as an ACTIVATE_ON_RECEIPT target program. This is done
with the ITPNT macro by specifying TYPE=AOR and by specifying the segment name
as both the TPN name and PGM name. See ITPNT-Transaction Program Name Table Macro for more information about the ITPNT
macro.
- RCODE
- Specifies the symbolic name of a field or a register that points to a
field. This is a 6-byte field in which the return code is
placed. The return code consists of a 2-byte primary return code
followed by a 4-byte secondary return code. The actual values returned
are listed in Return Conditions.
Entry Requirements
- The conversation must be in send or receive
state.
- See Entry Requirements for the entry requirements relating to the TPPCC macro in
general.
Return Conditions
- If the return code is LU62RC_OK, the ECB is no longer connected to the
transaction program or the conversation. The ECB cannot issue any
further TPF/APPC verbs.
- If the return code is any value other than LU62RC_OK, the ECB is still
connected to the transaction program and the conversation. However,
since all other return codes indicate a serious error, this also indicates
that a DEALLOCATE ABEND occurred for the conversation specified on the
ACTIVATE_ON_RECEIPT verb. The ECB cannot issue any further TPF/APPC
verbs for this conversation but can issue TPF/APPC verbs for other
conversations associated with the transaction program instance.
- Note:
- The transaction program is identified with the transaction program identifier
(TCB ID), and the conversation is identified with the conversation control
block identifier (CCB ID). Both identifiers are defined in the ECB as
EBTCBID and EBCCBID, respectively.
- See Return Conditions for the return conditions relating to the TPPCC macro in
general.
- The following table contains a list of the primary and secondary return
codes that can be returned to the program that issued the ACTIVATE_ON_RECEIPT
verb. A complete list of return codes and their definitions can be
found Table 11 and Table 12.
Symbolic Name
| Primary Code
| Secondary Code
|
LU62RC_OK
| 0000
|
|
LU62RC_AOR_INCOMPLETE
| ....
| 00000009
|
LU62RC_PARAMETER_CHECK
| 0001
|
|
LU62RC_PK_BAD_TCBID
| ....
| 00000001
|
LU62RC_PK_BAD_CONVID
| ....
| 00000002
|
LU62RC_PK_BAD_PROG
| ....
| 000000F2
|
LU62RC_PK_BAD_PARM
| ....
| 000000F3
|
LU62RC_STATE_CHECK
| 0002
|
|
LU62RC_SKRECEV_BADSTATE
| ....
| 000000B1
|
LU62RC_TPF_ABEND
| FFFF
|
|
- The following table contains a list of the primary and secondary return
codes that can be passed to the program specified by PGM when it is
activated. The return codes are based upon the processing of the
RECEIVE function.
Symbolic Name
| Primary Code
| Secondary Code
|
LU62RC_OK
| 0000
|
|
LU62RC_ALLOC_ERROR
| 0003
|
|
LU62RC_TP_NOT_AVAIL_RETRY
| ....
| 084B6031
|
LU62RC_TP_NOT_AVAIL_NO_RETRY
| ....
| 084C0000
|
LU62RC_TPN_NOT_RECOGNIZED
| ....
| 10086021
|
LU62RC_PIP_NOT_SPECIFIED_CORRECTLY
| ....
| 10086032
|
LU62RC_CONV_TYPE_MISMATCH
| ....
| 10086034
|
LU62RC_SYNLVL_NOTSUPORT
| ....
| 10086041
|
LU62RC_DLLOC_ABEND_PGM
| 0006
|
|
LU62RC_DLLOC_ABEND_SVC
| 0007
|
|
LU62RC_DLLOC_ABEND_TMR
| 0008
|
|
LU62RC_DLLOC_NORMAL
| 0009
|
|
LU62RC_PGMERR_NOTRUNC
| 000C
|
|
LU62RC_PGMERR_TRUNC
| 000D
|
|
LU62RC_PGMERR_PURGING
| 000E
|
|
LU62RC_CONVFAIL_RETRY
| 000F
|
|
LU62RC_CONVFAIL_NO_RETRY
| 0010
|
|
LU62RC_SVCERR_NOTRUNC
| 0011
|
|
LU62RC_SVCERR_TRUNC
| 0012
|
|
LU62RC_SVCERR_PURGING
| 0013
|
|
LU62RC_TPF_ABEND
| FFFF
|
|
Programming Considerations
- If you specify a register for a keyword value, the register must be
enclosed in parentheses and in the range R1-R7.
- The value supplied in RESID must be the resource returned by the ALLOCATE
verb or one that was assigned by an incoming ATTACH.
- You can issue this verb instead of the RECEIVE verb. If there is no
information available to satisfy a RECEIVE when the ACTIVATE_ON_RECEIPT verb
is issued, an ECB is not suspended waiting for the information to
arrive. When information arrives, TPF/APPC support creates a new ECB,
performs a RECEIVE, and activates the program specified by PGM. The
information that was received is passed to the activated program.
- When the program specified by PGM is activated, this indicates that a
RECEIVE was done. Check the return codes passed to the program at
EBX008 to determine the success of the RECEIVE. If the return code is
LU62RC_OK, check the WHAT_RECEIVED field (passed at EBX014) to see what was
received. If WHAT_RECEIVED is DATA (COMPLETE or INCOMPLETE), the data
is passed to the program on D0. The transaction program identifier (TCB
ID) and the conversation control block identifier (CCB ID) are passed to the
new ECB in fields EBTCBID and EBCCBID, respectively.
- If there is information available when the ACTIVATE_ON_RECEIPT verb is
issued, TPF/APPC activates the program specified by PGM right away with a new
ECB. The information is not returned to the program that issues the
ACTIVATE_ON_RECEIPT verb.
- The association of the ECB with the transaction program instance is
dependent on the return code.
- Any working storage block passed on a data level to the activated program
is released by TPF/APPC.
- See Programming Considerations for the programming considerations relating to the TPPCC
macro in general.
Examples
SYMB100 TPPCC ACTIVATE_ON_RECEIPT, X
RESID=(R7), X
PARM=(DL,D5), X
PGM=(R2), X
RCODE=EBW010
SYMB100 TPPCC ACTIVATE_ON_RECEIPT, X
RESID=(R7), X
PARM=(TOKEN,(R6)), X
PGM=(R2), X
RCODE=EBW010