IDCAMS Can be used for various purposes:

– Copy VSAM and NON VSAM Datasets (REPRO)
– Create GDG
– Delete GDG
– Create VSAM dataset (Define Cluster)
– To create and Alternate Index File (AIX)
– To define a path for and AIX file
– To populate the records in the indexed file or AIX
– To LISTCAT

Example to create GDG base using IDCAMS:

//STEP001 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG (NAME(EXAMPLE.TEST.GDGBASE) –
NOEMPTY SCRATCH LIMIT(20) )
/*
//*