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
Explain difference between escape(top or bottom) and escape immediate(top or bottom?
Explain why do we use file-aid for seqential files?
Explain the data storage?
Explain the address converter?
What is data trace system 2.0 used for?
Can we see the copy book length using file-aid?
What is a hyperdescriptor?
Explain is it possible to code goto statement in natural? If yes please provide the syntax of the same?
Explain the difference between external subroutine and subprogram?
How converted the natural coding for adabas
Explain difference between read(1) and read work file once?
What happens when you issue a escape routine in a program? Will there be any compilation /run time erro?
Explain how to ftp the natural program to desktop? (From mainframe to pc), is it possible?
What is the difference between read work file 1 and read work file once? Why we are using work file once?
Explain how to find occurrence of mu and pe fields in a file?