diff between %equal & %eof
3 posters
Page 1 of 1
diff between %equal & %eof
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
Regards,
Muthuraman
muthuraman- Posts : 42
Join date : 2009-08-28
Re: diff between %equal & %eof
%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..
%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
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|