The IDCAMS utility can be invoked in batch mode with JCL or interactively with TSO commands. With JCL you can print/display datasets and system messages and return codes. Multiple commands can be coded per job. You can use IF-THEN-ELSE statement to execute command/s selectively based on condition codes returned by previous commands. Listed below are the IDCAMS commands to be discussed in this course
DEFINE MODAL COMMANDS IF SET PARM BUILDINDEX REPRO PRINT DELETE VERIFY IMPORT/EXPORT ALTER LISTCAT
You can use the REPRO command of IDCAMS to copy VSAM and non-VSAM data sets, VSAM clusters, and alternate indexes. You cannot use REPRO to copy an entire partitioned data set (PDS) because REPRO does not copy the information in the directories. You can, however, use REPRO to copy individual members. The IBM IEBCOPY utility should be used to copy an entire PDS.
REPRO INFILE(ddname) OUTFILE(ddname) INDATASET(entryname) OUTDATASET(entryname) FROMKEY(key) TOKEY(key) FROMADDRESS(address) TOADDRESS(address) FROMNUMBER(number) TONUMBER(number) SKIP(count)] COUNT(count) [REPLACE | NOREPLACE] [REUSE | NOREUSE]
The PRINT command is used to print the contents of both VSAM and non-VSAM datasets.
PRINT INFILE(ddname) OUTFILE(ddname) INDATASET(entryname) FROMKEY(key) TOKEY(key) FROMADDRESS(address) TOADDRESS(address) FROMNUMBER(number) TONUMBER(number) SKIP(count)] COUNT(count) [CHAR | DUMP | HEX ]
Dump specifies to print in both Hex & Char format.
DELETE (entryname,entryname...) [FILE(ddname)] [ALIAS | AIX | CLUSTER | GDG | NVSAM | PATH | UCAT ] [ERASE | NOERASE] [FORCE | NOFORCE] [PURGE | NOPURGE] [SCRATCH | NOSCRATCH]
The ERASE parameter specifies that when the cluster is deleted, the space occupied by the cluster should be physically erased by overwriting the space with binary zeros prior to freeing the space for reuse.
The FORCE option may be specified to cause the deletion of specific objects (SPACE, USERCATALOG, GENERATIONDATAGROUP) even though they may be non-empty.
The PURGE option may be specified to delete the dataset even if the retention period has not expired.
The SCRATCH option may be specified to remove the dataset from catalog, VTOC and from volume.
If a job terminates abnormally and a VSAM dataset is not closed, the catalog entry for the dataset is flagged to indicate that the dataset may be corrupt. Before the dataset can be opened again, the VERIFY command must be used to correctly identify the end of the dataset and reset the catalog entry.
VERIFY FILE(ddname) | DATASET(entryname)
Base cluster and AIX needs to be verified separately. The verification of base cluster does not verify its associated AIXes automatically.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!