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 find whether a Flat file is empty or not without
Reading a file in COBOL Program. (not using JCL)

Answers were Sorted based on User's Feedback



How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / abhijit saha

Without JCL & Cobol i have this Option.
Just Type 'I' in front of your Datset which gives you
Data Set Information
jst Check the Current Utilization part if it shows 0 it
menas file is empty..

Is This Answer Correct ?    10 Yes 2 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / sandy

Opening a file will give a file status code of '0' and
not '10'. Only when reading, file status will be '10'

Is This Answer Correct ?    11 Yes 4 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / renu

Open the file and check the file code. If it is '10', the file is empty. It is always better to check the file code after every open statement and handle the empty file condition.

Is This Answer Correct ?    10 Yes 8 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / sharmila_g

IEBPTPCH is used to check empty dataset.. if it returns 4 the dataset is empty or if it returns 0 it is not empty.

Is This Answer Correct ?    4 Yes 2 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / srini

You can do with IDCAMS. Use input as your file and output
is dummy file and have repro count(1) in sysin dd *, if the
file is empty, you will get condition code 4 otherwise you
will get cc '0'.

Is This Answer Correct ?    5 Yes 5 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / vinodh

Goto ISPF 3.4, give the dataset name hit enter.
Press F11 until you see '%used', if its zero then the file
is empty. This will be useful if you want to validate many
GDG's for emptiness.

Is This Answer Correct ?    3 Yes 4 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / amarnadh reddy

Hi,
Use 3.4 option,to see the flat file. After it display the
file is empty.
or
When the file reading, file status code is 23.

Is This Answer Correct ?    3 Yes 5 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / anusha

Hope the dataset browse option (ISPF option) will tell
you 'DATASET is EMPTY' if no records in the file.

Is This Answer Correct ?    3 Yes 8 No

How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not usin..

Answer / sroul4

Just write COUNT in front of the data set it will show thw
record count in it. 0 in this case.

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More COBOL Interview Questions

In an EVALUATE statement, can I give a complex condition on a when clause?

2 Answers  


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

0 Answers  


The order of precedence of arithmetic operators in an expression can be overridden with the use of (a) [] (b) () (c) {} (d) Any of the above

3 Answers   TCS,


What rules are to be followed while using the corresponding options?

0 Answers  


how you will define variables length in cobol.

3 Answers   Temenos,


The below is the declaration for a variable ws 01 ws pic 9(3). if you want to insert space how will you do that. in which level u should do it

3 Answers   ADP,


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

0 Answers  


What is the Purpose of POINTER Phrase in STRING command

3 Answers  


Name some of the examples of COBOl 11?

0 Answers   CSC,


What is CALL statement in COBOL?

4 Answers  


What are 77 levels used for?

0 Answers  


01rec1. 05 a pic 999v99 value 123.12 05 b pic 99v9 value 45.9 02 rec2. 05 x pic 999v99 05 y pic 99v99 05 z pic x(3) value 'abc' if rec1 is moved to rec2 then what is the value of rec2?

5 Answers   Amdocs,


Categories