How to replace the low HEX values



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

How to replace the low HEX values

Postby Irene Ioujanina » Mon May 31, 2010 11:34 pm

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
Irene Ioujanina
 
Posts: 27
Joined: Thu Feb 21, 2008 6:42 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to replace the low HEX values

 

Re: How to replace the low HEX values

Postby Frank Yaeger » Tue Jun 01, 2010 10:57 pm

I can't think of a practical way to do that with DFSORT. I'd suggest you write a program or exit with the appropriate logic to do it.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: How to replace the low HEX values

Postby Irene Ioujanina » Tue Jun 01, 2010 11:10 pm

Thank you.
:)
Irene Ioujanina
 
Posts: 27
Joined: Thu Feb 21, 2008 6:42 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post