Rename

PURPOSE:  The RENAME command is used to change the name of an object in the current Data Base Library, any System File, or the current Data Base Library itself to the specified new name.

Syntax

RENAME object_type oldname {TO; AS} newname

object_type

specify the object type to rename.  Valid object types are: CF, CM, CS, DBL, DI, DS, FS, GS, ID, PM, SD, SF, SI.

CF

is a Control File.

CM

is a Command Module.

CS

is  a Code Segment.

DI

is a Data Index.  The associated index is formed the first time it is declared and used.

DS

is a Data Set.

FS

is a Find Subset.  Any Find Subset can be copied, whether it is cataloged in a DBL or not.

GS

is a Global Storage.

ID

is a Index Definition.

PM

is a Process Module.

SD

is a Schema Definition.

SF

is a System File.  Any System File can be used, whether it is cataloged in a DBL or not.

SI

is a System Information object.

DBL

may be used to specify an object not in the current DBL.

oldname

is the current name of the specified object.

TO or AS

synonyms

newname

is the object's assigned new name.

EXAMPLE

*DIRECTORY OF DS,PM
TYPE NAME
DS  BOOK_DBM2 SD BOOKS_DBM2
DS  AUTHORS_DBM2 SD AUTHORS_DBM2
PM  YTD_SALES_DBM2
PM  QUICK_REP
*RENAME SD BOOKS_DBM2 AS NEW_NAME
*RENAME PM QUICK_REP TO COSTRPT
*DIRECTORY OF DS,PM
TYPE NAME
DS  BOOK_DBM2 SD NEW_NAME
DS  AUTHORS_DBM2 SD AUTHORS_DBM2
PM  YTD_SALES_DBM2
PM  COSTRPT

NOTES:  Renaming a DBL file, Data Set table, or Data Index file with the RENAME SF command is not recommended since ACCENT R will not know that these objects have been renamed.

When a Schema Definition is renamed, ACCENT R automatically updates the SD name as it is associated with Data Sets.  However, renaming a Data Set does not update the Data Indexes.  References to old object names in Process Modules, Command Modules, or System Files are not automatically updated when the names are changed.  It is therefore necessary to MODIFY each PM, CM, or SF that cites the renamed object and substitute the new name for the old name.

When the current Data Base Library is renamed, ACCENT R recognizes the new name as the current DBL.  Data Sets, Data Indexes, and Schema Definitions cannot be renamed when in use.

To do a global rename of an item, you can use the FLATTEN utility to convert the DBL to an ASCII form, make the change in an EDITOR and use the REBUILD utility to recreate the DBL.