7.26 GET_TRANSACTION_IND

Knowing whether a data record is the first, last or middle operation in a transaction can prove useful to an exit routine. For example, an exit might want to compile the details of each transaction and output a special summary record at the end. This type of processing is accommodated by GET_TRANSACTION_IND.

Syntax

For C:

#include "usrdecs"
short result;
short trans_ind;
result = GET_TRANSACTION_IND (&trans_ind);

For TAL:

?source usrdect
int result;
int .ext trans_ind;
result := GET_TRANSACTION_IND (trans_ind);

For COBOL:

?CONSULT =EXTRACT (or =REPLICAT)
01 result    PIC S9(4) COMP.
01 trans-ind PIC S9(4) COMP.
ENTER C "GET_SOURCE_RECORD" using trans-ind giving result.
trans_ind
trans-ind

Indicates whether the current record is the first (0), middle (1), last (2), or both first and last (3) record in a transaction.

result

A code indicating whether the call was successful or not.