IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FileAid Replace a string with another


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Thu Aug 20, 2009 2:02 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 20, 2009 7:26 pm
Reply with quote

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
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Aug 21, 2009 1:10 pm
Reply with quote

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
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Aug 21, 2009 1:12 pm
Reply with quote

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
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Fri Aug 21, 2009 1:59 pm
Reply with quote

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
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Fri Aug 21, 2009 5:14 pm
Reply with quote

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
View user's profile Send private message
silentarya

New User


Joined: 11 Mar 2007
Posts: 35
Location: Chennai

PostPosted: Wed May 11, 2011 3:30 pm
Reply with quote

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
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Wed May 11, 2011 6:28 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts String has hex character need to conv... COBOL Programming 3
No new posts SORT - To repeat a string in same col... SYNCSORT 3
No new posts JCL - To repeat a string in same colu... JCL & VSAM 2
No new posts Replace a string in a VB file and cop... DFSORT/ICETOOL 2
No new posts Replacing character string in file th... JCL & VSAM 9
Search our Forums:

Back to Top