自動実行(RPG) 定期的に自動ENTERがかかる方法


画面DDS定義

     A                                      DSPSIZ(*DS3)                
     A                                      CA05 CA07 CF01 CA06         
     A                                      INVITE                      

   コンパイル(CRTDSPF)時にWAITRCD(秒数)を設定する。

RPGソース

FDSP01D  CF  E                    WORKSTN                        
F                                              KNUM        1     
F                                        RRN1  KSFILE SFLRE1     
F                                              KINFDS CRECNO     
F                                              KINFSR *PSSR      
I           SDS                                               
I                                     *ROUTINE LOC            
I                                     *STATUS  ERR            
I                                     *PARMS   PARMS          
I                                     *PROGRAM NAME           
I                                      244 253 JOBNM          
ICRECNO      DS                                               
I                                    B 370 3710DSCUR          
I                                    B 378 3790RCDNO          
I                                      401 404 MJCODE         
I                                     *STATUS  @STTS          
 
C                     WRITESFLCT1                 80             
通常のEXFMTと同じ意味(WRITE,READで)
C                     READ DSP01D                 0203 SFL 表示  
C* ループ回避                                                    
C           MJCODE    IFEQ '0300'                                 画面上で自動実行と実行キーが同時の場合、ループするため
C                     WRITETESTFR                                 回避する方法
C                     EXSR S\END                                 
C                     ENDIF                                      
C   02      @STTS     IFEQ 1331                                   自動実行された時
C                     GOTO L\01                                  
C                     END                                        

 

HOME   戻る