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

Search and Update a string in the PDS


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shrivatsa
Warnings : 1

Active User


Joined: 17 Mar 2006
Posts: 174
Location: Bangalore

PostPosted: Tue Nov 21, 2006 2:15 am
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
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: 174
Location: Bangalore

PostPosted: Tue Nov 21, 2006 5:49 pm
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: 3156
Location: Tucson AZ

PostPosted: Tue Nov 21, 2006 6:31 pm
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

Global Moderator


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

PostPosted: Tue Nov 21, 2006 8:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


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 Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top