Notes in my PLI studying (ENDFILE)

二月 19, 2008 by pierre
Filed under: 开发指南||Programming Guide 

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^

VN:F [1.9.3_1094]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.3_1094]
Rating: 0 (from 0 votes)
  • Share/Bookmark

Comments

One Comment on Notes in my PLI studying (ENDFILE)

  1. 11 on 周二, 19th 二 2008 19:44
  2. 支持原创

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!





  • 分类目录

  • 功能

  • 联络订阅

    google reader
    订阅到抓虾
    订阅到鲜果
    订阅到飞鸽
    bloglines
    my yahoo
    netvibes