Learn from sources
       Member VARIABLES1 in CGIDEV2 / QRPGLESRC

       *=====================================================================
       * Variables for getinput subprocedure
       *   Indata can be any size up to 32767.  If it's not  big enough
       *   to hold all the input, all kinds of errors may occur.
       *=====================================================================
      D InData          s          32767                                         Area to accept input
      D InActLn         s             10i 0                                      Actual length Rcvd
      D ReqMethod       s              4                                         Returns GET or POST
       *
       *=====================================================================
       * Variables for QtmhCvtDb API, prototyped as CvtDb.
       *  DbFileName MUST be UPPERCASE!
       * DBFName = Database file name
       * DBFLib  = Database library name
       *=====================================================================
      D DBFileName      ds                                                       DS File & library
      D   DBFName                     10a   inz('CGIEXTERDS')
      D   DBFLib                      10a   inz('CGIDEV2   ')
       * Data structure for QtmhCvtDb API, (QtmhCvtDb prototyped as CvtDb)
      D CGIEXTERDS    e ds
      D DBDSLn          S             10i 0 inz(%size(CGIEXTERDS))               Size of DS
      D DBActLn         S             10i 0                                      Data Ln returned
      D DBRespCd        S             10i 0                                      Response code
       *=====================================================================
       * Constant for updHTMLvar subprocedure
       *=====================================================================
      D initHTMLVars    c                   '0'
       *
       *=====================================================================
       * For returning environment variables
       *=====================================================================
      D Remote_ide      S            512A
      D Remote_use      S            512A
      D Q_String        S            512A
      D S_Software      S            256A                                        File containing
      D S_Name          S            256A                                        File containing
      D S_Protocol      S            256A                                        File containing
      D G_Interf        S            256A                                        File containing
      D S_Port          S            256A                                        File containing
      D R_Method        S            256A                                        File containing
      D P_Info          S            256A                                        File containing
      D P_Trans         S            256A                                        File containing
      D Script_N        S            256A                                        File containing
      D R_Host          S            256A                                        File containing
      D R_Addr          S            256A                                        File containing
      D HTTP_Acc        S            256A                                        File containing
      D HTTP_Coo        S            512A   varying                              File containing
      D HTTP_Refer      S            256A                                        File containing
      D HTTP_UserA      S            256A                                        File containing
      D C_Type          S            256A                                        File containing
      D C_Length        S            256A                                        File containing
      D IBM_CCSID       S            256A                                        File containing
      D AUTH_TYPE       S            256A                                        File containing
      D CGI_A_CCS       S            256A                                        File containing
      D CGI_MODE        S            256A                                        File containing
      D CGI_E_CCS       S            256A                                        File containing
       *=====================================================================
       * Variable for countp subprocedure
       *=====================================================================
      D counter         S             10i 0                                      Returned counter
       *=====================================================================
       * Variables for retrieving cgi variable counts and numbers
       *=====================================================================
      D VarCount        s             10i 0                                      cgivarval
      D VarOcc          s             10i 0                                      occurence
       *
       * Return code
      D rc              s             10i 0 inz(0)                               return code
       *
      D oses            s            300                                         oper systems
       *
       *=====================================================================
       * For handling persistence
       *=====================================================================
      Dsessionid        s             15
      Dpathinfo         s            250
      Dpathinfolen      s             10i 0
      Dtimeout          s              5u 0 inz(3)                               min for httimeout hd
       *=====================================================================
       * Program timing variables
       *=====================================================================
      D timedata1       s               z
      D timedata2       s               z
      D ms              s             10i 0
      D sec             s             10p 3
       *
       *=====================================================================
       * Indicators for chknbr subprocedure
       *=====================================================================
      D ChkNbrInds      ds
      D  Indicators                     n   dim(7)
       *
       *=====================================================================
       * Initialization complete switch
       *=====================================================================
      D InitComplete    s               n
       *
       *=====================================================================
       * Some nice fields to help us through from lower to upper case character conversion
       *=====================================================================
      D lw              C                   CONST('abcdefghijklmnopqrstuvwxyz')
      D up              C                   CONST('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
       *=====================================================================
       * Program timing variables
       *=====================================================================
      D TimeStart       s               z
      D TimeEnd         s               z
      D MsElaps         s             10i 0
      D SecElaps        s             10p 3
       *=====================================================================
       * For program status data structure and program status subroutine
       *=====================================================================
      D pssrswitch      s              1    inz(*off)                            switch for pssr
      D wrotetop        s              1    inz(*off)                            Whthr top sec wrtn
       *
      D psds           sds                                                       Pgm status DS
      D   psdsdata                   429                                         The data
       * PROGRAM STATUS DATA STRUCTURE LAYOUT
       * For documentation of Program Status Data Structure fields, see
       * http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AGZ03/1.5.2.1?
       * SHELF=QB3AYC08&DT=19990323173815#TBLPROSTA8
       *======
       * Program name
      D  psdsPgmNam                   10    overlay(psdsdata:001)
       * Status code
      D  psdsStsCde                    5s 0 overlay(psdsdata:011)
       * Previous status code
      D  psdsStsPrv                    5s 0 overlay(psdsdata:016)
       * RPG IV source listing line number or statement number
      D  psdsStmNbr                    8    overlay(psdsdata:021)
       * Name of the RPG IV routine in which the exception or error occurred
      D  psdsErrRtn                    8    overlay(psdsdata:029)
       * Number of parameters passed to this program from the calling pgm
       * (-1 if no parameters)
      D  psdsParms                     3s 0 overlay(psdsdata:037)
       * Exception type (CPF or MCH)
      D  psdsExcTyp                    3    overlay(psdsdata:040)
       * Exception number (message number)
      D  psdsExcNbr                    4    overlay(psdsdata:043)
       * Work area for messages (internal use only)
      D  psdsMsgWrk                   30    overlay(psdsdata:051)
       * Name of library in which the program is located
      D  psdsPgmLib                   10    overlay(psdsdata:081)
       * Retrieved exception data
      D  psdsExcDta                   80    overlay(psdsdata:091)
       * Identification of the exception that caused
       * RNX9001 exception to be signaled
      D  psdsExcID                     4    overlay(psdsdata:171)
       * Name of file on which the last file operation occurred
       * (updated only when an error occurs)
      D  psdsExcFl                    10    overlay(psdsdata:175)
       * Date (*DATE format) the job entered the system
      D  psdsDATE                      8    overlay(psdsdata:191)
       * First 2 digits of a 4-digit year
      D  psdsYEAR1                     2s 0 overlay(psdsdata:199)
       * Name of file on which the last file operation occurred
       * (updated only when an error occurs)
       * For longer file name, see field "psdsExcFl"
      D  psdsExcFlS                    8    overlay(psdsdata:201)
       * Status information on the last file used
      D  psdsLstFSts                  35    overlay(psdsdata:209)
       * Job name
      D  psdsJobNam                   10    overlay(psdsdata:244)
       * User profile name
      D  psdsUsrNam                   10    overlay(psdsdata:254)
       * Job number
      D  psdsJobNbr                    6    overlay(psdsdata:264)
       * Date (in UDATE format) the program started running in the system
      D  psdsRunDtS                    6    overlay(psdsdata:270)
       * Time (in the format hhmmss) the program started running in the system
      D  psdsRunTmS                    6    overlay(psdsdata:276)
       * Time (in the format hhmmss) of the program running
      D  psdsRunTmR                    6    overlay(psdsdata:282)
       * Date (in UDATE format) the program was compiled
      D  psdsCmpDat                    6    overlay(psdsdata:288)
       * Time (in the format hhmmss) the program was compiled
      D  psdsCmpTme                    6    overlay(psdsdata:294)
       * Level of the compiler
      D  psdsCmpLvl                    4    overlay(psdsdata:300)
       * Source file name
      D  psdsSrcF                     10    overlay(psdsdata:304)
       * Source library name
      D  psdsSrcFLb                   10    overlay(psdsdata:314)
       * Source member name
      D  psdsSrcMbr                   10    overlay(psdsdata:324)
       * Program containing procedure
      D  psdsPrcPgm                   10    overlay(psdsdata:334)
       * Module containing procedure
      D  psdsPrcMod                   10    overlay(psdsdata:344)
       * Source Id matching the statement number from positions 21-28
      D  psdsSrcId1                    2s 0 overlay(psdsdata:354)
       * Source Id matching the statement number from positions 228-235
      D  psdsSrcId2                    2s 0 overlay(psdsdata:356)
       * Current user profile name
      D  psdsUsrPrf                   10    overlay(psdsdata:358)
       *
0.059 sec.s