Unloaded segment records layout

Unloaded area records are created by the FPA Unload function and the FPB Unload utility.

For the format of the unloaded segment records that were created during an Unload process with FORMAT=USER specification, see Extracted records layout.

This topic contains product sensitive programming interface information.

Begin product-sensitive programming interface information.

You can use the HFPZUSR macro (FPA), the FABCMUSR macro (FPB), or the UR#MUSR0 (IMS DBT 2.1 compatibility) macro to map these records.

Record layout of the unloaded segment records

The following table shows the record layout, which is a product-sensitive programming interface.

Table 1. Record layout of the unloaded segment records
Field name Assembly code definition Description
"RDW" fields
USRRDW H H RDW "LL" field
RDW "ZZ" field
Sort key part of record
USRA# H Area number
USRRAP XL4 RAP
RBA
USRLCFLG X "Insert Limit Count" Flag
X'00': Twin not greater than limit
X'FF': Twin greater than limit
USRRKL XL2 ROOT segment key length
USRRKV XLnn ROOT segment key value

nn is the length of the root segment key field

USRLCG# XL2 "Insert Limit Count" group
USRSCSQ2 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 2 Direct Dependent segments (binary zeros for Root Segment).
  • First byte is seg-code of the segment in this Segment data record
  • Second-forth bytes are a sequential counter of the occurrence of this segment type within this database record
USRSCSQ3 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 3 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ4 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 4 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ5 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 5 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ6 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 6 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ7 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 7 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ8 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 8 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ9 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 9 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQA XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 10 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQB XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 11 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQC XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 12 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQD XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 13 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQE XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 14 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQF XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 15 Direct Dependent segments (binary zeros for Root Segment).
DATA PORTION OF RECORD
USRPFLG1 X Processing Flag 1
X'01': More Segs on Twin Chain (But 'ISRT LIMCT'Reached)
X'02': Unloaded Seg is compressed.
X'04': Fixed-length segment (see note).
USRSEGCD H Segment Code
USRSHLVL H Hierarchical level of segment
USRPSCD H "Hier. Parent's Seg Code"
  • First child segment: Hierarchical parent's segment code.
  • Second or subsequent child segment: Segment code of the segment itself.
USRPFLG2 X Processing Flag 2
Bit(s) set if segment is target of a Subset pointer. Bits are set left to right for pointers 1 - 8
Blank X 1 byte filler
USRSDATA XLnnn Segment Data

First two bytes of USRSDATA are the length of the segment

Note: The first two bytes of USRSDATA are the length of the segment that was generated by the IMS system. From the viewpoint of application program, the first two bytes must be removed to get actual data.

Record layout of the area information records

For each unloaded area, there is a special unloaded record called area information record. The following table shows this record layout, which is a product-sensitive programming interface.

When AREA_INFORMATION_RECORD=NO or NO_RELOADABLE is specified for the FPA Unload function, or AREC=N is specified for the FPB Unload utility, no area information record is generated in the unloaded segment record data set.

Table 2. Record layout of the area information records
Field name Assembly code definition Description
"RDW" fields
USRRDW H H
RDW "LL" field
RDW "ZZ" field
Sort key part of record
USRA# H Area number
USRRAP XL4 X'00000000'
USRLCFLG X X'00'
USRRKL XL2 ROOT segment key length
USRRKV XLnn ROOT segment key value

nn is the length of the root segment key field

USRLCG# XL2 X'0000'
USRSCSQ2 XL1,XL3 X'00',X'000000'
USRSCSQ3 XL1,XL3 X'00',X'000000'
USRSCSQ4 XL1,XL3 X'00',X'000000'
USRSCSQ5 XL1,XL3 X'00',X'000000'
USRSCSQ6 XL1,XL3 X'00',X'000000'
USRSCSQ7 XL1,XL3 X'00',X'000000'
USRSCSQ8 XL1,XL3 X'00',X'000000'
USRSCSQ9 XL1,XL3 X'00',X'000000'
USRSCSQA XL1,XL3 X'00',X'000000'
USRSCSQB XL1,XL3 X'00',X'000000'
USRSCSQC XL1,XL3 X'00',X'000000'
USRSCSQD XL1,XL3 X'00',X'000000'
USRSCSQE XL1,XL3 X'00',X'000000'
USRSCSQF XL1,XL3 X'00',X'000000'
FORMAT AND SDEP INFORMATION
USRFMTID USRLCFLG+5,XL2
Format type
C'TR': Trimmed format
null: DBT format
USRSDEP USRLCFLG+7,XL2
SDEP option
C'LO': SDEP=LOGICAL
C'PH': SDEP=PHYSICAL change
C'PN': SDEP=PHYSICAL accompanied by a DBD change (FPB only)
null: SDEP=NO
USRSDLB USRLCFLG+9,XL8 SDEP Logical Begin
USRSDLE USRLCFLG+17,XL8 SDEP Logical End
USRSDTM USRLCFLG+25,XL8 SDEP begin timestamp
USRSDFS USRLCFLG+33,XL4 SDEP block # of first SDEP
USRSDFB USRLCFLG+37,XL4 SDEP block # of beyond SDEP
Data portion of record
USRPFLG1 X X'00'
USRSEGCD H H'0'
USRSHLVL H H'0'
USRPSCD H H'0'
USRPFLG2 X X'00'
Blank X X'00'

If the unloaded area is empty, there is an area information record but no unloaded area record for the area.

Record layout of the DBD information records

The following tables show the records layout for the DBD information records in the USR files. These tables contain product-sensitive programming interface information.

