Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to check empty file in jcl?

Answer Posted / muttaiah

There are so many utilities(ICetool, IDcams, Iebgener)
which we can make use to check whether a file is empty.

//Jobcard
//stepname exec pgm=idcams
//dd1 dd dsn=xxx.pds,disp=shr
//sysin dd *
print infile(dd1) count(1)
/*

Here the job will give a return code '0' if the file has
atleast 1 record and RC-4 if there are no records

Suppose you want to check whether any records are there
apart from header and trailer. then Make the count as Count
(3).

//sysin dd *
print infile(dd1) count(3)
/*

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is SOC4 error?

1160


How to alter the parameters for the existing gdg?

1144


what is the use of IEBGENER utility?

1115


What is jcl in mainframe?

1141


Where can program checkpoints be stored for use in a restart?

1375


which utility is used to run a cobol-db2 program?

1304


What are the difference between jcl and jes?

1542


What dd statement is used to supply the name of a dataset?

1331


Are there any set of rules for the names of the steps used in a job?

1054


What is the motivation behind coding class parameter in job statement?

1134


What is jcl in mainframe, and how many types of jcl statements are there for a job?

1112


how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

1232


Must tape dataset definitions include vol=ser specifications?

1651


What are steplib and joblib?

1123


What is the syntax of JCL statement?

1160