Some IDCAMS examples

Delete Orphan VVDS Record
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DD1 DD UNIT=SYSDA,VOL=SER=vvvvvv,DISP=SHR
//SYSIN DD *
DELETE component.name VVR -
FILE(DD1) -
CAT(cat.name.in.vvr)

If a non-VSAM record is to be removed, the ‘NVR’ parameter should
be used instead of ‘VVR’

Recatalog a VSAM Cluster that has become Uncatalogued
//GO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CL(NAME(cluster-name) RECATALOG type -
VOL(volser) )

Note: the type of dataset (indexed, relative record, linear, etc.) and
the volume on which the dataset resides must be specified in the
DEFINE.

Delete Catalog Entry
//GO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE CL cluster-name NOSCRATCH

Scan a VVDS for Errors
//GO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//VVDS DD DSN=SYS1.VVDS.Vvolser,
// UNIT=SYSDA,VOL=SER=volser,
// AMP=’AMORG’,DISP=SHR
//SYSIN DD *
DIAGNOSE VVDS INFILE(VVDS)

Alter SMS Class Information
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALTER entryname STORCLAS(new-storclas) -
MGMTCLAS(new-mgmtclas)

List Aliases in the Master Catalog
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTC ALIAS ALL CAT(mastercatname)

Print the contents of the VVDS
//PRNTVVDS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//VVDS DD DSN=SYS1.VVDS.Vvolser,
// DISP=SHR, UNIT=SYSDA,
// VOL=SER=volser,AMP=AMORG
//SYSIN DD *
PRINT INFILE(VVDS)

 

0 comments on Some IDCAMS examples

MyMusic

Flickr recent photosets

Porlock Vale 2011