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
 

 

Search and Update a string in the PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue Nov 21, 2006 2:15 am    Post subject: Search and Update a string in the PDS
Reply with quote

I have a requirement like

Need to search a string in the PDS, The string may be at any position,
beside to that string I need to add one more string.

Example:-

PDS----XXX.ABC.DEF which contains 25 members

in all the members the string is present at any position

abc@sdf.com

beside to this string I need to add one more string like
,def@frt.com

can anyone help me..
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Tue Nov 21, 2006 2:47 am    Post subject: Re: Search and Update
Reply with quote

If you shop has PDSMAN , you can do it interactively using PDSMAN 'REPLACE' function.

or using job:

Code:

//STEP1   EXEC PGM=PDSM18                 
//PDSMSEL  DD *                           
/*                                         
//SYSIN    DD *                           
OPTION TRANSLATE=Y TRANSNEW=Y MISSMSG=N   
REPLACE TARGET=TEST1                       
        NEW=TEST2                         
/*                                         
//PDSMPDS  DD DSN=PDS.NAME,     
//            DISP=SHR                     
//PDSMRPT  DD SYSOUT=*                     


Can also be done using EDIT MACROS/ REXX.
Back to top
View user's profile Send private message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 171
Location: Bangalore

PostPosted: Tue Nov 21, 2006 5:49 pm    Post subject: Re: Search and Update a string in the PDS
Reply with quote

I have asked for the adding the string the string beside the string not to replace.

could you please tell me the option
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Nov 21, 2006 6:31 pm    Post subject:
Reply with quote

You will be adding if you search for "abc@sdf.com" and replace with "abc@sdf.com,def@frt.com" icon_biggrin.gif
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: Tue Nov 21, 2006 8:00 pm    Post subject: Re: Search and Update a string in the PDS
Reply with quote

Since the string can be in any position, and it appears that it would be in lower-case, then an edit seems like the easiest solution. Run this job for each member:
Code:

//STEPXXXX EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD *
EDIT 'THE.PDS(MEMBER#n)' TEXT NONUM
TOP
C * =abc@sdf.com=abc@sdf.com,def@frt.com=
TOP
END SAVE
/*


Or, as already mentioned, use a CLIST/REXX Exec/ISPF EDIT macro to do the same.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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