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?

Answers were Sorted based on User's Feedback



How to identify in JCL that an input file is empty without reading it?..

Answer / 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

How to identify in JCL that an input file is empty without reading it?..

Answer / gajendra

We can also Fileaid for the same

Is This Answer Correct ?    4 Yes 2 No

How to identify in JCL that an input file is empty without reading it?..

Answer / sivakumar sekharannair

You can use IEBCOMPR
Used to compare two sequential data sets, two partitioned data sets or two PDSEs at the logical record level to verify a backup copy. Fixed, Variable, or undefined records from blocked or unblocked data sets or members can also be compared. However, you should not use IEBCOMPR to compare load modules.

Is This Answer Correct ?    1 Yes 0 No

How to identify in JCL that an input file is empty without reading it?..

Answer / jeeva225

//job331ab job notify=&sysuid
//step1 exec pgm=idcams
//sysprint dd sysout=*
//input dd dsn=job331ab.prasad.infile,disp=shr
//sysin dd*
print infile(input)count(1)
/*
if return code rc=00 then it is not empty file,
return code rc=04 then it is empty

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More JCL Interview Questions

How to release the Output HELD by using HOLD = YES on DD statement ?

2 Answers   IBM,


Explain about LMCOPY -

1 Answers  


Can we call instream to catalog and catalog to instream?

0 Answers  


what is SOC4 error?

0 Answers  


how to override PROC? please give answer in details. Please mention how to write it in JCL. Thanks in advance.

6 Answers   Syntel, UHG,


Can comments be specified at the very beginning of a jobcard? Will the JCL execute?

3 Answers  


How do you submit a JCL under CICS environment ?

5 Answers   Wipro,


If i am going to change some variable in a copybook( size or variable type) ,what are the changes that need to be done in the corresponding JCL.

4 Answers   IBM,


how to resolve the soc4 error?

5 Answers   ITC Infotech,


What is GDG?

1 Answers  


When we give TYPERUN = SCAN , what are the syntax errors we get?

5 Answers   Kanbay,


i have a file which contains duplicates ? my requirement is to eliminate duplicates and these elminated duplicates should be moved to another file can any code this using sort ?

3 Answers   IBM,


Categories