Answers

Question and Answer:

  Home  IBM Natural

⟩ Suppose 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?

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.

 138 views

More Questions for you: