You are processing an input file in a Natural program and you
want the program to fail if the file is empty. What command you
use in Natural to force it to fail ?

Answer Posted / jaishree

You use the following steps to check whether the input file
is empty

Step A. Read work file #WK-Number once #WK-Record
Step B. At End of File
Write "Input file is Empty"
End-Endfile

The first step will read the first record in the file and
the next step will see the End of File condition. If the
File is empty, the program will write that we have an Empty
input file to spool.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to move cursor to a particular field when position is not known?

753


What is data trace system 2.0 used for?

5386


Tell me can we update with histogram?

791


Explain difference between read work file 1 and read work file once? Why we are using work file once?

738


What is a hyperdescriptor?

702


Tell me what type of files we can process thru file-aid?

723


Explain how to receive data passed through jcl parm parameter in a natural program? How data definition is defined in the program?

810


How can we see the copy book length using file-aid?

724


What is a hyperdescriptor? How does it work?

803


How are you going to remove duplicates from the file that is being read?

710


Explain how are you going to remove duplicates from the file that is being read?

755


Explain how many work file we can code in jcl?

742


Can you explain control variable in online screens?

738


Define cobol coding sheet?

730


Explain control variable in online screens?

768