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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2002


) how do u code after getting data?

1779


In which area will you utilize 88 level items in cobol?

884


How do get the result of your program directly on your pc?

2061


Which division and paragraphs are mandatory for a COBOL program?

908


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

932


What type of SDLC u followed? Why?

1717


For rewrite, why is it mandatory that file needs to be opened?

829


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3941


Why occurs cannot be used in 01 level in COBOL?

905


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

972


What are various search techniques in cobol? Explain.

852


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

2217


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

836


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

2135