2016-02-20 32 views
1

我卡在一个问题上。我知道要执行的循环,我需要读取循环内的记录,但我无法弄清楚如何做到这一点..这就是我对这部分代码的了解。我不知道该怎么办将记录读入RPGLE循环?

//Initial Subroutine 
    Begsr Initial; 
    Write Headings; 
    Read WUINPAY; 
     Holdvar=pinst# 
     DoU %Eof; 
     If Holdvar <>0; 
     Endif; 
     Enddo; 

回答

2

您需要在循环内有READ。

最常用的方式编写读取环路

read ... 
dow not %eof; 
    do stuff 
    read ... 
enddo;