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 Update Replace with null string

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

New User


Joined: 10 May 2017
Posts: 5
Location: UK

PostPosted: Mon May 15, 2017 3:00 pm    Post subject: Fileaid Update Replace with null string
Reply with quote

I wish to update a JCL procedure library changing all occurrences of the string "&VERN.." with a null string. The objective is to remove a parameterised node from all dataset references such as:
Code:
//CT       DD  DISP=SHR,DSN=&ENV.MOC.&VERN..CT.DB1


Running against a test library with one relevant member in it I get the following output which seems to indicate it has updated 45 occurrences in that member but actually it has not updated any. What have I got wrong?

Code:
F I L E - A I D  V10.02  15 - MAY - 2017   10.22.16         *CONTROL CARD LIST*
INSTALLATION  SOMEOLD BANK PLC                        086780  RELEASE 04/21/16
     PROGRAM AND ALL MATERIAL COPYRIGHT 1980,2008 BY COMPUWARE CORPORATION
1...5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80

DD01     DSN=DMOC.W55555.DATA OPENED AS PO,
             RECFM=FB,LRECL=200,BLKSIZE=27800,VOL=ALTSAF
££DD01 UPDATE REPL=(1,0,C".&VERN..",C'.')                               00130006
ABOVE FUNCTION ENDED ON DIRECTORY END                                    RC=0
  MEMBERS-READ=9,SELECTED=9,UPDATED=1,RECORDS-READ=1225,UPDATED=45

- - - - - - - - - - - - - - - - ACTIONS TAKEN MAP - - - - - - - - - - - - - - -
   RPL#1--------45
Back to top
View user's profile Send private message

mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 283
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 15, 2017 3:38 pm    Post subject:
Reply with quote

Try EA (Edit all):
Code:
££DD01 UPDATE EA=(1,0,C".&VERN..",C'.')
Back to top
View user's profile Send private message
descann

New User


Joined: 10 May 2017
Posts: 5
Location: UK

PostPosted: Mon May 15, 2017 3:56 pm    Post subject:
Reply with quote

Thanks, that worked a treat.
icon_biggrin.gif
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 283
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 15, 2017 4:09 pm    Post subject:
Reply with quote

You are welcome.

REPL works fine if the old-data and new-data lengths are same.

In your case, REPL is updating the old-data at first position(C".") with new data(C"."). That's why you are not able to detect any difference.

If you try with different string, REPL=(1,0,C".&VERN..",C'X'), you would find that .&VERN.. has been updated to X&VERN..

Use EDIT or EDITALL to replace data in a record with data of different lengths.

Use REPL or REPLALL to replace data of the same length.
Back to top
View user's profile Send private message
descann

New User


Joined: 10 May 2017
Posts: 5
Location: UK

PostPosted: Mon May 15, 2017 4:29 pm    Post subject:
Reply with quote

Thanks again. That makes things much clearer.
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


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