Previous Topic: LOGICAL PARENT FIELD statementNext Topic: LOGICAL SEQUENCE FIELD statement


PHYSICAL PARENT FIELD statement

This format of the FIELD statement defines the physical parent concatenated key field for the record corresponding to the logical child segment. A physical parent concatenated key is a symbolic pointer to the logical parent. LOGICAL PARENT FIELD and PHYSICAL PARENT FIELD statements (used to define the logical parent concatenated key field) are both required when the named record corresponds to a logical child segment.

Syntax

►►─┬─────────────────────────────────────────────────────────────────┬───────►
   └─ PHYSical PARENT CONCATenated KEY FIELD name is dl1-field-name ─┘

 ►─┬─────────────────────────────┬───────────────────────────────────────────►
   └─ STORED ─┬── PHYSically ◄───┤
              └── VIRTually ─────┘

 ►─┬──────────────────────────────────────────┬──────────────────────────────►
   └─ STARTING POSition is starting-position ─┘

 ►─┬──────────────────────────────┬──────────────────────────────────────────►◄
   └─ LENgth is dl1-field-length ─┘

Parameters

PHYSical PARENT CONCATenated KEY FIELD name is dl1-field-name

Specifies the name by which the concatenated key to the physical parent is defined to CA IDMS/DB. Any 1- to 8-character name can be used for the dl1-field-name, since this name serves only as a filler.

Make sure that the name selected for dl1-field-name is not used to define any other field for the named record.

STORED PHYSically/VIRTually

Specifies whether the physical parent concatenated key is stored with the record corresponding to the logical child segment or is built by the CA IDMS DLI Transparency run-time interface.

PHYSically

Specifies that the physical parent concatenated key is stored with the record equivalent of the logical child segment.

The default is PHYSICALLY. The following considerations apply to the use of this option:

Relationship

What to specify

When the named record corresponding to the logical child segment is participating in a bidirectional physical logical relationship.

In such cases, CA IDMS DLI Transparency requires that the logical relationship be made to appear as a bidirectional virtual logical relationship. As described above (in the STORED PHYSICALLY syntax rules under LOGICAL PARENT FIELD Statement), one of the logical child segments must be treated as the real logical child segment, and the other segment must be assigned as the virtual logical child segment. If PHYSICAL or P is entered in this parameter, specify PHYSICAL in the IPSB clause.

STORED PHYSICALLY.

If either of the destination parent concatenated key fields is stored physically, make that field the first physical field in the record.

If both destination parent concatenated key fields are stored physically (see the discussion of STORED PHYSICALLY/VIRTUALLY under "LOGICAL PARENT FIELD Statement"), they must be the first two physical fields in the record. These fields, however, can be preceded by the halfword-length field if the record is a variable-length record. If PHYSICALLY is specified, the STARTING POSITION clause (see below) must be included in the FIELD statement.

VIRTually

Specifies that the physical parent concatenated key is absent from the record corresponding to the logical child segment and is built by the CA IDMS DLI Transparency run-time interface. The use of this option for the segment corresponding to the named record depends on the type of logical relationship defined in the relevant DBDs, as follows:

Relationship

What to specify

For unidirectional logical relationships and bidirectional virtual logical relationships

VIRTUALLY

For bidirectional physical logical relationships, CA IDMS DLI Transparency requires that one logical child segment be treated as the real logical child segment, and the other logical child segment be treated as the virtual logical child segment. (See the discussion of STORED PHYSICALLY under LOGICAL PARENT FIELD Statement.)

If the entry in the PARENT parameter of the SEGM statement defining the segment that is being treated as the virtual logical child segment specifies VIRTUAL or V

VIRTUALLY

If VIRTUALLY is specified, the STARTING POSITION clause must be omitted.

STARTING POSition is starting-position

Specifies the position in the record in which the concatenated key field begins, where the record begins in position 1. Omit this clause if STORED VIRTUALLY is specified for the named field.

Relationship

What to specify

If STORED PHYSICALLY is specified only for the named field (that is, only for the LOGICAL PARENT CONCATENATED KEY field)

Specify START POSITION IS 1.

If both the named field and the LOGICAL PARENT CONCATENATED KEY field are stored physically, one of the fields will have a START POSITION of 1. The other field will begin in the next available byte after its complement concatenated key field is stored.

When both concatenated key fields are stored physically and the record is a variable-length record, add 2 to the START POSITION to allow for the halfword containing the length of the record.

LENGTH IS dl1-field-length

Specifies the length of the concatenated key to the physical parent.

To determine the entry for this clause, first find the DL/I FIELD statements that define the sequence fields of the physical parent segment and of those segments in the physical parent's hierarchical path to the root segment. Add the BYTES clause entries in these FIELD statements. The result is the entry for dl1-field-length.