3. RPG程序 -- MYDSPR



*************** Beginning of data *************************************

     FMYPF       IF  E           K        DISK                           

     FMYDSPF  CF  E                    WORKSTN                        

     F                                                                                   RRN   KSFILE SUBF       

     C           *IN12      DOWEQ'0'                                   

     C                          WRITEHEAD                                  

     C                          WRITEFOOT                                  

     C                          EXSR CLRSFL                                

     C                          EXSR REDRCD                                

     C                          ENDDO                                      

     C*                                                               

     C                          SETON                               LR               

     C*****************************************************************

     C           CLRSFL    BEGSR                                      

     C*                                                               

     C                          Z-ADD0              RRN     40                  

     C                          MOVEA'0011'    *IN,30                      

     C                          WRITESUBFC                                 

     C*                                                               

     C                          ENDSR                                      

     C*****************************************************************

     C           REDRCD    BEGSR                                      

     C*                                                               

     C           *LOVAL    SETLLFMYPF                                 

     C                           READ FMYPF                    90           

     C           *IN90      DOWEQ'0'                                   

     C                          ADD  1         RRN                         

     C                          WRITESUBF                                  

     C                          READ FMYPF                    90           

     C                          ENDDO                                      

     C*                                                               

     C                          SETON                     30               

     C           RRN         IFEQ 0                                     

     C                          SETOF                     30               

     C                          ENDIF                                      

     C                          MOVEA'10'      *IN,31                      

     C                          EXFMTSUBFC                                 

     C*                                                               

     C                          ENDSR                                      

****************** End of data ****************************************





=======================================================

【注】



处理顺序:



1. 编译物理文件MYPF,输入记录;

2. 编译显示文件MYDSPF;

3. 编译RPG程序MYDSPR;

4. CALL MYDSPR



轉自:新儒as/400家園

狼翔月影 發表在 痞客邦 PIXNET 留言(0) 人氣()