I am coding a cross-walk between two file formats that differ slightly. I need to move data in one field 4 spaces to the right and fill the vacated spaces with character space. Is this the easiest way?
05 PAT-NO-HLDR PIC X(11).
05 EV-PAT-NO.
10 EV-PAT-NO PIC X(17).
10 EVFILLER PIC X(8).
05 IBC-PAT-NO REDEFINES EV-PAT-NO.
10 NAIC-CODE PIC X(4).
10 IBC-PAT-NO PIC X(21).
400-MOVE.
MOVE EV-PAT-NO TO PAT-NO-HLDR.
MOVE SPACES TO NAIC-CODE.
MOVE PAT-NO-HOLDER TO IBC-PAT-NO.
Will this work? Is ther a 'better' way to accomplish this?
05 PAT-NO-HLDR PIC X(11).
05 EV-PAT-NO.
10 EV-PAT-NO PIC X(17).
10 EVFILLER PIC X(8).
05 IBC-PAT-NO REDEFINES EV-PAT-NO.
10 NAIC-CODE PIC X(4).
10 IBC-PAT-NO PIC X(21).
400-MOVE.
MOVE EV-PAT-NO TO PAT-NO-HLDR.
MOVE SPACES TO NAIC-CODE.
MOVE PAT-NO-HOLDER TO IBC-PAT-NO.
Will this work? Is ther a 'better' way to accomplish this?