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 identify in JCL that an input file is empty without
reading it?

Answer Posted / mainframeking

Usinf IDCAMS we can check:

//step01 dd exec pgm=idcams
//sysprint dd sysout=*
//input dd dsn=file name to check, disp=shr
//sysin dd *
print infile(input)character count(1)

if return code is 0, file is not empty
if return code is 4, file is empty

Is This Answer Correct ?    17 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define concatenating?

1107


I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?

1239


How to do automated restart when a job abend?

1393


Explain how can the disposition of sysout datasets be set for an entire jobstream?

1093


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

2414


How to run cobol program using jcl?

1238


which utility is used to sort a file in jcl?

1227


Explain how can an in-stream dataset be terminated?

1335


How can return codes be tested before execution of a job step?

1483


Explain the job statement in jcl?

1163


What is concatenating?

1086


How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5541


What is timing concept in mainframe?

2210


How can the disposition of sysout datasets be set for an entire jobstream?

1348


What is the purpose of the dd keylen parameter?

1224