Change File Attributes (ALTER)
IDCAMS Change File Attributes (ALTER) Example
Scenario - Alter the ESDS file to the new name.
Input ESDS File - MATEPK.TEST.ESDS
JCL -
----+----1----+----2----+----3----+----4----+----5----+
//MATEPKA JOB (123),'MTH',CLASS=A,MSGCLASS=A,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*******************************************
//* RENAME ESDS FILE TO NEW NAME
//*******************************************
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER MATEPK.TEST.ESDS -
NEWNAME (MATEPK.EMPL.ESDS1)
ALTER MATEPK.TEST.ESDS.* -
NEWNAME (MATEPK.EMPL.ESDS1.*)
/*
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, then alter is successful.
Verify the path and AIX loaded in 3.4 (Dataset List utility) or any File management tools.
Explaining Example -
In the above example,
- ALTER MATEPK.TEST.ESDS specifies the old base cluster (ESDS) name.
- NEWNAME (MATEPK.EMPL.ESDS1) specifies the new name of the base cluster.
- ALTER MATEPK.TEST.ESDS.* specifies the high-level qualifier for the components (DATA, INDEX) of the old cluster to rename.
- NEWNAME (MATEPK.EMPL.ESDS1.*) specifies the new high-level qualifier for the components.