如何讓 AS/400 自動更新畫面訊息 ?(Auto display update screen)
--------------------------------
1. 於 畫面 DDS 中指定 INVITE keyword
2. CRTDSPF 指定參數 WAITRCD(seconds) 設定畫面自動更新時間
3. 於程式中設定檔案參數 MAXDEV(*FILE)
4. 設定 Time out procedure
5. 使用 Write, Read opcode ; 不要使用 EXFMT opcode
且 Read "filename", not Read "record-format"
--------------------------------
QDDSSRC -- MARQUEE DSPF
CRTDSPF (MARQUEE) WAITRCD(3)
A PRINT
A INVITE
A INDARA
A CA03(03)
A*-------------------------------------*
A R FMT01
A*-------------------------------------*
A 1 2'MARQUEE'
A 1 27'Refresh information per 3'
A 1 72DATE
A EDTCDE(Y)
A USER 10A O 2 2
A 2 72TIME
A EDTWRD(' : : ')
*
A TEXT 30A B 14 25
*
A 23 2'F3=EXIT'
A 22 23'Don''t touch the keyboard!'
DSPATR(RI)
A 24 67'Vengoal Chang'
DSPATR(HI)
QRPGLESRC -- MARQUEER RPGLE
H option(*srcstmt)
Fmarquee CF E WORKSTN MAXDEV(*file)
F INFDS(INFDS)
F IndDs(INDDS)
D******************************************************
D* D E F I N E PROGRAM STATUS PARM *
D******************************************************
D SDS
D PGMID 1 10
D WRSTN 244 253
D USER 254 263
D******************************************************
D* D E F I N E C O N S T A N T *
D******************************************************
D F3KEY C CONST(X'33')
D******************************************************
D* D E F I N E D A T A - S T R U C T U R E *
D******************************************************
D INFDS DS
D KEY 369 369
D MajorCode 401 402
D MinorCode 403 404
* INDDS using with INDARA in DSPF DDS file level defined
D IndDs DS 99
D F3 3 3N
D ds
D TimeDate 14 0
D Time60 6 0 overlay(TimeDate: 1)
D Date80 8 0 overlay(TimeDate: 7)
C******************************************************
C* M A I N - R O U T I N E :
C******************************************************
C* *IN03 DOUEQ *ON
C F3 DOUEQ *ON
C write FMT01
C read marquee
C Select
* --------------------------------------------------------------
* - Handle time-out condition
* --------------------------------------------------------------
C When MajorCode = '03' and
C MinorCode = '10'
C time TimeDate
C movel Time60 text
C Other
C EndSl
C EndDo
C MOVE *ON *INLR
C RETURN
A blog about IBM i (AS/400), MQ and other things developers or Admins need to know.
星期二, 10月 31, 2023
2000-05-02 如何讓 AS/400 自動更新畫面訊息 ?(Auto display update screen)
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言