View previous topic :: View next topic
|
Author |
Message |
descann
New User
Joined: 10 May 2017 Posts: 5 Location: UK
|
|
|
|
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 |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Try EA (Edit all):
Code: |
££DD01 UPDATE EA=(1,0,C".&VERN..",C'.') |
|
|
Back to top |
|
|
descann
New User
Joined: 10 May 2017 Posts: 5 Location: UK
|
|
|
|
Thanks, that worked a treat.
|
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
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 |
|
|
descann
New User
Joined: 10 May 2017 Posts: 5 Location: UK
|
|
|
|
Thanks again. That makes things much clearer. |
|
Back to top |
|
|
|