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

Fileaid Update Replace with null string


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
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
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: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 15, 2017 3:38 pm
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
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: 316
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon May 15, 2017 4:09 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
No new posts how to eliminate null indicator value... DB2 7
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
Search our Forums:

Back to Top