Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7315

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: 2285
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 junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts DB2 utilities, contention or failure? sheersh DB2 2 Fri Apr 21, 2017 6:18 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us