Segment Cross-Reference records

This topic describes the optional Segment Cross-Reference records.

Before attempting to use these functions, you should read the preceding topics so that you understand the purpose of each Unload/DB Load functions and how it relates to other functions.

Situations in which a Segment Cross-Reference File is required

A Segment Cross-Reference File is required in the following circumstances:

  • When segment names in the target database are different from the comparable segments in the unloaded database
  • When selected segments are not to be processed
  • When not all segments are to be processed in the same manner
  • When the segment format in the target database is different from the comparable segment in the unloaded database

Here are some conditions and characteristics about the Segment Cross-Reference records:

  • All segments defined in the DURDBDFN data set must be described in the Segment Cross-Reference records.
  • If the Segment Cross-Reference Records are not used, comparable data is extracted from the database definition record (DURDBDFN) for DEDB unloads, or from a combination of the header and segment records for an HD unload. However, DURDBDFN records may be IMS level dependent. If the necessary data from the DURDBDFN record is captured via using the SEGXREFO CNTLCRDS control keyword, processing can be driven during subsequent executions of DEDB Unload/DB Load by the Segment Cross-Reference Records.
  • In addition, some of the function afforded by the Segment Cross Reference Keywords is only available if the Segment Cross-Reference Records are used.
  • If the CNTLCRDS keyword SEGXREFI is encountered, Segment Cross-Reference Records are read from the SEGXREFI data set.
  • If the CNTLCRDS keyword SEGXREFO is encountered, Segment Cross-Reference Records are written to the SEGXREFO data set.
  • If segment format (variable length or fixed length) is different between the source database segment and the target database segment, then you must specify the SEGXREFI option and you must provide the segment cross reference records.
  • Segment Cross-Reference Records are 80-byte fixed-length.
  • Comment statements may be specified with an asterisk (*) in column 1.
  • Blank records are not allowed.
  • There is a fixed format and variable format area of these records.
  • The Fixed Format area contains column-specific variables.
  • The Variable Format Area may contain Segment Cross-Reference keywords.

Example of a Segment Cross-Reference table

The following figure shows an example of a Segment Cross-Reference table.

Figure 1. Example of a Segment Cross-Reference table
001 001 000 SEGMENT1 V F   00044 00000 00000
002 002 001 SEGMENT2 V   S 00044 00000 00000
003 002 001 SEGMENT3 V     00044 00000 00000 GHU
004 002 001 SEGMENT4 V     00044 00000 00000 REPL
005 002 001 SEGMENT5 V     00044 00000 00000
006 002 001 SEGMENT6 V     00044 00000 00000
007 002 001 SEGMENT7 V     00044 00000 00000 BYPASS
008 002 001 SEGMENT8 V     00044 00000 00000

The format of the Segment Cross-Reference Table is as follows:

  • Fixed Format Area
    Position
    Definition
    1-3
    Segment code
    4
    Not used
    5-7
    Level of this segment in the hierarchy
    8
    Not used
    9-11
    Segment code of the parent segment
    12
    Not used
    13-20
    Segment name
    21
    Not used
    22
    Source record format of the segment
    23
    Not used
    24
    Target record format of the segment
    25
    Not used
    26
    Type of the segment
    27
    Not used
    28-32
    Starting position of the segment in the unload file
    33
    Not used
    34-38
    Minimum length of the segment
    39
    Not used
    40-44
    Maximum length of the segment
    45
    Not used
  • Variable Format Area
    Position
    Definition
    46
    Beginning of the area in which Segment Cross-Reference keywords can be coded

Fixed format area

