If the dataset is non-VSAM and the target catalog is the one that the new
DSN belongs in under normal catalog search rules, then renaming the dataset
using the TSO rename command handles the catalog details with no other
action required.

If you want the new DSN in a "non-normal" catalog and the dataset is both
non-VSAM and non-SMS, then using IDCAMS you can:
    Uncatalog it with DEL NSCR
    Rename it with ALTER NEWNAME FILE
    Recatalog it with DEFINE NVSAM in any catalog you want.

If the dataset is VSAM, your best bet is to copy it (e.g., IDCAMS or
ADRDSSU) to the new DSN and then delete the old.

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of ??? ?? ???
> Sent: Wednesday, August 27, 2014 12:35 AM
> To: [email protected]
> Subject: Rename dataset and recatalog
> 
> Hi,
> 
> How do I rename a dataset in batch if it will need to be cataloged in a
different catalog?
> 
> For example, I would like to rename SYS1.FOOBAR to SYSV.FOOBAR.
> Datasets with an HLQ of SYSV are cataloged in a different catalog the
datasets with an
> HLQ of SYS1.
> 
> This is very simple in ISPF, but how can it be done in batch?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to