7.24 GET_RECORD_LENGTH | GET_RECORD_LENGTH2
When returning control to Extract or Replicat, user exits are responsible for setting the length of the target record if and when mapping occurs. Use GET_RECORD_LENGTH
or GET_RECORD_LENGTH2
to obtain this value when the mapped record is not compressed. Set the EXIT-PARAMS
structure member RECORD-LENGTH
to this value.
GET_RECORD_LENGTH2
is only valid for use with records less than 32767. GET_RECORD_LENGTH2
is valid for both these smaller records and the longer records defined with DDL2.
Syntax GET_RECORD_LENGTH
For C:
#include "usrdecs" short record_length; short source_or_target; short result; result = GET_RECORD_LENGTH (&record_length, source_or_target);
For TAL:
?source usrdect int result; int .ext record_length; int source_or_target; result := GET_RECORD_LENGTH(record_length, source_or_target);
For COBOL:
?CONSULT =EXTRACT (or =REPLICAT) 01 record-length PIC S9(4) COMP. 01 source-or-target PIC S9(4) COMP. 01 result PIC S9(4) COMP. ENTER C "GET_RECORD_LENGTH" using record-length, source-or-target giving result.
-
record_length
record-length
-
The record length as calculated internally by Extract or Replicat.
-
source_or_target
source-or-target
-
Represented by either
EXIT‐FN‐SOURCE‐VAL
orEXIT-FN-TARGET-VAL
to indicate whether to retrieve the source or target record. -
result
-
A code indicating whether the call was successful or not.
Syntax GET_RECORD_LENGTH2
For C:
#include "usrdecs" long record_length; short source_or_target; short result; result = GET_RECORD_LENGTH2 (&record_length, source_or_target);
For TAL:
?source usrdect int result; int(32) .ext record_length; int source_or_target; result := GET_RECORD_LENGTH2(record_length, source_or_target);
For COBOL:
?CONSULT =EXTRACT (or =REPLICAT) 01 record-length PIC S9(8) COMP. 01 source-or-target PIC S9(4) COMP. 01 result PIC S9(4) COMP. ENTER C "GET_RECORD_LENGTH2" using record-length, source-or-target giving result.
-
record_length
record-length
-
The record length as calculated internally by Extract or Replicat.
-
source_or_target
source-or-target
-
Represented by either
EXIT‐FN‐SOURCE‐VAL
orEXIT-FN-TARGET-VAL
to indicate whether to retrieve the source or target record. -
result
-
A code indicating whether the call was successful or not.