Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us