SENSEG statement
Use the SENSEG statement with the database PCB statement to define a hierarchically related set of segments that an application program is sensitive to. This segment set can physically exist in one database or can be derived from several physical databases.
Include one SENSEG statement for each segment, up to a maximum of 30,000 statements in a single PSB generation. Each SENSEG statement must immediately follow the PCB statement that it is related to. All segments in the hierarchic path to any required segment must be specified.
The order that SENSEG statements are sequenced in after a PCB statement determines the logical access order for the segments. For HSAM or HISAM databases, the SENSEG statement sequence must follow the physical sequence of the segments as defined in DBD generation, unless the PROCSEQ parameter is specified in the PCB statement.
If the PROCSEQ parameter is specified in the PCB statement, the SENSEG statement sequence reflects the secondary processing sequence that is specified by that parameter. For HDAM, HIDAM, PHDAM, and PHIDAM databases, the SENSEG statements for segments on the same level do not need to be in the same order as the DBD. The order of dependent segments whose parent segment does not use hierarchic pointing can differ from the physical sequence.
When the PROCSEQD parameter is specified on a PCB statement, the SENSEG statements must be specified using the physical structure order of the primary DEDB database. Every PCB with the PROCSEQD parameter specified is counted as two PCBs toward the 2500 PCB limit per PSB generation.
If the target segment is a root segment, you specify the SENSEG segments the same way as you would for a DEDB database without a secondary index. All segments under the root segment are accessible in the entire physical structure of the primary DEDB database that is using a secondary index.
If the target segment is not a root segment, you must specify SENSEG statements for all segments that are the direct parents of the target segment along the physical path from the root segment to the target segment. Only these segments, and all children segments of the target segment, are accessible in the physical structure of the primary DEDB database when the primary DEDB database is accessed using a secondary index.
For a DEDB database, when the PROCSEQD parameter is specified on a PCB statement and the target segment is not the root segment, every SENSEG statement in the direct line from the physical root segment to the target segment must be coded. The order of the SENSEG statements must also be in physical order, even though the PROCSEQD GN processing navigates in logical order, starting from target segment going up to the root.
The format of the SENSEG statement is as follows:
.-0----. >>-SENSEG--NAME=name,PARENT=--+-name-+--------------------------> (1) >--+-------------------------------+----------------------------> '-,PROCOPT=-+-G---------------+-' +-I--+---+--+---+-+ | '-E-' '-P-' | +-R---------------+ +-D---------------+ +-A--+---+--+---+-+ | '-E-' '-P-' | '-K---------------' >--+-----------------------------+--+----------------+--------->< | .-.-----------. | '-,INDICES=list1-' | V .-r-. | | '-,SSPTR=-(---(n,-+-u-+-)-+-)-'
- These options can be selected in any combination. If you want to specify the combination of options G, I, R, and D, specify A instead.
- NAME=
- 1- to 8-alphanumeric character name of the segment type, as defined by a SEGM statement during DBD generation.
- PARENT=
- Name of the parent of this segment. Specify 1 - 8 alphanumeric
characters, or a value of 0 if this SENSEG statement defines a root
segment type as sensitive. PARENT=0 is the default.Requirement: This parameter is required for all dependent segments.
- PROCOPT=
- Valid processing options for use of this sensitive segment by
an associated application program. This parameter has the same meaning
as the PROCOPT= parameter on the PCB statement. In addition to the
valid processing options for this parameter, options can be specified
on the SENSEG statement that do not also apply to the PCB statement.
A PROCOPT of K indicates key sensitivity only. A GN call with no SSAs
can access only data-sensitive segments. If a key-sensitive segment
is designated for retrieval in an SSA, the segment is not moved to
the I/O area of the user. The key is placed at the appropriate offset
in the key feedback area of the PCB. If the PROCOPT= parameter is
not specified, the PCB PROCOPT parameter is used as default. The PROCOPT
options on the SENSEG statement override the PROCOPT options on the
PCB statement. If PROCOPT= L or LS is specified on the preceding PCB
statement, this parameter must be omitted.
Do not specify a SENSEG statement for a virtual logical child segment type if PROCOPT= L or LS is specified. The Replace and Delete functions also imply the Get function.
If PROCOPT=K is specified for a segment, an unqualified Get Next call (GN) skips to the next sensitive segment that has a PROCOPT value other than K.
The SENSEG PROCOPT option overrides the PCB PROCOPT option. If PROCOPT=E is specified in the PCB, the SENSEG PROCOPT must also specify E if it is intended to schedule exclusively for that SENSEG statement.
The N or T processing options are not valid in a SENSEG statement, only in the PCB statement.
The processing option for a DEDB sequential dependent segment must be either G or I. If one of these values is not specified on the PCB statement, PROCOPT=G or I must be specified on the SENSEG PCB statement.
If concatenated segments, the PROCOPT= parameter governs the logical child segment of the concatenated segment. The logical parent of the concatenated segment is governed by the RULES= parameter of the SEGM PCB statement.
- SSPTR=
- Subset pointer number and the sensitivity for up to eight pointers.
The subset pointer number (the first parameter) must be a value from
1 - 8. The sensitivity for the pointer (the second parameter) must
be R (read sensitive) or U (update). If the first and second parameters
are not specified, the pointer has no sensitivity. SSPTR=R is the
default.
U (update sensitivity) is not valid if the processing (PROCOPT) option is not A, R, I, or D.
- INDICES=
- Specifies which secondary indexes contain search fields that qualify SSAs for an indexed segment type. The parameter is valid only for indexed segment types. INDICES= enables SSAs of calls for the indexed segment type to be qualified on the search field of the index segment type that is contained in each specified secondary index.
You can specify up to 32 DBD names of secondary indexes. If two or more names are specified, separate the names with commas and enclose the list in parentheses.
Restrictions:- An SSA of a call for an indexed segment type cannot be qualified on the search field of a secondary index unless that secondary index is specified in the INDICES= parameter of the SENSEG statement for the indexed segment type, or in the PROCSEQ= parameter of the PCB statement.
- The INDICES= parameter is not supported for Fast Path secondary indexing.
The following figure shows the data structure of segment definition and includes segments A through F.

All of these segments are defined within one DBD. (Do not specify INDICES= on a SENSEG PCB statement if you specified PROCOPT=L, LS, I, or D on the preceding PCB statement.)
The complete PCB and SENSEG statements for the data structure can be written as follows:
Col. 10 Col. 16 72.
PCB TYPE=DB,DBDNAME=DATABASE, X
PROCOPT=A,KEYLEN=22
SENSEG NAME=A,PARENT=0,PROCOPT=G
SENSEG NAME=B,PARENT=A,PROCOPT=G
SENSEG NAME=C,PARENT=B,PROCOPT=I
SENSEG NAME=D,PARENT=A,PROCOPT=A
SENSEG NAME=E,PARENT=D,PROCOPT=G
SENSEG NAME=F,PARENT=D,PROCOPT=A