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 a particular string across all members in a PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
sree_mainframe

New User


Joined: 10 Aug 2006
Posts: 5

PostPosted: Thu Aug 10, 2006 2:44 pm    Post subject: Replace a particular string across all members in a PDS
Reply with quote

Hi
I want to replace a particular string across all members in a PDS. It is something like search and replace.
I want to do so in a batch mode using JCL.Please guide me in this issue.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Aug 10, 2006 3:39 pm    Post subject: Re: Replace a particular string across all members in a PDS
Reply with quote

What PDS management tools do you have available? FILEAID? File Manager? Insync? PDS?
Back to top
View user's profile Send private message
sree_mainframe

New User


Joined: 10 Aug 2006
Posts: 5

PostPosted: Thu Aug 10, 2006 4:02 pm    Post subject: Re: Replace a particular string across all members in a PDS
Reply with quote

hi

I am using FILEAID. Others i am not sure of. Thanks in Advance.
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Aug 10, 2006 4:10 pm    Post subject:
Reply with quote

Hi,

This is the JCl ur looking for.


//STEP010 EXEC PGM=FILEAID
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD03 DD DISP=SHR,DSN=XXXX.XXXX.XXXX
//SYSIN DD *
$$DD03 UPDATE ME=9999,
EA=(1,0,T"TAX",C"TAX1")
/*

The JCl replaces 'TAX' with 'TAX1' starting from the same position it was found.

~Vamsi
Back to top
View user's profile Send private message
sree_mainframe

New User


Joined: 10 Aug 2006
Posts: 5

PostPosted: Thu Aug 10, 2006 5:37 pm    Post subject: Re: Replace a particular string across all members in a PDS
Reply with quote

hi

Thanks a lot!!! This forum is really a gem. I never expected such fast reponses. Cheers to the moderators and all the active members.
By the way the JCl works and if I want to change multiple words across multiple members what should I do. thnx in advance
Back to top
View user's profile Send private message
sree_mainframe

New User


Joined: 10 Aug 2006
Posts: 5

PostPosted: Thu Aug 10, 2006 6:30 pm    Post subject: Re: Replace a particular string across all members in a PDS
Reply with quote

Hi

If I want to change multiple words across multiple members what should I do. thnx in advance
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Aug 10, 2006 7:17 pm    Post subject:
Reply with quote

hi,

Repeat the statement EA=(1,0,T"CHAR1",C"CHAR2") with the strings(CHAR1) to search and replace with (CHAR2).
Back to top
View user's profile Send private message
sree_mainframe

New User


Joined: 10 Aug 2006
Posts: 5

PostPosted: Fri Aug 11, 2006 10:24 am    Post subject: Re: Replace a particular string across all members in a PDS
Reply with quote

hi

Thnx a million. The code works great. Sp thanx to Shreevamsi.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


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