POST (POST DEVICE SPECIFIC INFORMATION)


In Example 11.4, the Program Status Data Structure (PSDS), defined on lines 2 and 3, is used by the POST operation (line 7) to write device-dependent feedback information to the information data structure (WSDS on lines 4 to 6) for the CUSTINQ workstation file. The WSID subfield (lines 3 and 7) contains the name of the device that is being used to run the RPG program.

Example 11.4: POST status information to the INFDS.

start example
 .....FFileName++IFEASFRlen+LKeylnKFDevice+.Functions++++++++++++++++++++++++++++ 0001 FCUSTINQ   CF   E             WORKSTN Infds(wsds) .....DName+++++++++++EUDSFrom+++To+++++TDc.Functions++++++++++++++++++++++++++++ 0002 D PSDS           SDS 0003 D   wsid                244    253A 0004 D Wsds            DS 0005 D Status *STATUS 0006 D DispMode 252 252A .....CSRn01Factor1+++++++OpCode(ex)Factor2+++++++Result++++++++Len++DcHiLoEq....       *  POST the workstation device information to the DS 0007 C     WSID          POST      CUSTINQ                              73       * Test for a device that supports 132-columns 0008 C                  If        DispMode = X'17' and (*IN73 = *OFF) 0009 C                  z-add     132           SIZE              3 0 0010 C                  else 0011 C                  z-add     80            SIZE 0012 C                  EndIf 0013 C                  select 0014 C                  When      Size = 132 0015 C                  ExFmt     PANEL4 0016 C                  When      Size = 80 0017 C                  ExFmt     PANEL3 0018 C                  endSL 
end example

The DISPMODE field contains a special code that indicates whether the display is capable of displaying 132 characters. When DISPMODE equals hexadecimal '17' the display device supports 132 characters.




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