DDS for physical and logical files


SST (Substring) keyword--logical files only

Use this field-level keyword to specify a character string that is a subset of an existing character, hexadecimal, zoned field, or graphic.

The format of the keyword is:

SST(field-name starting-position [length])

The field-name parameter specifies the name of the field from which the substring is taken. This field must be defined in the same logical file format prior to the SST field (which is the field you are defining) or it must exist in the physical file specified on the PFILE or JFILE keyword. To find the field, the system searches for a matching field name as follows:

  1. First, the system searches the field names specified in positions 19 to 28 in the logical file format prior to the SST field.
  2. If no matching field name is found in positions 19 to 28 in the logical file format, the system searches for the field name in the physical file specified on the PFILE or JFILE keyword, according to the following rules:

The substring begins at the starting position you specify on the SST keyword. Specify its length either as the third parameter on the keyword or on the field length (DDS positions 30 through 34). The starting position is a required parameter; the length is optional.

Note:
Both the starting position and length values must be positive integer values and the defined substring must not be greater than the length of the field specified on the SST keyword.

The following rules apply:

Examples:

The following examples show how to specify the SST keyword.

The following example shows how to specify the SST keyword on a join logical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R RECORD1                   JFILE(PF1 PF2)
     A          J                           JOIN(1 2)
     A                                      JFELD(CITY CITY)
     A            ADDRESS                   JREF(2)
     A            CITY               I      SST(ADDRESS 21 10)
     A                                      JREF(2)
     A            SYEAR              I      SST(SALESDATE 5)
     A            NAME                      JREF(1)
     A            CUSTNAME           I      SST(NAME 11 10) JREF(2)
     A          K SYEAR
     A

This example shows:

The following example shows how to specify the SST keyword on a simple or multiple format logical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A          R REC1                      PFILE(PFA)
     A            LASTNAME           I      SST(NAME 10 10)
     A          K LASTNAME
     A

The LASTNAME field is a substring of NAME from PFA. The usage I in position 38 must be specified for SST fields in simple or multiple format logical files.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]