FUNCTION KEY ATTENTION IDENTIFICATION BYTE


An alternative to assigning function-key response indicators is being used more frequently in RPG applications. This method avoids indicator assignment and uses the function key attention identification byte (located in position 369 of the workstation information data structure) to identify which function key has been pressed. Table 1.8 illustrates how this byte can be interpreted.

Figure 1.9 illustrates the use of the attention identification byte (also referred to as the "scan code") in RPG.

start figure

 .....FFilename++IPEASFRlen+LKlen+AIDevice+.Functions++++++++++++++++++++++++++++      FDSPFILE   CF   E             WORKSTN INFDS(wsds) .....DName+++++++++++ETDsFrom+++To/L+++IDc.Functions++++++++++++++++++++++++++++      D WSDS            DS      D  Fkey      369        369A      D  F3 C Const(X'33') .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq....      C                   Dow                 FKey F3      C                   EXFMT     ShowData      C                   If        FKey = F3      C                   Eval      *INLR = *ON      C                   leave      C                   endIf      C* ... program continues...      C                   endDo 

end figure

Figure 1.9: Example of the attention-identification byte.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net