RE: How to test the given dataset is empty (or) not th...
Use simple Sort utility JCL and try to copy the data (SORT FIELDS COPY) form the file which you want to test to an output file. in Sysout of the job run you can see the record counts of input and output files. This gives the count of the data which you want to test.
RE: How to test the given dataset is empty (or) not th...
Return codes can be set to 12 if the dataset is empty and 0 if not empty using ICETOOL. Subsequent processing can follow based on the return code in the ICETOOL step as required.
In this below example Return code of STEP1 will be set to 12 if dataset USERNAME.FILE1 is empty. STEP2 will run if return code is 0 i.e if dataset is not empty.
RE: How to test the given dataset is empty (or) not through jcl in mainframes?
You can check whether a dataset has any values of empty without writing a jcl too..Just go to the job where it is present... Type "tso cb" in the command and keep in the mouse arrow on the dataset and press enter you can see the contents of the dataset...