IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replace a particular string across all members in a PDS


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Thu Aug 10, 2006 3:39 pm
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
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top