> I need to control the execution of certain programs based on the existence of 
> these files (including files created empty).

> I try to used IDCAMS but didn't work in my tests. 

IDCAMS should work fine when you need to know if a given dataset exists or not:
    LISTC ENT('A.B.C')
If A.B.C does not exist, you would get a rc=4, and you can 
execute the next step conditionally with the IF-THEN-ELSE capability.

Likewise, if you want to check if a dataset is empty, IDCAMS is your friend:
    REPRO IDS('A.B.C')  OFILE(DD1) COUNT(1)                  
If A.B.C is empty, you receive a rc=4.

HTH

Walter Marguccio
z/OS Systems Programmer
BELENUS LOB Informatic GmbH
Munich - Germany

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to