IDCAMS is happy to do generic renames such as that. Until you specified that only certain ones should be. Never mind.
sas On Wed, May 10, 2017 at 4:59 PM, John McKown <[email protected]> wrote: > On Wed, May 10, 2017 at 3:51 PM, Ron Thomas <[email protected]> wrote: > > > we are looking at renaming all of the datasets like the below. > > > > Old dataset - > SLXR5V.SAPDB.* > > New dataset - > SLXR5V.SAPDB.X.* > > > > Ah. Not too bad. Something like the following REXX might work (untested > since it's close to my go-home time) > > /* REXX */ > XX=OUTTRAP('DATA.','*') > LISTC LVL('SLXR5V.SAPDB') > XX=OUTTRAP("OFF") > DO I=1 TO DATA.0 > LINE=DATA.I > IF 'NONVSAM' <> WORD(LINE,1) THEN ITERATE /* ONLY WORKS FOR NON-VSAM */ > DSN=WORD(LINE,3) /* GET THE DSN */ > SUFFIX=SUBSTR(DSN,12) /* STRIP OFF THE FRONT */ > NEWDSN='SLXR5V.SAPDB.X'||SUFFIX > "ALTER '"DSN"' NEWNAME('"NEWDSN"')" > END > > My example is only for non-VSAM, but you can use something similar by > checking the first word for "CLUSTER", "INDEX", or "DATA". > > > > Thanks > > Ron T > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to [email protected] with the message: INFO IBM-MAIN > > > > > > -- > Advertising is a valuable economic factor because it is the cheapest way of > selling goods, particularly if the goods are worthless. -- Sinclair Lewis > > > Maranatha! <>< > John McKown > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- sas ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
