INDEX: Recoup descriptor record structure

Use this system macro to describe the location of embedded record references and the method to chain chase those references and to code recoup descriptor container records (BKDs).

This macro is used both offline and online with the GROUP macro. INDEX macros are associated with the GROUP macro that immediately precedes them.

The offline process uses the INDEX and GROUP macros to create recoup descriptor container records.

The DSECT part of the GROUP and INDEX macros is used to access the different fields in the BKD record online.

Last updated

  • Changed for PUT12 (information only; no code change).
  • Changed for PUT10.
  • Changed for PUT05.
  • Changed for PUT04.

Format

Read syntax diagramSkip visual syntax diagramlabelINDEXTYP=CFSLItem_Variables,ORD=( rectype, length, address) MItem_VariablesVItem_Variables,ID=recordidrecordptr,ALTID= altidlbl,ACODE= acodeloc,BCH= backchn,CODE= codeloc,DSCR= dscrloc,DUPEELIM=NO,DUPEELIM=YES,FA=falocfaptr,FVN= versionnbr,MAC= macro_name,RCC=(P, dtag)(I, dtag)(C, x),REG= reg,SUFFIX= suffix,TLC=NO,TLC=YES
Item_Variables
Read syntax diagramSkip visual syntax diagram,CNT= itemcnt,CREATE=YES,CREATE=NO,FAT=FA4,FAT=FA8,FAT=PID,FCOD= fcodloc,FI=filocfiptr,FII=fiidispfiinbr,LI=liliptr,LII=liidispliinbr,LSI=lsilsiptr,NAB=nabnabptr,SFA=sfalocsfaptr,SI=silocsiptr,SIC=sicntsicntptr
label
A symbolic name that can be assigned to the macro statement.
TYP
Specifies the type of file.
C
Specifies a standard forward chaining file, where the file address is contained in a standard header (at location 8). If the file address is not at location 8, code the FA parameter.
F
Specifies a fixed address file, where the file address or persistent identifier (PID) is at a fixed location. (Do not use for forward chaining.)
S
Specifies that the file is a z/TPF Database Facility Enterprise Edition (z/TPFDF) file described by DBDEF macro statements.
L
Specifies an embedded ordinal number file, where a group of ordinal numbers are described.
M
Specifies a variable item file, where file addresses are contained in variable-length items or subitems.
V
Specifies a fixed item file, where file addresses or persistent identifiers (PIDs) are contained in fixed-length items, subitems, or PIDs.
ORD
Specifies the ordinal description if chained records contain an ordinal number, where:
rectype
The file address compute (FACE) program record type used to convert the ordinal number to a file address.
length
The length of the field containing the ordinal number.
address
The location relative to the first item (FI) of the ordinal number; for example:
ORD=(#PNDRI,1,TAGE)
Note: If the FI parameter resolves to a value that cannot be relocated or pointer value, the ORD parameter must also be a value that cannot be relocated or pointer value.
ID
Specifies the record ID that is used to retrieve the record, where:
recordid
A 2-character alphanumeric or 4-digit hexadecimal record ID. For example:
ID=AA
ID=C1C2
recordptr
The location in the current record where a 2-byte field contains the record ID that is used to retrieve the record. You can specify the location as a relative displacement or the actual displacement as follows:
  • Specify a relative displacement to the 2-byte field in the following format:

    ID=(disptype,reclbl)

    Where:

    disptype
    One of the following values:
    R
    Specifies the displacement in the record to the record ID field.
    I
    Specifies the displacement in an item of the record to the record ID field.
    S
    Specifies the displacement in a subitem of the record to the record ID field.
    reclbl
    The DSECT tag of the location of the record ID address.
    For example:
    ID=(R,VR1IDR)
    ID=(I,VR1IDI)
    ID=(S,VR1IDS)
  • Specify the actual displacement to the 2-byte field in the following format:

    ID=(disptype,N,disp)

    Where:

    disptype
    One of the following values:
    R
    Specifies the displacement in the record to the record ID field.
    I
    Specifies the displacement in an item of the record to the record ID field.
    S
    Specifies the displacement in a subitem of the record to the record ID field.
    disp
    The actual displacement. Specify the displacement as one of the following:
    • An expression that resolves to the actual displacement
    • The actual displacement in bytes
    • An equate that resolves to the actual displacement.
    For example:
    ID=(R,N,(UR1ID1-UR1HDR))
    ID=(I,N,20)
    ID=(S,N,VR1IDX)
Note: If you do not specify this parameter, no record ID check is done and a warning message is issued.
ALTID=altidlbl
Specifies the label of a statement that expands to an alternate ID table that is used for recoup chain chase processing. Recoup processing chases the first record ID that matches the information supplied in the table. The statement at the specified label must have the following format:
altidlbl INDEX TYP=AIDTBL,(rid,(rcc),dscrloc),(rid,(rcc),dscrloc),....
Where:
rid
A 2-character alternate record ID or 4-character hexadecimal alternate record ID.
rcc
Specifies the location of the record code check (RCC).
(P,dtag)
Used if the RCC is at a location in the parent record; for example:
(P,NC0RCC)
(I,dtag)
Used if the RCC is at a displacement in the current item; for example:
(I,TAG1)
(C,x)
Used if the RCC is a constant (any number from 0 to 255); for example:
(C,246)
dscrloc
Specifies the location of the GROUP macro statement that also describes the data record when retrieved (located in the same descriptor container record). If the record contains no more references to chain chasing (including overflow or forward chaining), dscrloc can be omitted, but the preceding comma must still be specified.
Recoup processing compares the record ID and RCC of a record to the information found in the alternate ID table. If the information matches an item, the record is chain chased using the GROUP macro statement at the descriptor location (dscrloc). In the following example, assume that recoup processing found the record ID of JJ with an RCC of 01 in the record that was at label JX0FAD. This matches the first ID in the alternate record table; therefore, the record is chain chased using the GROUP macro statement at label JUREC1.
          INDEX  TYP=F,ALTID=TEST,FA=JX0FAD

TEST      INDEX TYP=AIDTBL,(JJ,(C,01),JUREC1),(FC01,(P,FC0RCC),FCTAG),(BB,,)

JUREC1    GROUP  USE=DCSR,
Note: If you specify the ALTID parameter on the primary INDEX statement, you cannot specify the ALTID parameter with the ID, RCC, or DSCR parameter. You may include these parameters in the AIDTBL statement.
ACODE=acodeloc
Specifies the label where there is code to run after finding the pool address; for example:
ACODE=PD3AR
BCH=backchn
Specifies the label of the backward chain address from the last record in the chain; for example:
BCH=NC0BCH
CODE=codeloc
Specifies the location within the descriptor container record of code to run prior to locating imbedded file addresses; for example:
CODE=PREFIND
This is useful in cases where certain fields in a data record can be tested to determine if the data record has no imbedded addresses.
DSCR=dscrloc
Specifies the location of the GROUP macro statement that also describes the data record when retrieved (located in the same descriptor container record). The following example shows the DSCR parameter pointing to GROUP3, which is a GROUP macro statement that also describes the data record:
INDEX TYP=F, DSCR=GROUP3, ...


GROUP3   GROUP  USE=DCSR, ...
DUPEELIM
Specifies whether or not to use the special recoup chain chasing indicator (RCI) algorithm that eliminates duplicate chain chasing.
NO
Does not check pseudo directories to prevent finding a pool that has already been chain chased.
YES
Checks pseudo directories to prevent finding a pool that has already been chain chased.
Note: DUPEELIM=YES can only be specified when USE=BASE and GRP=(grpid,RCI) are specified in the associated GROUP macro statement, where grpid is the group name that is assigned to a specific group of record IDs.
INDEX TYP=F,FA=AA0AG1,ID=CC,DUPEELIM=YES

INDEX TYP=V,ID=CA,FI=I80IFA,LI=L'I80IFA,
      CNT=(N,I80NENT),DSCR=XXXX,DUPEELIM=YES

INDEX TYP=M,ID=CA,FI=I80IFA,LI=L'I80IFA,
      NAB=(N,I80NENT),DSCR=YYYY,DUPEELIM=YES

INDEX TYP=C,ID=FC32,DUPEELIM=YES
FA
Specifies the location of the file address, where:
faloc
A displacement to the file address, where faloc is one of the following:
  • A DSECT tag representing the location of the file address; for example:
     FA=PD1IFA
  • An absolute displacement from the start of the first item, expressed as (alpha,disp), where alpha is any alphabetic character and disp is the displacement to the file address; for example:
    FA=(N,40)
faptr
The size and location of the 1- to 4-byte field that contains the pointer to the file address, where faptr is one of the following:
  • An absolute size and DSECT tag of the location of the file address pointer; for example:
     FA=(2,VR1FAP) 
  • A calculated size and DSECT tag of the location of the file address pointer; for example:
    FA=(L'VR1FAP,VR1FAP)
  • An absolute displacement from the start of the first item, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 16 in the following example:
    FA=(N,2,16)
Note: If the FI parameter is specified and resolves to a value that cannot be relocated or pointer value, the FA parameter must also resolve to a value that cannot be relocated or pointer value.
FVN=versionnbr
Specifies the file version number used by the z/TPFDF product to identify file structures that have blocks with different layouts than the prime blocks; for example:
INDEX TYP=S,FVN=1
MAC=macro_name
Specifies the name of the data macro describing the data record containing embedded addresses.
RCC
Specifies the location of the record code check (RCC), in one of the following forms:
(P,dtag)
Specifies that the RCC is at a location in the parent record; for example:
RCC=(P,NC0RCC)
(I,dtag)
Specifies that the RCC is at a displacement in the current item; for example:
RCC=(I,TAG1)
(C,x)
Specifies that the RCC is a constant (any number from 0 to 255); for example:
RCC=(C,246)
Note: If you specify TYP=C and the RCC parameter, chain chase processing always uses the RCC that is in the head of chain record regardless of the form that you specify for the RCC parameter.
REG=reg
Specifies the register to be used as the base for the DSECT specification; for example:
REG=R7
Note: If the REG parameter is specified, the macro generation assumes that the request is to generate the DSECT only.
SUFFIX=suffix
Specifies the suffix to be used on the DSECT definition, where suffix is an alphabetic character; for example:
SUFFIX=Q
TLC
Specifies whether to use the trailing loop check routine for this item in addition to the standard loop check routine, where:
NO
Does not use the trailing loop check routine. Standard loop checking remains active.
YES
Uses the trailing loop check routine to detect for a looping record chain.
Use this parameter when the chain contains one or more short-term pools in the chain.
Note: You can specify this parameter only for standard forward chaining files (TYP=C).
CNT=itemcnt
Specifies the item count, where itemcnt is specified as an absolute value or specified as a length and location that contains the item count value.
The following example shows an item count specified as an absolute value:
CNT=(N,20)
The following example shows an item count specified as a value specified for 2 bytes starting at location PD1TAG:
CNT=(2,PD1TAG)
CREATE
Specifies whether an entry control block (ECB) is to be created with the retrieved record.
YES
Specifies that an ECB is created with the retrieved record, which provides faster processing time and sometimes avoids single threading (usually where there is only one fixed level record with many embedded addresses that also may have many embedded addresses).

If you specify CREATE=YES, more ECBs are created than were specified with the ECB parameter in the primary GROUP macro.

NO
Specifies that an ECB is not created with the retrieved record.
FAT
Specifies the type of file address specified with the FA parameter.
FA4
Specifies a 4-byte file address.
FA8
Specifies an 8-byte file address.
PID
Specifies a z/TPF collection support (z/TPFCS) persistent identifier (PID).
FCOD=fcodloc
Specifies the location in the descriptor container record of code to be processed for every item in a data record; for example
FCOD=ITEMCODE
This is used for testing fields in items where the file addresses can be for different record types, or if item is inactive, but file address not cleared.
Note:
  1. Register 1 (R1) contains the base of data record.
  2. R2 points to item.
  3. When TYP=L, R3 has the address of the current ordinal slot, and R2 points to the current item.
  4. When TYP=V or TYP=M, R7 has the address of the current subitem, and R2 points to the current item.
FI
Specifies the location of the first item in a record, where:
filoc
A displacement to the first item relative to the start of the record, where filoc is one of the following:
  • A DSECT tag representing the location of the first item; for example:
     FI=PD1ITM 
  • An absolute displacement from the start of the record, expressed as (alpha,disp), where alpha is any alphabetic character and disp is the displacement to the first item; for example:
    FI=(N,40)
fiptr
The size and location of the 1- to 4-byte field that contains the pointer to the first item in the record, where fiptr is one of the following:
  • An absolute size and DSECT tag of the location of the first item pointer; for example:
     FI=(2,VR1IPT) 
  • A calculated size and DSECT tag of the location of the first item pointer; for example:
    FI=(L'VR1IPT,VR1IPT)
  • An absolute displacement from the start of the record, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 16 in the following example:
    FI=(N,2,16)
Note: If the FI parameter is specified and resolves to a value that cannot be relocated or pointer value, the FA, LI, ORD, SFA, SI, or SIC parameter must also resolve to a value that cannot be relocated or pointer value.
FII
Specifies the first item index that is used to locate the first valid item in a record, where:
fiidisp
A field that contains the absolute displacement from the start of the record to the first item in a record, expressed as (alpha, size, namefield), where alpha is any alphabetic character, size is the size of the field, and namefield is the name field that contains the displacement. In the following example, the 2-byte field, TAGB, contains the absolute displacement from the start of the record to the first item :
FII=(D,2,TAGB)
fiinbr
A field that contains the item number of the first item in a record, expressed as (size, namefield), where size is the size of the field, and namefield is the name of the field that contains the item number of the first item. The first item is item number 0; therefore, the last item number is one less than the number of items. In the following example, the 2-byte field, TAGB, contains the number of the last item in a record:
FII=(2,TAGB)
Note: The FII parameter is used only for fixed-length items.
LI
Specifies the length of an item or the location of a field that contains the length of an item in a record, where:
li
The length of an item in a record, where li is one of the following values:
  • An assembler expression that resolves to an absolute value; for example:
     LI=L'PD1ITM 
  • An absolute value; for example:
    LI=32
liptr
The size and location of the 1- to 4-byte field that contains the pointer to the length of an item, where liptr is one of the following values:
  • An absolute size and DSECT tag of the location of the item length; for example:
     LI=(2,VR1IPT) 
  • A calculated size and DSECT tag of the location of the item length; for example:
    LI=(L'VR1IPT,VR1IPT)
  • An absolute displacement from the start of the record, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 12 in the following example:
    LI=(N,2,12)
Note: If the FI parameter is specified and resolves to a value that cannot be relocated or pointer value, the LI parameter must also resolve to a value that cannot be relocated or pointer value.
LII
Specifies the last item index that is used to locate the last valid item in a record is in a field that contains the absolute displacement to the last item in a record or the location of a field that contains the item number of the last used item in a record, where:
liidisp
A field that contains the absolute displacement from the start of the record to the last item in a record, expressed as (alpha,size,namefield), where alpha is any alphabetic character, size is the size of the field, and namefieldis the name field that contains the displacement. In the following example, the 2-byte field, TAGB, contains the absolute displacement from the start of the record to the last item :
LII=(D,2,TAGB)
liinbr
A field that contains the item number of the last item in a record, expressed as (size,namefield), where size is the size of the field, and namefield is the name of the field that contains the item number of the last item. The first item is item number 0; therefore, the last item number is one less than the number of items. In the following example, the 2-byte field, TAGB, contains the number of the last item in a record:
LII=(2,TAGB)
Note: The LII parameter is only used for fixed-length items.
LSI
Specifies the length of a subitem or the location of a field that contains the length of a subitem in a record, where:
lsi
The length of a subitem in a record, where lsi is one of the following:
  • An assembler expression that resolves to an absolute value; for example:
     LSI=L'PD1ITM 
  • An absolute value; for example:
    LSI=32
lsiptr
The size and location of the 1- to 4-byte field that contains the pointer to the length of a subitem, where lsiptr is one of the following:
  • An absolute size and DSECT tag of the location of the subitem length; for example:
     LSI=(2,VR1IPT) 
  • A calculated size and DSECT tag of the location of the subitem length; for example:
    LSI=(L'VR1IPT,VR1IPT)
  • An absolute displacement from the start of the record, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 12 in the following example:
    LSI=(N,2,12)
Note: If the SFA parameter is specified and resolves to a value that cannot be relocated or pointer value, the LSI parameter must also resolve to a value that cannot be relocated or pointer value.
NAB
Specifies the next available byte or the location of a field that contains the next available byte, where:
nab
The next available byte in a record, where nab is an absolute value; for example:
NAB=(N,20)
nabptr
The size and location of the 1- to 4-byte field that contains the pointer to the next available byte, where nabptr is one of the following:
  • An absolute size and DSECT tag of the location of the next available byte; for example:
     NAB=(2,VR1NAB) 
  • A calculated size and DSECT tag of the location of the next available byte; for example:
    NAB=(L'VR1NAB,VR1NAB)
SFA
Specifies the location of the subitem file address, where:
sfaloc
A displacement to the subitem file address, where sfaloc is one of the following:
  • A DSECT tag representing the location of the subitem file address; for example:
     SFA=TAGA
  • An absolute displacement to the subitem file address relative to the start of the first item, expressed as (alpha,disp), where alpha is any alphabetic character and disp is the displacement to the subitem file address; for example:
    SFA=(G,40)
sfaptr
The size and location of the 1- to 4-byte field that contains the pointer to the subitem file address, where sfaptr is one of the following:
  • An absolute size and DSECT tag of the location of the subitem file address pointer; for example:
     SFA=(2,VR1IPT) 
  • A calculated size and DSECT tag of the location of the subitem file address pointer; for example:
    SFA=(L'VR1IPT,VR1IPT)
  • An absolute displacement from the start of the first item, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 16 in the following example:
    SFA=(N,2,16)
Note: If the FI or SI parameter is specified and resolves to a value that cannot be relocated or pointer value, the SFA parameter must also resolve to a value that cannot be relocated or pointer value.
SI
Specifies the location of the first subitem in an item, where:
siloc
A displacement to the first subitem, where siloc is one of the following:
  • A DSECT tag representing the location of the subitem file address; for example:
     SI=TAGA
  • An absolute displacement to the first subitem relative to the start of the first item, expressed as (alpha,disp), where alpha is any alphabetic character and disp is the displacement to the first subitem; for example:
    SI=(G,40)
siptr
The size and location of the 1- to 4-byte field that contains the pointer to the first subitem, where siptr is one of the following:
  • An absolute size and DSECT tag of the location of the first subitem pointer; for example:
     SI=(2,VR1IPT) 
  • A calculated size and DSECT tag of the location of the first subitem pointer; for example:
    SI=(L'VR1IPT,VR1IPT)
  • An absolute displacement from the start of the first item, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 16 in the following example:
    SI=(N,2,16)
Note: If the FI or SFA parameter is specified and resolves to a value that cannot be relocated or pointer value, the SI parameter must also resolve to a value that cannot be relocated or pointer value.
SIC
Specifies the subitem count (that is, the number of subitems), where:
sicnt
The subitem count, where sicnt is an absolute value; for example:
SIC=(N,32)
sicntptr
The size and location of the 1- to 4-byte field that contains the pointer to the subitem count, where sicnt is one of the following:
  • An absolute size and DSECT tag of the location of the subitem count; for example:
     LI=(2,VR1SIC) 
  • A calculated size and DSECT tag of the location of the subitem count; for example:
    LI=(L'VR1SIC,VR1SIC)
  • An absolute displacement from the start of the item, expressed as (alpha,size,disp), where alpha is any alphabetic character, size is the size of the field that contains the pointer, and disp is the displacement to the pointer field. The absolute displacement to the 2-byte pointer field is 12 in the following example:
    LI=(D,2,12)
Note:
  1. When SIC is specified, the LSI parameter is required.
  2. If the FI parameter is specified and resolves to a value that cannot be relocated or pointer value, the SIC and LSI parameters must also resolve to values that cannot be relocated or pointer values.

The following table shows the specification of the TYP parameter and the requirements of the remaining parameters used with the INDEX macro.

Table 1. Specification of the TYP parameter for the INDEX macro and parameter requirements
Parameter TYP=F TYP=C TYP=V TYP=L TYP=M TYP=S
ACODE Optional Optional Optional Ignored Optional Ignored
ALTID Optional Error Optional Ignored Optional Ignored
BCH Ignored Optional Ignored Ignored Ignored Ignored
CNT Ignored Ignored Optional Optional Optional Ignored
CODE Optional Optional Optional Optional Optional Optional
CREATE Optional Ignored Optional Optional Optional Ignored
DSCR Optional Ignored Optional Optional Optional Ignored
DUPEELIM Optional Ignored Optional Optional Optional Ignored
FA Required Optional Optional Ignored Optional Ignored
FAT Optional Optional Optional Ignored Optional Optional
FCOD Optional Ignored Optional Optional Optional Ignored
FI Ignored Ignored Required Required Required Ignored
FII Ignored Ignored Optional Ignored Optional Ignored
FVN Ignored Ignored Ignored Ignored Ignored Optional
ID Optional Optional Optional Optional Optional Ignored
LI Ignored Ignored Required Required Required Ignored
LII Ignored Ignored Optional Ignored Optional Ignored
LSI Ignored Ignored Optional Optional Optional Ignored
MAC Optional Optional Optional Optional Optional Ignored
NAB Ignored Ignored Optional Optional Optional Ignored
ORD Ignored Ignored Ignored Required Ignored Ignored
RCC Optional Optional Optional Optional Optional Ignored
REG Error Error Error Error Error Error
SFA Ignored Ignored Optional Optional Optional Ignored
SI Ignored Ignored Optional Optional Optional Ignored
SIC Ignored Ignored Optional Optional Optional Ignored
SUFFIX Ignored Ignored Ignored Ignored Ignored Ignored
TLC Error Optional Error Error Error Error
Note:
Error
Parameter is not applicable and a message will be produced.
Ignored
Parameter is ignored (not required).
Required
The parameter is required.
Optional
The parameter is not required.

Entry requirements

  • This macro is required for recoup.
  • Online use of this macro is for data use only.
  • Offline use of this macro is to create BKDI records on the RCP tape.
  • Register 9 (R9) must contain the address of the ECB being processed.
  • All parameters that apply to the record structure must be specified during offline use of this macro.

Return conditions

  • Control is returned to the next sequential instruction.
  • The contents of R14 and R15 are unknown. The contents of all other registers are preserved across this macro call.

Programming considerations

  • For information about macro register conventions, see Register conventions.
  • This macro must be processed on the main I-stream.
  • This macro will be used for recoup only.
  • For all exits coded it is the users responsibility to establish addressability to the data DSECT concerned.

Examples

  • The following example shows the online use of the INDEX macro.
    INDEX REG=R7
    • REG=R7: R7 is the register to be used as the base for the DSECT specification.
  • The following example indicates that a pool address is located at some displacement in a data record by the FA parameter.
    INDEX TYP=F,FA=PD1WLP,DSCR=PWGP,ID=PW,CODE=PWCODE
    • TYP=F: File address or persistent identifier (PID) at a fixed location.
    • FA=PD1WLP: Displacement of 4-byte file address.
    • DSCR=PD1WLP: When the record is retrieved at PD1WLP, this field is a pointer to another GROUP macro that defines embedded addresses in the data record.
    • ID=PW: Record ID.
    • CODE=PWCODE: Pointer to code that is run before finding the data record at PD1WLP.
    Example:
    • TM: PD1ID1-PD1PD(R1),X'01'
    • BZ: 0(R6) not an alpha.
    • B: 8(R6) yes, find record.
    Where:
    • 0(R6): Return if conditions are not met; the item will be bypassed and the record not retrieved.
    • 8(R6): Return if conditions are met; the record will be retrieved.
    • R1: Base of record containing the pool addresses.
  • File addresses at fixed locations.
    1. TYP=F
      INDEX TYP=F,FA=PD1WLP,ID=PW,DSCR=PWGP,CODE=TEST
      • TYP=F: Branch Vector.
      • FA=PD1WLP: Displacement to file address.
      • ID=PW: ID of the record found at FA.
      • DSCR=PWGP: Displacement to descriptor for record found at FA.
      • CODE=TEST: Pointer to executable code.
    2. Explanation: CODE=TEST

    The CODE parameter is used to determine if a file address is active or present at FA.

    Example:
    TM    PD1ID1-PD1PD(R1),X'01'
    B     8(R6)                      FA is present-process
    B     0(R6)                      Not active bypass
    Note: Register 1 (R1) points to the beginning of the data record, and R6 is the return register.
  • Data Records with Standard Headers
    This covers data records with a forward chain address at location 8 in the data record and a back chain at location 12. The back chain address must be the last data record in the chain when included as the BCH parameter. Nonstandard headers may be described with this statement also.
    1. Example:
      INDEX TYP=C,ID=AT
      • TYP=C: Standard forward chain chase.
      • ID=AT: Record ID.
      Note: If the forward chain is at a location other than 8, the file address may be described with the FA parameter. However, every chain has to be at the same location described by FA. The same applies to the BCH parameter.
    2. Example:
      INDEX TYP=C,FA=TI1FOR,BCH=TI1BAC,ID=TM
      • FA=TI1FOR: The nonstandard first in the chain
      • BCH=TI1BAC: The nonstandard last in the chain
  • Standard Forward Chain Chase
    TYP=C
    1. INDEX TYP=C,ID=PR
    2. INDEX TYP=C,FA=PR0FCH,ID=PR
    3. INDEX TYP=C
    4. INDEX TYP=C,FA=PR0FCH,BCH=PR0BCH,ID=PR
    All parameters other than the TYP=C are optional with the following exceptions:
    1. If the forward chain address is at a location other than 8, the FA parameter must specify the nonstandard location.
    2. The BCH parameter is used only when the back chain field specifies the last chain. This is used to stop when a closed loop is found.
    3. The ID parameter is not used; the ID of the prime record is used to retrieve all subsequent records.
  • Groups of Embedded Pool Addresses
    The following example describes a group of embedded pool addresses with a starting location, the length of an item to be used to increment from item to item, and a method to calculate the number of items or file addresses.
    INDEX TYP=V,FI=EG0ADR,LI=L'EG0ADR,CNT=(N,261),
              ID=EO,DSCR=EOID,CODE=NOLAST
    • TYP=V: V indicates a group of embedded addresses or persistent identifiers (PIDs).
    • FI=EG0ADR: Displacement to the first item.
    • FA=0: This parameter is not coded because the items are 4 bytes in length. The FA is added to FI to calculate the final displacement to the file address. Therefore the parameter could be coded as FA=0 or it could be left out and defaulted to 0.
    • LI=L'EG0ADR: Increment to step to the next file address location.
    • CNT=(N,261): Number of file addresses is fixed at 261. N means the value 261 is used as a counter.
    • ID=EO: Record identification.
    • DSCR=EOID: Pointer to a descriptor record of the record when retrieved.
    • CODE=NOLAST: Pointer to code before indexing through the data record. R1 at this point will have the base address of the data record.
  • Groups of Addresses
    INDEX TYP=V,NAB=(2,PD1NX),FI=PD1ITM,LI=L'PD1ITM,
              FA=PD9ADD,ID=PR,CODE=PDITM,FCOD=TEST,DSCR=PNR
    • TYP=V: Branch vector.
    • NAB=(2,PD1NX): Displacement to the next available byte.
    • FI=PD1ITM: Displacement to the first item.
    • LI=L'PD1ITM: Length of one item.
    • FA=PD9ADD: Displacement from FI to the file address.
    • ID=PR: PR record ID used to retrieve the record at FA.
    • CODE=PDITM: Displacement to executable code.
    • FCOD=TEST: Displacement to executable code.
    • DSCR=PNR: Pointer to the descriptor of the record found at FA.
    Explanation:
    1. The next available byte is used to calculate the number of items to process.

      NAB-FI = 07A-03E = 2 items active

    2. CODE=PD1ITM
      • Registers:
        • R1 contains the address of the beginning of the data record
        • R6 return register
        • 0(R6) means to end processing the data record
        • 8(R6) means to continue processing the data record

      The CODE parameter is used primarily for examining a field in the data record to determine whether the data record is empty or inactive.

    3. FCOD=TEST
      • Registers:
        • R1 contains the address of the beginning of the data record
        • R14 is the address of the current item, which is incremented by the item length to find the address of next item.
        • R6 is the return register.
      Example:
      CLI   0(R2),X'80'       80=item inactive
      BO    0(R6)             Bypass this item
      B     8(R6)             Process this item
      B    16(R6)             Write item to RCP tape
      Note: The write item to RCP tape does not FIND the record from file. This is used when you do not want to find the record at this time. For PNRs, this is used with the MET switch and MET TAPE to speed up processing.
  • Groups of Addresses in Groups of Items
    INDEX TYP=V,FI=PG1LST,NAB=(2,PG1DII),LI=L'PG1LST,ID=PD,
              SIC=PG9DCT,SFA=PG9DPI,LSI=L'PG1IT2,DSCR=PNID
    • TYP=V: Branch vector.
    • FI=PG1LST: The displacement to the first item.
    • NAB=(2,PG1DII): The displacement to the next available byte.
    • LI=L'PG1LST: The length of one item.
    • ID=PD: The PD record ID used to retrieve the record.
    • SIC=PG9DCT: The displacement (relative to FI) of the count of subitems.
    • SFA=PG9DPI: The displacement (relative to FI) of the first file address.
    • LSI=L'PG1IT2: The length of the subitem.
    • DSCR=PNID: The pointer to the descriptor of the record found at the file address.
    Explanation:
    1. The first item may be at the end of a data record, which means that the length of the item (L'PG1LST) is decremented from the first item. The first item may be at the beginning of the record, which means that the length of the item is added to the FI value to process from item to item.
    2. The CODE and FCOD parameters have the same conventions as when used with the TYP=V group of addresses or persistent identifiers (PIDs).
  • Groups of Ordinal Numbers
    The following statement is used to describe data records with groups of ordinal numbers. These fixed records then, in turn, have embedded pool addresses.
    1. TYP=L
      INDEX TYP=L,FI=PQ5ITM,LI=L'PQ5SLT,ORD=(17,1,PQ9QGN),
                FCOD=TAGQC,DSCR=QCR,ID=QC,CNT=(1,PQ5CNT)
      • TYP=L: L indicates a group of ordinal numbers.
      • FI=PQ5ITML: The first item starts at PQ5ITM (a displacement from the beginning of the data record).
      • LI=L'PQ5SLT: The length of the item.
      • ORD=(17,1,PQ9QGN): 17 is the file address compute (FACE) program equate of the record type.

        1 is the length of the field containing the ordinal number.

        PQ9QGN is the displacement from the item (PQ5ITM) of the ordinal.

    2. TYP=L
      INDEX TYP=L,FI=QC1UIN,LI=L'QC1UIN,ID=QX,ORD=(#QXRNO,2,QC1UX1),
                CNT=(N,29),FCOD=QUE,DSCR=QXR
      • TYP=L: Branch vector.
      • FI=QC1UIN: The displacement to the first item.
      • LI=L'QC1UIN: The length of one item.
      • ID=QX: C'QX' ID for retrieval.
      • ORD=(#QXRNO,2,QC1UX1)
        • #QXRNO: FACE equate this record type.
        • 2: The length of the field containing an ordinal number.
        • QC1UX1: The displacement (relative to FI) of an ordinal number.
      • CNT=(N,29): The number of items is fixed at 29.
      • FCOD=QUE: The pointer to code to test if item is active.
      • DSCR=QXR: The pointer to the descriptor of the record retrieved.

    Explanation: FCOD=QUE parameter is used to examine some field relative to the beginning of each and every item. (See the previous conventions.)