We have a copy/replacing statement where our intent is to change the 01 level to an 02 level.
Here is the statement we are using, note the space before and after the 01 and 02 values.
Copy "PrmPolcy.fd" replacing leading ==MP== By ==VPPINew==, leading ==PRM== By ==VPPINew==, leading == 01 == By == 02 ==.
The copybook begins like this
01 PRMPOLCY-RECORD. 03 MP-KEY. 05 MPPOLYR. 10 MPPOLY-YY PIC X(02). 10 MPPOLY-MM PIC X(01). 05 MPPREFIX PIC X(02). 05 MPPOLNO PIC X(05).
This is what gets created. The field MPPOLY-MM defined as PIC X(01) gets changed to a Pic X(02) which is incorrect.
It changed all fields that were Pic X(01) To X(02). How can we prevent this from happening.
02 VPPINewPOLCY-RECORD.
03 VPPINew-KEY.
05 VPPINewPOLYR.
10 VPPINewPOLY-YY PIC X(02).
10 VPPINewPOLY-MM PIC X(02).
05 VPPINewPREFIX PIC X(02).
05 VPPINewPOLNO PIC X(05).