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

How to find occurrence of mu and pe fields in a file?

488


What is a hyperdescriptor? How does it work?

629


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

540


How to receive data passed through jcl parm parameter in a natural program?

555


What is the difference between escape(top or bottom) and escape immediate(top or bottom?

554






Explain the like inverted list?

539


Explain how to ftp the natural program to desktop? (From mainframe to pc), is it possible?

591


In a Natural program i used the below code for report FORMAT LS=132 PS=60 And down the line I want to change either LS/PS like FORMAT LS=120 PS=50, is it possible? How it will work?

1439


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

534


What is data trace system 2.0 used for?

5151


Explain what happens when you issue a escape routine in a program? Will there be any compilation /run time erro?

565


Tell me can we update with histogram?

607


How converted the natural coding for adabas

2686


What happens when you issue a escape routine in a program? Will there be any compilation /run time erro?

550


Explain is it possible to code goto statement in natural? If yes please provide the syntax of the same?

595