VALUES (Values) keyword for physical and logical files

Specify this keyword at the field level, the select/omit-field level, or both.

The format of the keyword is:
VALUES(value-1 [value-2...[value-100]])

Examples

The following examples show how to specify the VALUES keyword.

Example 1

The following example uses character and numeric values.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RECORD1                   PFILE(PF1)
00020A            FIELDA         1  0       VALUES(1 6 9)        1
00030A            FIELDB         1          VALUES('A' 'B' 'C')  1
00040A          K FIELDA
00050A          S FIELDB                    VALUES('A' 'B')      2
00060A          S FIELDA                    VALUES(1 6)          2
     A
1
VALUES is specified for FIELDA and FIELDB as a validity checking keyword for display files that refer to FIELDA and FIELDB.
2
VALUES is also specified for FIELDA and FIELDB as a select/omit keyword. Records from the physical file PF1 are retrieved through this logical file record format depending on the values of the following fields:
  • FIELDB: Records are selected only when FIELDB equals A or B.
  • FIELDA: Records not already selected are selected when FIELDA equals 1 or 6.

Example 2

The following example uses hexadecimal values.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A          R RCD1                      PFILE(PF1)
00020A            CODEA
00030A            FLD1
00040A            FLD2
00050A          K FLD1
00060A          S CODEA                     VALUES(X'51' X'54' X'AE')
     A

VALUES is specified as a select/omit keyword for CODEA (which is a 1-byte field). Records from physical file PF1 are retrieved through this record format only if the value of field CODEA is hex 51, hex 54, or hex AE.