replace character by other



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

replace character by other

Postby pulcinella » Wed Apr 21, 2010 1:32 pm

Hello,

I have a file with lrecl = 952. I need replace the character X'25' by X'40' (value hexadecimal is 25 and i want replace with space)... I don't know which position is the character. Only know that the character must be between 13 and 925 position ( although I cant examine all position of record).

If it will help the key of file is at the first 1-12 position and It's not duplicate records

My output file must be LRECL = 952 position too. I only want replace a character by another

INPUT FILE (lrecl = 952)

0000000000001aaaaa.aaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0000000000002aaaaaaaaaa.axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0000000000025aaa.aaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

OUTPUT FILE (lrecl = 952)

0000000000001aaaaa aaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0000000000002aaaaaaaaaa axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0000000000025aaa aaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

(in my example, the character X'25' is '.' I want replace this character by space

Thank you very much
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: replace character by other

Postby pulcinella » Wed Apr 21, 2010 1:33 pm

I find that I could use the option FINDREP but I don't know how to use it... this option is correct?
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: replace character by other

Postby skolusu » Wed Apr 21, 2010 9:16 pm

pulicnella,

Use the following control cards

//SYSIN    DD *                       
  SORT FIELDS=COPY                     
  INREC FINDREP=(INOUT=(X'25',X'40')) 
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: replace character by other

Postby pulcinella » Wed Apr 21, 2010 9:55 pm

Great Thank you very much...

But could I make the same but replace the character between 13 and 925 position of file?.
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: replace character by other

Postby skolusu » Wed Apr 21, 2010 10:19 pm

pulcinella,

Use the following control cards

//SYSIN    DD *                       
  SORT FIELDS=COPY                     
  INREC FINDREP=(INOUT=(X'25',X'40'),STARTPOS=13,ENDPOS=925)
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: replace character by other

Postby pulcinella » Thu Apr 22, 2010 12:12 am

Great... Thank you
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post