View previous topic :: View next topic
|
Author |
Message |
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Hi I need to replace some characters with others using sort. For example, I need to replace all "aaaa" with "bbbb" at position 3 to 6 in the file starting from first record to last record wherever it found. My file is varibale length file. I have tried with the following syntax, but getting error
Code: |
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,4,CH,EQ,C'SASV'),
OVERLAY=(3:C'AMIT'))
/*
|
but I am getting the following error:
Code: |
************************************************************
1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES A
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 06:17 ON THU JA
0 OPTION COPY
OUTREC IFTHEN=(WHEN=(1,4,CH,EQ,C'SASV'),
OVERLAY=(3:C'AMIT'))
ICE201I E RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE241A 0 *OUTREC IFTHEN 1 OVERLAY COLUMN OVERLAPS RECORD DESCRIPTOR WORD
ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E7-K11698
ICE052I 3 END OF DFSORT
|
can any please help me
Thanks in advance
Ravi |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
kudamala,
From the error messages you posted, it seems like your input file is VB. VB files have a 4 byte RDW field at pos 1-4. If you see 'SASV' at pos 1-4 in browse mode, the actual data pos will be 5-9. You must take care of this while handling VB files. |
|
Back to top |
|
|
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Arun
Thanks for your suggestion. I have tried with FB records with the following sort card. I am using tape data. It is working without error, but problem is when I check for c0 at displacement 1, it is giving count 210418, but after job execution, in outrec only 75356 replaced with b0, remaining still with c0. Any idia why it is replacing only partical records?
Code: |
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(1,2,CH,EQ,X'C0'),
OVERLAY=(1:X'B0'))
/*
|
|
|
Back to top |
|
|
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Here I need to montion one thing, the date is in hex format |
|
Back to top |
|
|
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
sorry Data not Date |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
kudamala,
It's not clear what you're trying to do. In your first post you were trying to replace 'SASV' by 'AMIT'. Now you're trying to replace X'C0' by X'B0'. Please explain clearly what exactly you want to achieve. X'C0' will occupy only a single byte. So you should be checking for 1,1,CH,EQ,X'C0' |
|
Back to top |
|
|
kudamala
New User
Joined: 12 Sep 2008 Posts: 51 Location: Bangalore
|
|
|
|
Arun
Thank you so much for your help. In my first example I was trying for SASV and AMIT that was correct. In my second example I have tried to replace x'c0' with x'b0'. I thought it will occupy 2 bytes. By looking into your answer I have changed the syntax to 1,1,CH,EQ,X'C0'. Now it is working fine.
Once again thank you so much. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Ravi,
You're welcome. |
|
Back to top |
|
|
|