Figure 233 shows how to specify the RANGE keyword.
Figure 233. Specifying the RANGE Keyword
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R RECORD1 00020A* Character fields 00030A FIELD1 1 I 2 2RANGE('B' 'F') 00040A FIELD2 1 I 3 2RANGE('2' '5') 00050A* Numeric fields 00070A FIELD3 1 0I 4 2RANGE(2 5) 00080A FIELD4 4 0B 5 2RANGE(1 1500) 00090A FIELD5 7 2B 6 2RANGE(100 99999.99) 00100A FIELD6 3 0B 7 2RANGE(-100 -50) 00110A FIELD7 3 2I 8 2RANGE(.50 1.00) 00120A FIELD8 3 2I 9 2RANGE(.5 1) 00130A FIELD9 5Y 2I 10 2RANGE(.01 999.99) A
FIELD7 and FIELD8 have equivalent RANGE parameter values. The reason is that for numeric fields, decimal alignment is based on the number of decimal positions specified in positions 36 through 37. For FIELD7 and FIELD8, the low value is 0.50 and the high value is 1.00.
Data entered into a numeric field is aligned on the decimal positions specified (in positions 36 through 37), and leading and trailing blanks are filled with zeros. For example, if 1.2 is typed into FIELD9, 00120 is returned to your program. If 100 is typed into FIELD9, 10000 is returned to your program.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.