Low values to Spaces using SORT There may be situation where you wish to replace the low values hex (’00’) in a file to spaces hex (’40’). The following JCL can come handy for Method 1: If position of low value char is not known and all such chars are to be
//SORTIN DD DSN=FILE.WITH.LOW.VALUES, //SORTOUT DD DSN=FILE.WITH.SPACES, // DISP=(NEW,CATLG,DELETE) OUTREC FIELDS=(1,80,TRAN=ALTSEQ)
Method 2: If position of low value char is known and only that occurence needs to be changed The following sort job will change the hex of X’00’ to X’40’ at position 14th
//SORTIN DD DSN=KKDP.U8MBAF0A.V065.YPL.QSTM.QTRLY.G0024V, //SORTOUT DD DSN=KKDP.U8MBAF0A.V065.YPL.QSTM.QTRLY.G0024VV, // DISP=(NEW,CATLG,DELETE) OUTREC FIELDS=(1:1,13,14:14,1,CHANGE=(14,X’00’,X’40’))