I have FB file whose LRECL=80.
The file has 4 fields a type, key, a name and a zip code.
type - 1 to 10
key - 11 to 30
name - 31 to 65
zip - 66 to 70
rest is spaces
I have to search the key field and find the first numeric character and change 2 bytes after that to a '0'
The above change should not be applied to the type value '100002'
If the input file looks:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
100001 * ADF B5132 AAA BBBBB 41311
100001 ADDR A1111 AREA MAN 89009
100003 * DTTB E5132 EBI ROGER 10883
100002 7123445538 BRET OEPRA 30441
100001 * CRET D8322 DOB PETER 21212
100003 DRUB RELMB3434 BAA BARBB 51411
100001 * ADF B5132 AAA BBBBB 41311
100001 ADDR A1111 AREA MAN 89009
100003 * DTTB E5132 EBI ROGER 10883
100002 7123445538 BRET OEPRA 30441
100001 * CRET D8322 DOB PETER 21212
100003 DRUB RELMB3434 BAA BARBB 51411
O/p would be
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
100001 * ADF B5102 AAA BBBBB 41311
100001 ADDR A1101 AREA MAN 89009
100003 * DTTB E5102 EBI ROGER 10883
100002 7123445538 BRET OEPRA 30441
100001 * CRET D8302 DOB PETER 21212
100003 DRUB RELMB3404 BAA BARBB 51411
100001 * ADF B5102 AAA BBBBB 41311
100001 ADDR A1101 AREA MAN 89009
100003 * DTTB E5102 EBI ROGER 10883
100002 7123445538 BRET OEPRA 30441
100001 * CRET D8302 DOB PETER 21212
100003 DRUB RELMB3404 BAA BARBB 51411
We have SYNCSORT FOR Z/OS 1.4.0
I was going in the direction of using PARSE and ENDAT combination. But ENDAT did not recognize NUM
Has anyone come across similar stuff.
Please help
thanks
Aka