View previous topic :: View next topic
|
Author |
Message |
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
shrivatsa Warnings : 1 Active User
Joined: 17 Mar 2006 Posts: 174 Location: Bangalore
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You will be adding if you search for "abc@sdf.com" and replace with "abc@sdf.com,def@frt.com" |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
|