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

how do you code a null statement?

1349


what operation is performed by job statement?

1135


What is the function of //cntl statement?

1346


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

1204


What is the function of dd disp parameter?

1143


Name the statement which can be used to send data to another mvs jes3 node?

1186


How gdg are concatenated?

1125


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

1169


what JCL Procedures?

1261


what is DD statement is used in JCL?

1208


Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

1236


how you will the direct the data to spool using sysout option?

2439


Where & How Do You Code Identifier In Jcl?

1292


Can we use DISP=SHR in output file in JCL

1424


what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?

1240