On Thu, May 11, 2017 at 8:36 AM, Ron Thomas <[email protected]> wrote:
> Thanks John . I am new to Rexx , but just wanted to know how in the below
> code, we make sure that only what is in my input file is read and renamed
> and not all the datasets under the SLXR5V.SAPDB.* ?
>
Good catch. My code will rename all NONVSAM in the catalog. If you already
have a list of DSNs in a data set, then see the changes below.
>
> /* REXX */
/* INSTEAD OF THE LISTC, READ A DD NAME */
/* REPLACE ddname WITH THE READ DD NAME */
"EXECIO * DISKR ddname (FINIS STEM DATA."
/* READ ENTIRE DSN INTO THE DATA. STEM */
> DO I=1 TO DATA.0
> LINE=DATA.I
>
/* JUST PROCESS THE DSN - FIRST WORD IN INPUT LINE */
DSN=WORD(LINE,1)
> SUFFIX=SUBSTR(DSN,12) /* STRIP OFF THE FRONT */
> NEWDSN='SLXR5V.SAPDB.X'||SUFFIX
> "ALTER '"DSN"' NEWNAME('"NEWDSN"')"
> END
>
> 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