Hi ,
How to check whether VSAM is empty or not? I know how to check for PS file. but i got stuck with VSAM .
Gautham
This at least partly depends upon what you mean by "empty". A VSAM file that has been defined but never loaded with any records cannot be opened for input -- period. A VSAM file that has been opened for output, had a record written to it, then closed -- even if the record is then deleted -- can be opened for input.How to check whether VSAM is empty or not through JCL ?
This may be accurate, but it is completely nonresponsive. A VSAM (note that VSAM is an acronym and should be capitalized in English) file that has no records either (1) has never had any records, or (2) had at least one record that was deleted. For case (1), you must use IDCAMS to do a LISTCAT command on the data set and parse the output looking for the record count -- or use a similar method using the product of your choice -- since you absolutely, positively cannot open the file for input to count the records. For case (2), you can use the utility of your choice to copy the file to a DUMMY data set and get the count of copied records.My Vsam file contains no records .
Ya , i know that command . But is it possible through JCl ?
Using flat file we can do .. but my doubt was whether we can check VSAM is empty or not through JCL.
Return to DFSORT/ICETOOL/ICEGENER