Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Replace option with sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Jan 22, 2009 12:34 pm    Post subject: Replace option with sort
Reply with quote

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
View user's profile Send private message

Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Jan 22, 2009 12:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Jan 22, 2009 4:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Jan 22, 2009 5:41 pm    Post subject:
Reply with quote

Here I need to montion one thing, the date is in hex format
Back to top
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Jan 22, 2009 5:42 pm    Post subject:
Reply with quote

sorry Data not Date
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Jan 22, 2009 5:45 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kudamala

New User


Joined: 12 Sep 2008
Posts: 51
Location: Bangalore

PostPosted: Thu Jan 22, 2009 6:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Thu Jan 22, 2009 7:42 pm    Post subject:
Reply with quote

Ravi,

You're welcome. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us