PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

diff between %equal & %eof

3 posters

Go down

diff between %equal & %eof Empty diff between %equal & %eof

Post  muthuraman Thu Oct 29, 2009 5:15 pm

Could you please enlighten me if %eof() followed by reade or %equal followed by reade is appropriate and which is the IBM standard?

Regards,
Muthuraman

muthuraman

Posts : 42
Join date : 2009-08-28

Back to top Go down

diff between %equal & %eof Empty Re: diff between %equal & %eof

Post  swaminathan Mon Dec 14, 2009 6:29 pm

%EOF can be used to check for end-of file, beginning of file, or subfile full conditions. A READ and READE return %EOF=*ON if the end of file is reached. READP and READPE return %EOF=*ON if the beginning of file is reached. The WRITE operation returns %EOF=*ON if the WRITE operation to a subfile detail record returned a subfile-full condition.

%EQUAL is used by the SETLL operation to indicate that it detected a record in the file with a key equal to that of the value specified in Factor 1. Since SETLL does not read the record, does not lock the record, and does not copy the data into the input buffer, SETLL is much faster and less of an impact on the performance of the application than other operations, such as CHAIN. Use CHAIN when you need to retrieve the record, use SETLL and %EQUAL when you need to only check for the existence of a record.

so %eof followed by Reade is good standard..

Correct me if i am wrong..

swaminathan

Posts : 12
Join date : 2009-07-30

Back to top Go down

diff between %equal & %eof Empty Re: diff between %equal & %eof

Post  anandh Mon Dec 14, 2009 7:15 pm

I agree with Swaminathan.

anandh

Posts : 1
Join date : 2009-08-26

Back to top Go down

diff between %equal & %eof Empty Re: diff between %equal & %eof

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum