This format of the FIELD statement defines the logical parent concatenated key field for a record corresponding to a logical child segment. A logical parent concatenated key is a symbolic pointer to the logical parent.
LOGICAL PARENT FIELD statements and PHYSICAL PARENT FIELD statements (for defining the physical parent concatenated key field) are both required when the named record corresponds to a logical child segment.
Syntax
►►─┬────────────────────────────────────────────────────────────────┬────────► └─ LOGical PARENT CONCATenated KEY FIELD name is dl1-field-name ─┘ ►─┬─────────────────────────────┬───────────────────────────────────────────► └─ STORED ─┬── PHYSically ◄───┤ └── VIRTually ─────┘ ►─┬──────────────────────────────────────────┬──────────────────────────────► └─ STARTING POSition is starting-position ─┘ ►─┬──────────────────────────────┬──────────────────────────────────────────►◄ └─ LENgth is dl1-field-length ─┘
Parameters
Specifies the name by which the concatenated key to the logical parent segment is defined to DL/I. Any 1- to 8-character name can be used for the dl1-field-name, since this name serves only as a filler.
Ensure that the name selected for dl1-field-name is not used to define any other field for the named record.
Specifies whether the logical parent concatenatecd key is stored with the record corresponding to the logical child segment or is built by the CA IDMS DLI Transparency run-time interface.
Specifies that the logical parent concatenated key is stored with the record corresponding to the logical child segment. 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 |
|---|---|
|
Unidirectional and bidirectional virtual logical relationships |
If PHYSICAL or P is specified on the SEGM statement PARENT parameter defining the real logical child segment, specify PHYSICALLY. |
|
For bidirectional physical logical relationships, the relationship must appear like a bidirectional virtual logical relationship. Choose one logical child segment to represent the real logical child segment and the other to represent the logical virtual child segment. Hence, the parent of the assigned real logical child segment is considered the physical parent segment; the parent of the assigned virtual logical child segment is considered the logical parent segment. |
If the entry in the PARENT parameter of the SEGM statement defining the segment assigned as the real logical child segment is PHYSICAL or P, specify PHYSICALLY. |
The default for this IPSB clause is PHYSICALLY.
If either of the destination parent concatenated key fields is STORED PHYSICALLY, that field must be the first field in the record.
If both destination parent concatenated key fields are STORED PHYSICALLY (see note below), they must be the first two fields in the record. These 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.
Specifies that the logical parent concatenated key is absent from the record corresponding to the logical child segment and is built by the 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 |
|---|---|
|
Unidirectional and bidirectional virtual logical relationships |
Specify VIRTUALLY if VIRTUAL or V is specified in the PARENT parameter of the SEGM statement defining the real logical child segment. |
|
For bidirectional physical logical relationships, the relationship must appear as a bidirectional virtual logical relationship, as described under bidirectional physical logical relationships above. |
If the entry in the PARENT parameter of the SEGM statement defining the segment assigned as the real logical child segment is VIRTUAL or V, specify VIRTUALLY. If VIRTUALLY is specified, you must omit the STARTING POSITION clause. |
Note: Although DL/I bidirectional virtual relationships permit only the logical parent concatenated key to be stored physically in the logical child, CA IDMS DLI Transparency allows either one or both of the concatenated keys to be stored physically or virtually.
Specifies the position in the record in which the concatenated key field begins, where the record begins in position 1. What you specify on this clause depends upon what you specified on the STORED VIRTUALLY/PHYSICALLY clause:
|
STORED VIRTUALLY/PHYSICALLY clause |
STARTING POSITION clause |
|---|---|
|
If STORED VIRTUALLY is specified for the named field |
Don't include it for the named field. |
|
If STORED PHYSICALLY is specified only for the named field (that is, only for the LOGICAL PARENT CONCATENATED KEY field) |
START POSITION IS 1. |
|
If both the named field and the PHYSICAL PARENT CONCATENATED KEY field (PHYSICAL PARENT FIELD statement) are STORED PHYSICALLY |
One of the two 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. For example, assume that the length of the concatenated key for the physical parent is 15 and the STARTING POSITION entered in the IPSB for the PHYSICAL PARENT is 1. Therefore, the LOGICAL PARENT KEY field has a START POSITION of 16. |
|
When both concatenated keys are stored physically and the record is a variable length record |
Perform the above calculations and add 2 to the start position to allow for the halfword containing the length of the record. |
Specifies the length of the concatenated key for the logical parent.
To determine the entry for this clause, first find the DL/I FIELD statements that define the sequence fields of the logical parent segment and of those segments in the logical parent's hierarchical path to the root segment. Add the BYTES clause entries in these FIELD statements.
Usage
The Length of the Concatenated Key for the Logical Parent
To calculate the length of the concatenated key for the logical parent, assume the DBD has the following entries from the root segment through the sequence field of the logical parent segment:
SEGM NAME=SEGRT,PARENT=0,BYTES=31,PTR=TWINBWD FIELD NAME=(FIELD1,SEQ,U),BYTES=21,START=,TYPE=C FIELD NAME=FIELD2,BYTES=10,START=22 SEGM NAME=LPSEG,PARENT=SEGRT,BYTES=20,PTR=TWINBWD FIELD NAME=(FIELD3,SEQ,U),BYTES=60,START=1,TYPE=C
In this example, the sum of the sequence fields (FIELD1 and FIELD3) is 81, which is the value entered in the LENGTH clause of the IPSB FIELD statement. For more details, see Figure 36.
|
Copyright © 2013 CA.
All rights reserved.
|
|