There are multiple fields in the Fixed Format Area:

  1. Seg Code Id

    This is a 3-character numeric field which corresponds to the segment code assigned to a segment during DBD generation.

    If Segment Cross-Reference Records are being generated by use of the SEGXREFO CNTLCRDS keyword, this field will be initialized with the seg code ID from one of the following sources:

    • The DURDBDFN data set, if INPUT=FP or INPUT=TFMT is specified
    • The HD Reorganization Unload/Reload unload file, if INPUT=FF is specified
    Restrictions:
    • This field must begin in column 1. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values.
  2. Level in Hierarchy

    This is a 3 character numeric field which corresponds to the level in the hierarchy for this segment.

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO CNTLCRDS keyword, this field will be initialized with the hierarchy level from one of the following sources:

    • The DURDBDFN data set, if INPUT=FP or INPUT=TFMT is specified
    • The HD Reorganization Unload/Reload unload file, if INPUT=FF is specified
    Restrictions:
    • This field must begin in column 5. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values.
  3. Parent Seg Code Id

    This is a 3 character numeric field which corresponds to the segment code assigned to the parent of this segment during DBD generation.

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO CNTLCRDS keyword, this field will be initialized with the hierarchy level from one of the following sources:

    • The DURDBDFN data set, if INPUT=FP or INPUT=TFMT is specified
    • The HD Reorganization Unload/Reload unload file, if INPUT=FF is specified
    Restrictions:
    • This field must begin in column 9. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values.
  4. Seg Name

    This is an 8-character name that corresponds to the segment name contained in the DBD.

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO CNTLCRDS keyword, this field will be initialized with the seg name from one of the following sources:

    • The DURDBDFN data set, if INPUT=FP or INPUT=TFMT is specified
    • The HD Reorganization Unload/Reload unload file, if INPUT=FF is used

    This Seg name is used in the DL/I call to the target database when the Segment Cross-reference file is being used as input. When the Segment Cross-Reference records are used as input, the Seg names must match the names of the target segments in the database being loaded. Once the Segment Cross-Reference records have been created, the Seg name associated with each record can be changed from the name with which it was generated (source segment) to the name of the segment in the target database.

    Restriction:

    This field must begin in column 13.

  5. Source Record Format
    This is a single character that describes the record format of the database segments as they are in the unload file. The character must be:
    F
    If the segment is fixed length
    V
    If the segment is variable length

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO CNTLCRDS keyword, this field will be initialized to the following:

    • If INPUT=FP or INPUT=TFMT is specified, the format will be determined by the contents of the DURDBDFN record.
    • If INPUT=FF is specified, the source record format will be determined from the unload records themselves.
    Restriction:

    This field must be in column 22.

  6. Target Record Format
    This is a single character that describes the record format of the database segments as they are to be loaded in the target database. The character must be:
    F
    If the segment is fixed length
    V
    If the segment is variable length
    blank
    If you want to use the same value as the source record format

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO this field will be initialized to the corresponding source record format.

    The Record Format field is used to determine whether fixed or variable length segments are loaded to the target database.

    At execution time, if this field is blank, the source record format specification will be used for the target record format. An incorrect specification will result in message FABC0919W.

    Restriction:

    This field must be in column 24.

  7. Record Type
    This is a single character name that identifies the type of segment as one of the following:
    S
    If the segment is an SDEP segment
    U
    If the segment is an unkeyed segment
    blank
    If the segment is not an SDEP segment or an unkeyed segment

    The record type may restrict certain types of processing in FABCUR9:

    • FABCUR9 does not support the load of SDEP physical segments.
    • FABCUR9 does not support update-type processing on unkeyed segments.

      REPL or GHU type processing requested for an unkeyed segment will result in message FABC0929E or FABC0930E. Processing will terminate with condition code 8.

    Restrictions:
    • This field must be in column 26.
    • The information related to whether a segment is keyed or not is not available in an HD unload. Consequently, during SEGXREFO processing of an HD unload file, the value for this field cannot be determined. In this case, the field is set to hex zeros ('00'X). The field must be changed to the appropriate value before the segment cross-reference file created in this manner can be used as subsequent input.
  8. Data Starting Position

    This is a 5-character numeric which identifies the position in the unload record at which the segment data begins.

    If Segment Cross-Reference Records are being generated via use of the SEGXREFO CNTLCRDS keyword, this field will be initialized to the location of the data in the unload records.

    Restrictions:
    • This field must be in column 28. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values.
  9. Minimum Length

    This is a 5 character numeric which describes the minimum length of the data associated with the segment.

    Restrictions:
    • This field must be in column 34. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values; however, the content is not used.
  10. Maximum Length

    This is a 5 character numeric which describes the minimum length of the data associated with the segment.

    Restrictions:
    • This field must be in column 40. It need not be padded with zeros; however, it must be right-aligned.
    • This field must contain only numeric values; however, the content is not used.

Variable Format Area—Segment Cross-Reference keywords

The Variable Format Area of the Segment Cross-Reference records may contain Segment Cross-Reference keywords.

Segment Cross-Reference keywords influence additional functions to be performed other than inserting unload records onto the database.

Segment Cross-Reference keywords are optional. If they are omitted, the optional action will not be performed.

Segment Cross-Reference keywords are free form and are coded within the boundaries of columns 46 through 80, subject to the following syntactical rules:

  1. Keywords may start in any column.
  2. There can be no intervening blanks between keywords indicating a data value and the value itself.
  3. Two or more keywords are separated by either:
    • a comma
    • one or more blanks
    • a comma and one or more blanks
  4. Keywords and their associated values cannot span or continue on multiple Segment Cross-Reference Records.

Unless specified, none of the Segment Cross-Reference Keywords and/or keywords are case sensitive.

The Segment Cross-Reference keywords are the following:

GHU
This keyword specifies that a GHU call should be issued for this segment in anticipation of a REPL call for all segments where the 'II' status code was returned from an DL/I ISRT call.

The GHU keyword is optional. If omitted, it defaults to no such action. However, if the REPL keyword is used, the GHU keyword is implied, and the specified action will be performed even though the GHU keyword is not explicitly specified.

It is recommended to code GHU in those instances where duplicate records are expected on the database. GHU will ensure that positioning in the database is retained.

Restriction:

None.

BYPASS
This keyword specifies that no attempt should be made to update this segment.

It is very useful if the PSB being used for a database update does not have sensitivity to certain segments. The BYPASS keyword will ensure that no attempt is made to access these segments, assuming that these segments are not parents of other segments for which processing is desired.

The BYPASS keyword is optional. If omitted, it defaults to no such action.

Restriction:

The BYPASS keyword should not be specified for a segment if the processing of segments dependent upon this segment is required. Correct positioning in the database may not be achieved if BYPASS is coded for segments in the hierarchical chain.

NOREP
This keyword specifies that no attempt should be made to replace this segment.

The NOREP keyword is optional. It is used to override a REPL setting should this setting be propagated to this segment via the presence of the REPL CNTLCRDS Global Action keyword.

Unlike with the BYPASS keyword, DL/I calls are issued for segments with the NOREP keyword; however, REPL processing will not occur for such segments.

Restriction:

None.

REPL
This keyword specifies that a REPL call should be issued for this segment for all segments where the 'II' status code was returned from an DL/I ISRT call.

The REPL keyword is optional. If omitted, it defaults to no such action. When REPL is specified, the DL/I REPL call will be preceded by the appropriate GHU DL/I call.

Restriction:

None.