SSAs and command codes
SSAs can also include one or more command codes, which can change and extend the functions of DL/I calls.
For information on DL/I command codes, see Command code reference.
IMS always returns the lowest segment in the path to your I/O area. If your program codes a D command code in an SSA, IMS also returns the segment described by that SSA. A call that uses the D command code is called a path call.
GU
call
that retrieves segment F and all segments in the path to F in the hierarchy shown in
the following figure. 
GU Abbbbbbb
*D
Cbbbbbbb
*D
Ebbbbbbb
Fbbbbbbb
A command code consists of one letter. Code the command codes in the SSA after the segment name field. Separate the segment name field and the command code with an asterisk, as shown in the following table.
SSA Component | Field Length |
---|---|
Seg Name | 8 |
* | 1 |
Cmd Code | Variable |
b | 1 |
Your program can use command codes in both qualified and unqualified SSAs. However, command codes cannot be used by MSDB calls. If the command codes are not followed by qualification statements, they must each be followed by a 1-byte blank. If the command codes are followed by qualification statements, do not use the blank. The left parenthesis of the qualification statement follows the command code instead, as indicated in the following table.
SSA Component | Field Length |
---|---|
Seg Name | 8 |
* | 1 |
Cmd Code | Variable |
( | 1 |
Field name or, if the O cmd code is specified, |
8 |
Relational Operator (R.O.) | 2 |
Field Value | Variable |
) | 1 |
By giving IMS the field position within the segment and the value of the field you are looking for, the field position and the value are connected by a relational operator which tells IMS how you want the two to be compared. The field position can be either a searchable field name as defined in the DBD or a position and length when using command code O.
If your program uses command codes to manage subset pointers in a DEDB, enter the number of the subset pointer immediately after the command code. Subset pointers are a means of dividing a chain of segment occurrences under the same parent into two or more groups or subsets. Your program can define as many as eight subset pointers for any segment type. Using an application program, your program can then manage these subset pointers.