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 where file is empty or not? How many ways are
there to identifying?

Answers were Sorted based on User's Feedback



How to identify where file is empty or not? How many ways are there to identifying?..

Answer / bala

1) Use IDCAMS
SYSIN DD *
PRINT INDATASET(file name) COUNT(1)
gives RC 04 if the file is an empty file.

2)Compare the file with a known empty file using IEBCOMPR
utility. Comparing two empty files gives Nonzero RC

Is This Answer Correct ?    6 Yes 1 No

How to identify where file is empty or not? How many ways are there to identifying?..

Answer / swapnilkumar

There are two ways to check for the file empty or not.
1) With FILEAID
2) With IEBPTPCH

//STEPXX EXEC PGM=FILEAID
//DD01 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//DD01O DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD DUMMY
other is

//STEPXX EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=P1.SEQUEN.INPUT.FILE,DISP=SHR
//SYSUT2 DD DUMMY
//SYSIN DD DSN=SYS1.CTLLIB(P1CTL),DISP=SHR

where CTL card has
PRINT TYPORG=PS,CNTRL=1

The either of above step gets RC=04 then the file is empty
else if its zero then file has some data in it.

Is This Answer Correct ?    5 Yes 2 No

How to identify where file is empty or not? How many ways are there to identifying?..

Answer / fred

There are so many ways this can be done.

DFSORT/SYNCSORT
ICETOOL/SYNCTOOL
IDCAMS
FILEAID/FILEMANAGER
IEBPTPCH
ISRSUPC
EASYTRIEVE
Using REXX checking with EXECIO / LISTDSI



Using SORT is the easiest:

//jobcard

//S010 EXEC PGM=SORT,PARM='NULLOUT=RC4'
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=<datasetname>
//SORTOUT DD DUMMY
//SYSIN DD *
SORT FIELDS=COPY
/*


-- RC 4 if Empty
RC 0 if there is data.

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More JCL Interview Questions

wht r different types of sort fields in jcl ?

1 Answers   IBM,


Which is the most widely used batch performance monitor for DB2?

2 Answers  


What is the purpose of dd * statement in jcl?

0 Answers  


Is acct parameter mandatory?

0 Answers  


Can we use empty VSAM as input?

9 Answers   Convergys, Kanbay,


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

0 Answers   IBM,


My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?

2 Answers   HCL,


I am getting the file from Unix to Mainframes for every 15 minutes. The mainframe job get abended with bad records coming from unix. I recovered that by deleting the bad data. I need permenant solution how to fix the issue? The record is getting characters in in first 9 positions which it should not. Please provide me the solution how to skip the records if it finds the charcters in the first 9 positions. K

3 Answers  


What parameters can be used to limit the number of records written to a sysout dataset?

1 Answers  


How do you submit a JCL under CICS environment ?

1 Answers   IBM,


List in order the hierarchical levels of jcl?

0 Answers  


What do you understand by the term job time – out and how can you overcome that?

0 Answers  


Categories