Interview Questions   Tutorials   Discussions   Programs   Discussion   

VSAM - What is VERIFY command ? when do you use this command? What actually it does ?

asked mar August 7, 2014 11:01 AM  

What is VERIFY command ? when do you use this command? What actually it does ?


1 Answers

answered By Mswami   0  

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.

Model syntax for the VERIFY command:

VERIFY {FILE(ddname[/password])  | 

The dataset to be verified may be specified by either FILE, which designates a DD name for which a DD statement must be provided to identify the dataset, or DATASET, which designates the name which is used to identify the dataset in the catalog.  There is no CATALOG option for the VERIFY command, so if there is no alias defined for the catalog in which the dataset can be located, it will be necessary to use either a JOBCAT or STEPCAT DD statement for the proper catalog.


The following jobstream verifies a VSAM dataset.


//IDCAMS  EXEC PGM=IDCAMS,REGION=4096K                     & nbsp; 

//SYSPRINT DD  SYSOUT=A                       &nbs p;              

//SYSIN    DD  *                          ;                     

           VERIFY DATASET(MVS801.STUDENT.FILE)                        

 /*                      &nbs p;                                     

//                      &n bsp;                        &n bsp;           

The SYSOUT from this jobstream can be viewed as VERIFY. 



   add comment

Your answer

Join with account you already have



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!