The DBD information records are written into the USR files by the Unload process when ACBCHK=YES is specified. You can use the HFPZUSR macro (FPA) to map these records.

Table 3. Record layout of the first DBD information records
Field name Assembly code definition Description
USRRDW H H
RDW "LL" field
RDW "ZZ" field
USRA# H X'0000'
USRDBDFG XL2
DBD record type flag
X'0001': The first record
USRDBDLL H Length of DBD data part
USRDBDVR XL2 DBD information version
USRRCCNT F DBD records counter
USRACBDS XL44 ACB DSNAME
If the IMS management of ACBs is enabled, this field contains either of the following values:
  • *IMS DIRECTORY (CURRENT), if IMSCATACB_INPUT=CURRENT is specified.
  • *IMS DIRECTORY (PENDING), if IMSCATACB_INPUT=PENDING is specified.
USRDBDSZ F Size of DBD information
USRDDTAD A Address of UNLOAD DDT
USRINFO 3F Unload information
Table 4. Record layout of the second and subsequent DBD information records
Field name Assembly code definition Description
USRRDW H H
RDW "LL" field
RDW "ZZ" field
USRA# H X'0000'
USRDBDFG XL2
DBD record type flag
X'0002': The second record
USRDBDLL H Length of DBD data part
USRDBD XLnn DBD data part
Table 5. Record layout of the end DBD information record
Field name Assembly code definition Description
USRRDW H H
RDW "LL" field
RDW "ZZ" field
USRA# H X'0000'
USRDBDFG XL2
DBD record type flag
X'FFFF': The end record
USRDBDLL
H
XL2
Length of DBD data part
(reserved)
USRRCCNT F DBD records counter

Record layout of the empty area records

The following table shows the record layout for the empty area record in USR files. This table contains product-sensitive programming interface information.

Table 6. Record layout of the empty area records
Field name Assembly code definition Description
"RDW" fields
USRRDW H H RDW "LL" field
RDW "ZZ" field
Sort key part of record
USRA# H Area number
USRRAP XL4 X'FFFFFFFF'
USRLCFLG X X'00'
USRBCF XL2 ROOT key len + USRSCSQT size
USRRKL XL2 ROOT segment key length
USRRKV XLnn ROOT segment key value (All X'FF')
Subsequent items XLnn (All X'FF')
An empty area record is written to the USR file by the Unload process only when all of the following conditions are met:
  • AREA_INFORMATION_RECORD=NO_RELOADABLE (FPA Unload function) or AREC=N (FABCUR1)
  • FORMAT=TFMT
  • LRECL=SEGTFMT
  • The area is empty
  • No SDEP information record is created

Record layout of the SDEP information records

The following table shows the record layout for the SDEP information record in USR files. This table contains product-sensitive programming interface information.

Table 7. Record layout of the SDEP information records
Field name Assembly code definition Description
"RDW" fields
USRRDW H H RDW "LL" field
RDW "ZZ" field
Sort key part of record
USRA# H Area number
USRRAP XL4 RAP
RBA
USRLCFLG X "Insert Limit Count" Flag
X'00': Twin not greater than limit
X'FF': Twin greater than limit
USRRKL XL2 ROOT segment key length
USRRKV XLnn ROOT segment key value

nn is the length of the root segment key field

USRLCG# XL2 "Insert Limit Count" group
USRSCSQ2 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 2 Direct Dependent segments (binary zeros for Root Segment).
  • First byte is seg-code of the segment in this Segment data record
  • Second-forth bytes are a sequential counter of the occurrence of this segment type within this database record
USRSCSQ3 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 3 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ4 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 4 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ5 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 5 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ6 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 6 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ7 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 7 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ8 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 8 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQ9 XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 9 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQA XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 10 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQB XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 11 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQC XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 12 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQD XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 13 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQE XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 14 Direct Dependent segments (binary zeros for Root Segment).
USRSCSQF XL1,XL3 Segment code and segment sequence number. Field for Hierarchical Level 15 Direct Dependent segments (binary zeros for Root Segment).
DATA PORTION OF RECORD
USRPFLG1 X Processing Flag 1
X'01': More Segs on Twin Chain (But 'ISRT LIMCT'Reached)
X'02': Unloaded Seg is compressed.
X'04': Fixed-length segment (see note).
USRSEGCD H Segment Code
USRSHLVL H Hierarchical level of segment
USRPSCD H "Hier. Parent's Seg Code"
  • First child segment: Hierarchical parent's segment code.
  • Second or subsequent child segment: Segment code of the segment itself.
USRPFLG2 X Processing Flag 2
Bit(s) set if segment is target of a Subset pointer. Bits are set left to right for pointers 1 - 8
Blank X 1 byte filler
USRSDATA XLnnn SDEP information

First two bytes of USRSDATA are the length of the SDEP information

USRSPHFS USRSDATA+2,4 SDEP block # of first SDEP
USRSPHFB USRSDATA+2+4,4 SDEP block # of beyond SDEP
USRSPHLB USRSDATA+2+8,8 SDEP Logical Begin
USRSPHLE USRSDATA+2+16,8 SDEP Logical End
USRSPHTM USRSDATA+2+24,8 SDEP begin timestamp
An SDEP information record is written to the USR file by the Unload process only when all of the following conditions are met:
  • AREA_INFORMATION_RECORD=NO_RELOADABLE (FPA Unload function) or AREC=N (FABCUR1)
  • SDEP=PHYSICAL
  • SDEP is defined in the DBD definition
The SDEP information record is written before unloaded SDEP segment records.

End product-sensitive programming interface information.