Sure. This can be done. REXX (or a CLIST) can do this with the old TSO editor, or REXX (maybe with an EDTMACRO) can do it within ISPF. So that is your first decision.
In either approach, you will have to get the dataset names passed to the routine.
One way would be to list the names of the 50 DSNs in a a dataset,
have your REXX read the first DSN from the list,
edit that dataset,
change all xxxxx to yyyyyyy
save the dataset
loop around to read the next DSN from the list.
Maybe a batch job that executes a PROC for each of the 50 DSNs where the PROC does the change.
I know I have something like this, but I did a quick search and cannot find it.
If I locate it, I will post it here.
Thanks a lot… I will add on some points here.
i have a rexx code with me to change xxxx to yyyy in more than 50 PS at a time. But my question now is , i want to change xxxx.zzzz to yyyy.zzzz in more than 50 PS at a time.
The code which i have changes xxxx.zzzz to yyyy. Tat s it…. I need to get it as yyyy.zzzz.
Hope you get what am trying to say.
you have code to change xxxx.zzzz to yyyyy
but you want to change xxxx.zzzz to yyyyy.zzzzz
Well, it shouldn’t be too tough to change your code. Simply modify your code, where it currently has yyyyy just make it yyyy.zzzzz
remove the zzzzz from the equation and chage all xxxx to yyyy but if there are occurences of xxxxx without the zzzzz portion they too will be affected.
It is quite possible that I do not understand your question.
i just have a code to change xxxx to yyyy. But my requirement is i hav to change xxxx.zzzz to yyyy.zzzz in more than one PS at a time.
For example i need to change HRTKD.VSMBR_STAFF_MBR to HRTKO.VSMBR_STAFF_MBR .
I jus wan the first qualifier to be changed and the second should remain as it is.
The code which i have changes HRTKD.VSMBR_STAFF_MBR to HRTKO. The second qualifier disappears.This is wrong right.? And one more thing is the second qualifier is different in all the PS. It is not the same.
If it is the same one then i can do as u said… Tat is changing all yyyy to yyyy.zzzz. But in my case its not possible.
Hope you understand my question now.
My Dear Archana,
you have code that changes xxxx to yyyy
but it seems to truncate data following the change
value before change: xxxx.zzzz
value after change : xxxx
it truncates the period and everthing after it.
what about anything following zzzz?
value before change: xxxx.zzzz abcdef what happens to “abcdef”?
what happens if the value before the change ends with something other than a period?
value before change: xxxxzzzzaaaa what happens to zzzzaaaa
value before change: xxxx abcdef ghi what happens here
The period can be important when one is using variables in REXX & CLIST. Some older syntax always ending the variable with a period. If one needs a period then frequently one would type 2 periods so that one could be stripped off and one would remain. (somewhat akin to writing SQL and you want to end up with quotation marks in your output, you must code extra quote marks (one delineates the literal and one is part of the literal). Same thing here with periods.
But I am not sure that that previous discussion on periods addresses the removal of data following the xxxx. That puzzles me.
You might look very closely at the code and run some tests to see what might be wrong. Use the few examples above to see what happens. And come up with some of your own as well.
If it were me I would limit myself to testing the ‘change xxxx to yyyy’ portion and test it many, many different ways to find out exactly what it is doing.
Sorry, that is all I can think of at this time. I close with a few examples of using periods, just in case they might be helpful.
example of using period to end a variable; in this case a variable named ROW
(I think this is a CLIST)
“LINE &EVAL(&ROW.) = LINE”, < 60 (MSG1)>
example of CLIST using the old TSO editor to make changes to JCL (definately a CLIST):
SET &FROMA = &STR(DYYJJJ.THHMMSST.A0000000)
SET &FROMB = &STR(DYYJJJ.THHMMSST.B0000000)
SET &TOA = &STR(&SUBSTR(1:16,&AD345)&STR(A)&SUBSTR(18:24,&AD345))
SET &TOB = &STR(&SUBSTR(1:16,&AD345)&STR(B)&SUBSTR(18:24,&AD345))
EDIT ‘DB2N.DISASTER.CNTL(STEP080)’ OLD DATA NONUM
CHANGE * 99999 /&STR(&FROMB)/&STR(&TOB)/ALL
example of using a period as part of an ISPF editor line name (used in REXX EDTMACRO)
Queue ” &ZCURSOR = .CURSOR”
Thanks a lot for your valuable information.
I will test my code with all possible changes and get back to you soon.