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

Replace a string in all members of a PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Thu Jul 19, 2007 12:28 pm
Reply with quote

Hi Jatin,

I tried before posting my question. But it just displays but it is not writing into that member. Also another query I have is, does anyone has rexx code to search a string in all the members of a PDS. if the string is found it should display as 'found' in the prompt column. doest anyone has code or idea to do that.

Thanks in advance,
Sakthi
Back to top
View user's profile Send private message
kavisuresh

New User


Joined: 22 May 2007
Posts: 7
Location: chennai

PostPosted: Thu Jul 19, 2007 1:09 pm
Reply with quote

Hi,

Create the below rexx tool in the same format and place inside a pds and execute using "tso exec 'PDS(member)'",this is used to allocate a private PDS,

"EXECUTIL SEARCHDD(yes)" /* to ensure that SYSEXEC is available*/
"ALLOC FILE(SYSEXEC) DATASET(rexx.exec) shr reuse"
IF RC = 0 then
SAY 'Allocation to SYSEXEC completed.'
ELSE
SAY 'Allocation to SYSEXEC failed.'
/*"call lmac.load(lmac)" */

Note:
PDS name should be "userid.rexx.exec" and the rexx tool should be inside "SYSEXEC" member inside the pds


After allocating the personal PDS,proceed with the below ISPF EDIT macro
create another member inside the same pds with the edit macro.dont submit this member
/**********EDIT MACRO*******/
ADDRESS ISREDIT MACRO
ADDRESS ISREDIT RESET EXCLUDED
ADDRESS ISREDIT EXCLUDE ALL 'K' 1
ADDRESS ISREDIT FIND ALL 'K' 1
ADDRESS ISREDIT CHANGE ALL 'K' 1 'D' 1
EXIT


After preparing the above edit macro place all the 100 members which requires the changes inside the same PDS and place alone the edit macro
member on the command prompt and hit an enter which will do the changes and save the same ,follow the same for other members,
Hope the above will help you which will be very simple instead of doing the same manually

Regards,
Kavitha
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 -> JCL & VSAM

 


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