View previous topic :: View next topic
|
Author |
Message |
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hi,
The following JCL replaces a string to another in all the members of a pds.
Code: |
//STEP010 EXEC PGM=FILEAID
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//DD03 DD DSN=AAAAAAA.BBBBBBB.CCCCCCC.DDD,DISP=SHR
//SYSIN DD *
$$DD03 UPDATE ME=9999,EA=(1,0,T"//DAAAAAA",C"//DBBBBBB")
/*
|
Can someone please explain me what are the following?
1. UPDATE ME = 9999
2.EA=(1,0
3. what does T and C stand for
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Why do you believe it appropriate to ask others to read the documentation for you?
If you find something in the manual that is not clear, post what you found and your doubt about it. Someone will be able to clarify. |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Code: |
//SYSIN DD *
$$DD03 UPDATE ME=9999,EA=(1,0,T"//DAAAAAA",C"//DBBBBBB")
/*
|
"ME" is short form to represent MEMBERS of a PDS. With this statement, it updates the members of a PDS from text "//DAAAAAA" to characters "//DBBBBBB". EA represents Edit All and used in conjunction with UPDATE batch command of File-Aid.
HTH. |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Sorry, I forgot to write about the "1,0" thing in my previous post. In File-Aid batch commands, "1,0" represents from 1st byte to till the end of record". In above case, wherever "//DAAAAAA" found in a line it will be replaced with ""//DBBBBBB".
HTH. |
|
Back to top |
|
|
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hi,
Thanks for your reply. But even if i give members=1, the JCL is updating all the members in the PDS.
How do i do it for the first occurence only. Please suggest. |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
give the sysin format as below:
Code: |
//SYSIN DD *
$$DD03 UPDATE MEM=MEMBER NAME,EA=(1,0,T"//DAAAAAA",C"//DBBBBBB")
/*
|
The MEM=MEMBER NAME is the particular member of the PDS you want to EDIT and UPDATE.
HTH. |
|
Back to top |
|
|
silentarya
New User
Joined: 11 Mar 2007 Posts: 35 Location: Chennai
|
|
|
|
Hi,
Can i give multiple replace statements in one step.
I tried but it did not work.
I wrote as mentioned below. However, it updated the first replace only.
//SYSIN DD *
$$DD01 UPDATE ME=9999,EA=(1,0,T"YRCMNXX",C"ZRCMNXX")
$$DD01 UPDATE ME=9999,EA=(1,0,T"YRSHLSB",C"ZRSHLSB")
$$DD01 UPDATE ME=9999,EA=(1,0,T"YRSHLSX",C"ZRSHLSX")
ANY SUGGESTIONS??? |
|
Back to top |
|
|
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hi,
You might want to pass the instream data like this.
Code: |
//SYSIN DD *
$$DD01 UPDATE ME=9999,EA=(1,0,T"YRCMNXX",C"ZRCMNXX"),
EA=(1,0,T"YRSHLSB",C"ZRSHLSB")
|
|
|
Back to top |
|
|
|