View previous topic :: View next topic |
Author |
Message |
sudhtech27 Beginner
Joined: 07 Oct 2003 Posts: 8 Topics: 6
|
Posted: Tue Oct 07, 2003 5:09 am Post subject: To replace a string in entire PDS |
|
|
Hi,
I have a PDS which has around 120 members in it. Our requirement is to search in all members of this PDS having file name with NABS32.PRDKY.TEST to NABS32.PRDX.Test
Can anyone suggest a Quick solution for this ?
I tried file aid search and update option and I could n't get expected result.
Thanks! |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Oct 07, 2003 5:51 am Post subject: |
|
|
Hi
Create a REXX like this, and name it whatever you like:
Code: | /* REXX */
MAC = 'TEMPMAC'
PDS = "'your.pds'"
X = OUTTRAP("LIBMEM.")
ADDRESS TSO "LISTDS "PDS" M"
X = OUTTRAP("OFF")
PDS = STRIP(PDS,"B","'")
DO I = 7 TO LIBMEM.0
LIBMEM.I = STRIP(LIBMEM.I)
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"
END
EXIT
|
Create another REXX, and name it TEMPMAC:
Code: |
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "C ALL PRDKY PRDX"
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"
EXIT |
HTH
O.
________
buy silver surfer vaporizer
Last edited by ofer71 on Sat Feb 05, 2011 11:06 am; edited 1 time in total |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Oct 07, 2003 6:09 am Post subject: |
|
|
sudhtech27,
Code: |
//STEP0100 EXEC PGM=FILEAID
//*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DD01 DD DSN=YOUR PDS,
// DISP=SHR
//SYSIN DD *
$$DD01 UPDATE,
EDITALL=(1,0,C'NABS32.PRDKY.TEST',C'NABS32.PRDX.Test'),PDSSTAT=A
/*
|
Kolusu |
|
Back to top |
|
|
|
|