differnce between read work file 1 and read work file once?
why we are using work file once?

Answer Posted / satya

To answer why do we use READ WORK FILE 1 ONCE

It is generally used when you specifically want to know if
the input file is empty programatically and if you would
like to handle the way you wanted if the file is empty,just
like below,

READ work 1 ONCE #WORK
AT END OF FILE
Write "Input empty"
terminate 99
END-ENDFILE

this piece of code can be placed at the begining of your
program and this helps to avoid unnecessary entry into
programming statements with empty file in input, unless
expected

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

610


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

591


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

563


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

554


What is the difference between read work file 1 and read work file once? Why we are using work file once?

527






What is a hyperdescriptor?

522


What is the quality process in development?

569


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

532


What is a hyperdescriptor? How does it work?

625


Explain adabas basic concepts. Like inverted list, address converter ,data storage?

556


Can you explain control variable in online screens?

554


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

484


Explain the address converter?

566


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

545


How to create 1 ddm that fetches 3 adabas files simultaneously?

535