Notes in my PLI studying (ENDFILE)
This is some notes about a condition parameter ENDFILE.
As we know , ENDFILE is used for checking whether the read operation is reach the end of the input file,
for examp:
DCL EOF BIT INIT(’1′B);
ON ENDFILE (IPUTF) EOF = ’0′B;
DO WHILE(EOF);
some statements;
END;
1. Suppose there are two input files with more than one record for input, you should define two EOF to control the ENDFILE condition, otherwise system will abend your job;
2. In the example, if you initialize the EOF with INIT(’0′B), you should specify the value of EOF in the WHILE statement like DO WHILE(EOF = ’1′B) instead of DO WHILE(EOF), otherwise the do while loop will not execute.
I hope these notes will be useful for you guys, happy new year~~~^o^
Comments
One Comment on Notes in my PLI studying (ENDFILE)
-
11 on
周二, 19th 二 2008 19:44
支持原创
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


