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 / kevin

As NIKI stated the read work file 1 is identifying the work
file in JLC

As for the work read work file once it is used to get the
next record. The record pointer doesn't get reset allow
you to process records from 2 files one at at time.

For example if you are comparing record from 2 work files
and processing the records in order


read work a once /* reads the first a record
read work b once /* reads the second b record

REPEAT
IF rec-a > rec-b
process b ...
read work b once
escape top
End-if
IF rec-a < rec-b
process a ...
read work a once
ecape top
End-if
If rec-a = rec-b
process a and b ...
read work a once
read work b once
end-if
end-repeat

(of course you would need escape logic in the loop such as
end of file logic...)

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a hyperdescriptor?

889


Can we see the copy book length using file-aid?

850


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

1004


What is the quality process in development?

1018


Explain the data storage?

929


Tell me can we update with histogram?

1027


Can you explain control variable in online screens?

917


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

907


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

829


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

3080


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

999


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?

1834


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

964


Explain the address converter?

950


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

913