OPTION COPY,Y2PAST=1985
OUTREC FIELDS=(SEQNUM,8,ZD,START=1000,INCR=100,
11:8,4,PD,M12,
31:15,4,Y2V(/),
51:2,1,CHANGE=(3,
X'01',C'L92',X'02',C'M72',X'03',C'J42'),
NOMATCH=(C'???'))
This example illustrates how a sequence number can be generated,
how numeric and date values can be edited, and how a lookup table
can be used.
The reformatted output records look as follows:
- Position
- Contents
- 1-8
- A zoned decimal sequence number that starts at 1000 and increments
by 100.
- 11–20
- A CH field containing the PD field from input positions 8 through
11 edited according to the M12 edit mask.
- 31-40
- A C'yyyy/mm/dd' date field containing the P'yymmdd' date field
from input positions 15-18 transformed according to the specified
century window of 1985-2084.
- 51–53
- A CH field containing C'L92', C'M72', C'J42' or C'???' as determined
by using a lookup table for the input field in position 2.