Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FileAid Replace a string with another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
View previous topic :: :: View next topic  
Author Message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 114
Location: Hyderabad

PostPosted: Thu Aug 20, 2009 2:02 pm    Post subject: FileAid Replace a string with another
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

Site Director


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

PostPosted: Thu Aug 20, 2009 7:26 pm    Post subject:
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    Post subject:
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    Post subject:
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: 114
Location: Hyderabad

PostPosted: Fri Aug 21, 2009 1:59 pm    Post subject: Reply to: FileAid Replace a string with another
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    Post subject: Reply to: FileAid Replace a string with another
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    Post subject: Reply to: FileAid Replace a string with another
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: 114
Location: Hyderabad

PostPosted: Wed May 11, 2011 6:28 pm    Post subject: Reply to: FileAid Replace a string with another
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us