View previous topic :: View next topic
|
Author |
Message |
vkrajuch
New User
Joined: 22 Jun 2005 Posts: 5 Location: hyderabad
|
|
|
|
Hi Friends,
I am having more than 50 members in a PDS,
I want to change one word which are in those 50 members, are in one PDS.
Is there any command for changing the word in all those members in the PDS.
Thanks & Regards,
Vijay |
|
Back to top |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Hi frnd,
Using 3.14 or 3.15 there is an option like SUPERC using that i think so v can do... i m not clear... i know that v can search the particular word in all the 50 members.. but i m not sure of that replacing.. let me try and let me know if possible.. |
|
Back to top |
|
|
Paddy
New User
Joined: 12 Sep 2005 Posts: 46 Location: Paris France
|
|
|
|
Hi Vijay
I think to use FILEAID is better way for your problem. If FILEAID is not implemented on your shop u can make a rexx who call an ispf macro.
I hope in this help.
Regards.
Paddy |
|
Back to top |
|
|
nallapureddy
New User
Joined: 27 Jul 2005 Posts: 18
|
|
|
|
open the pds .then issue the command g c all 'abc' 'def'
this will command will change all the occurences of the abc word in the pds to def
please try this and let me know if it works |
|
Back to top |
|
|
Ravi gaur
New User
Joined: 12 Jul 2005 Posts: 38
|
|
|
|
No this command does'nt work,By the way what command it is Tso ? |
|
Back to top |
|
|
akashs
New User
Joined: 24 Nov 2005 Posts: 49 Location: chennai
|
|
|
|
hi Nalla reddy,
u r way of changing the strings is not working.....
regards,
akash |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi vkrajuch,
To my understanding you can make use of FILEAID in that use SEARCH and UPDATE option. The procedure is identify the word to be searched and specify the word to be replaced.
Other way is to make use of REXX code as Paddy pointed out.
Hope this helps. |
|
Back to top |
|
|
vkrajuch
New User
Joined: 22 Jun 2005 Posts: 5 Location: hyderabad
|
|
|
|
Hi Friends,,
Thanks for ur immediate reponses...
But in our shop i dotn hv File-aid or neither Rexx.
Thank you
Regards,
Vijay |
|
Back to top |
|
|
iknow
Active User
Joined: 22 Aug 2005 Posts: 411 Location: Colarado, US
|
|
|
|
Hi vkrajuch,
In that case you need to manually change the particular word for 50 members inside the PDS.
Other solution is someone has to send the REXX code for you. I don't have the code for your problem. |
|
Back to top |
|
|
Paddy
New User
Joined: 12 Sep 2005 Posts: 46 Location: Paris France
|
|
|
|
Hi Vijay,
Clear my doubt, can you execute a rexx code with your user's right ?
Regards
Paddy |
|
Back to top |
|
|
saithvis2
New User
Joined: 23 Dec 2005 Posts: 61 Location: Providence , US
|
|
|
|
HI all,
i have tried the File-aid option once but how do we do the same using rexx code by calling ISPF macro .
Can anyone help me out with this as i am facing the same problem of changing a variable as abc10 to xyz10 in all members of the pds .
Regards
Vishal |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Here is my solution:
Code: |
/*------------------------------- REXX -------------------------------
* PROGRAM : C@ALL
* FUNCTION : An example of how to run an edit-macro against all
* : members of PDS.
* AUTHOR : OFER
* DATE : 28/03/04
* HOW TO USE:
* :
*------------------------------------------------------------------*/
ARG PDS .
MAC = 'TEMPMAC' /* Macro name */
PDS = STRIP(PDS,"B","'")
X = OUTTRAP("LIBMEM.") /* Trap output of TSO */
ADDRESS TSO "LISTDS '"PDS"' M"
X = OUTTRAP("OFF")
DO I = 7 TO LIBMEM.0
LIBMEM.I = STRIP(LIBMEM.I) /* Member name */
ADDRESS ISPEXEC "EDIT DATASET ('"PDS"("LIBMEM.I")') MACRO ("MAC")"
SAY I RC LIBMEM.I
END
EXIT
|
And TEMPMAC is:
Code: |
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "CHANGE ALL 'string1' 'string2'"
C_RC = RC
ADDRESS ISREDIT "END"
EXIT C_RC
|
O. |
|
Back to top |
|
|
kanak
Moderator
Joined: 12 Mar 2005 Posts: 252 Location: India
|
|
|
|
Try this JCl:
Code: |
//TJOB JOB (T,B0,SCM),'KANAK',CLASS=T,MSGCLASS=0,
// REGION=2048K
//*******************************************************
//* SATISFYING COND IN IF, MODIFYING RECS AS SPECIFIED IN REPL
//*******************************************************
//JS010 EXEC PGM=FILEAID FORMAT-4: COPY REC TO 2ND FILE
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=KANAK.SAMPLE.FILE1,DISP=SHR
//DD01O DD DSN=KANAK.SAMPLE.FILE1O,
// DISP=(MOD,CATLG,CATLG),UNIT=STOR,
// SPACE=(TRK,(1,5),RLSE),DCB=(B0.DSCB)
//SYSIN DD *
$$DD01 COPY IF=(5,EQ,C'1'),REPL=(5,C'3'),
/*
//*
|
YOu might need to modify the JCL as per you rneed. Please let us know if this solve your problem or if you have any other concerns. |
|
Back to top |
|
|
|