Good afternoon, everyone,
Hope you're all well.
May I please ask again.
I have a file that could include low hex valuess (hex'00' or hex'05' or hex'02') in many places.
I'm using the following to replace them to 'valid' characters:
//TOOLIN DD *
COPY FROM(DD1) TO(DD2) USING(CVT1)
//CVT1CNTL DD *
ALTSEQ CODE=(05C5,0040,02C1)
OUTFIL FNAMES=(DD2),
OUTREC=(1,27500,TRAN=ALTSEQ)
/*
,which replaces
05-> to C5 (char 'E')
00 -> to 40 (char space)
02 -> to C1 (char 'A')
Now I have a more difficult task to replace not only the character found, but any character BEFORE it.
For instance there is a following string : 'ACCEPTC.S'
123456789
----------
ACCEPTC.S<
CCCCDEC0E4
133573352C
----------
I need to replace the 8th position hex'05' to hex'C5' (char 'E') and delete teh hex'C3' in the 7th position, creating the string:
'ACCEPTES'
Thanking you in advance,
Irene