Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1068


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

985


What is a hyperdescriptor? How does it work?

1193


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

1167


Define cobol coding sheet?

1057


Explain difference between escape(top or bottom) and escape immediate(top or bottom?

1262


What is the difference between read(1) and read work file once?

1112


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

1050


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

1017


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

1018


The natural file converted to PDF file if Yes then explain ?

3208


Explain why do we use file-aid for seqential files?

1131


Can you explain control variable in online screens?

1032


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?

2002


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

1018