EXAMINE is an access method services command is used to check and collect information on the structural consistency of key-sequenced data set clusters.
It checks for index and data components and if any problem is found, the error messages are sent spool. You can check any of the IDCxxxxx messages.
It check the index component of the key-sequenced data set cluster by cross-checking vertical and horizontal pointers contained within the index control intervals, and by performing analysis of the index information. It is the default test of EXAMINE.
It check the data component of the key-sequenced data set cluster by sequentially reading all data control intervals, including free space control intervals. Tests are then carried out to ensure record and control interval integrity, free space conditions, spanned record update capacity, and the integrity of internal VSAM pointers contained within the control interval.
EXAMINE NAME(vsam-ksds-name) - INDEXTEST DATATEST - ERRORLIMIT(50)
vsam-ksds-name is the VSAM dataset name for which we need to examine index and data part of VSAM cluster.
Following example shows how to check whether Index and Data part of KSDS dataset are synchronized or not.
//JOBNAME1 JOB 'IBMMAINFRAMER',CLASS=C,PRTY=10,MSGCLASS=C, // MSGLEVEL=(1,1),NOTIFY=&SYSUID //* //STEP001 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * EXAMINE NAME(racfid.VSAM.KSDSFILE.TEST) - INDEXTEST DATATEST - ERRORLIMIT(50) /*
If you execute the above JCL. Job should complete successfully with MAXCC = 0 and it will show all problems with the VSAM data set in one of the IDCxxxxx messages in spool.
If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!