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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2282


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1871


How many sections are there in data division in COBOL?

880


How do you reference the following file formats from cobol programs?

902


Differentiate between structured cobol programming and object-oriented cobol programming.

830


Have you used comp and comp-3 in your project? And how?

2193


how do you reference the fixed unblock file formats from cobol programs

916


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1877


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

962


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5594


Why did you choose to work with ibm mainframe cobol programming?

838


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

2219


What is the difference between PIC 9.99 and PIC9v99?

1030


What are the different rules for performing sort operation?

944


What are the pertinent COBOL commands?

2818