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
 

 

Replacing caharacters using utilities

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 35
Location: Denver

PostPosted: Thu Jul 12, 2012 3:09 am    Post subject: Replacing caharacters using utilities
Reply with quote

Hi

I have a requirement where I need to replace a set of characters to another set of characters using some utility. The characters can appear in any position in the record.

For eg. LRECL is 80 bytes. I need to check for 'ABCD' anywhere in the record and replace it with 'ZZZZ'. A COBOL INSPECT statement can do this. But I wanted to check whether any utility like SORT or SYNCTOOL can do this.

Thanks and Regards
Manu
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Jul 12, 2012 3:52 am    Post subject: Reply to: Replacing caharacters using utilities
Reply with quote

Have a look at FINDREP (Find and Replace) in your documentation for your Sort product.
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Thu Jul 12, 2012 7:46 pm    Post subject: Reply to: Replacing caharacters using utilities
Reply with quote

Please try below option

Code:
//SORTIN    DD   *                                 
SSSSSABCDSSSSSSSABCDSSSSSSSSSS                     
/*                                                 
//SORTOUT   DD  SYSOUT=*                           
//SYSIN    DD  *                                   
    SORT FIELDS=COPY                               
    OUTREC FINDREP=(IN=C'ABCD',OUT=C'ZZZZ')       
/*                                                 


Out Put -
Code:
SSSSSZZZZSSSSSSSZZZZSSSSSSSSSS

Thanks,
Sandip Walsinge
Walsinge Technologies Pvt. Ltd. Pune
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Jul 13, 2012 9:02 am    Post subject:
Reply with quote

Sandip,

Your control statements seem to start from pos-1 which will result in syntax error if someone tries to execute it. Use "Code" tags to preserve alignment when you post some code.
Back to top
View user's profile Send private message
sandip_mainframe
Warnings : 2

New User


Joined: 20 Sep 2006
Posts: 61
Location: pune

PostPosted: Fri Jul 13, 2012 12:04 pm    Post subject: Reply to: Replacing caharacters using utilities
Reply with quote

Arun,

Thanks for the correction. By mistake I typed control statements from 1st position.


Thanks,
Sandip Walsinge
Walsinge Technologies Pvt. Ltd. Pune
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replacing Start Transid with LINK pkmurali CICS 12 Tue Apr 19, 2016 8:22 pm
No new posts ADRDSSU Restore - How to prevent repl... Lipi.Prasannan JCL & VSAM 12 Fri Oct 02, 2015 12:13 am
No new posts Matching and replacing JOIN KEYS for ... JAYACHANDRAN THAMPY SYNCSORT 17 Mon Feb 16, 2015 5:03 am
No new posts Replacing GO TO Statements hailashwin COBOL Programming 3 Tue Dec 02, 2014 5:28 pm
No new posts Replacing record Based on matching st... mrdinesh DFSORT/ICETOOL 7 Thu Sep 25, 2014 8:22 pm


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