* Prototype CGI APIs                                                                          
     D WrStout         PR                  ExtProc('QtmhWrStout')                                   
     D  WrtDta                   102400    Const                                                    
     D  WrtDtaLen                    10I 0 Const                                                    
     D  WPError                      56                                                             
      *                                                                                             
     D PutEnv          PR                  ExtProc('QtmhPutEnv')                                    
     D  RcvRec                   102400    Const                                                    
     D  RcvLen                       10I 0 Const                                                    
     D  WPError                      56                                                             
      *                                                                                             
     D GetEnv          PR                  ExtProc('QtmhGetEnv')                                    
     D  EnvRec                   102400                                                             
     D  EnvLen                       10I 0 Const                                                    
     D  EnvRecLen                    10I 0                                                          
     D  EnvName                      64    Const                                                    
     D  EnvNameLen                   10I 0 Const                                                    
     D  WPError                      56                                                             
      *                                                                                             
     D RdStin          PR                  ExtProc('QtmhRdStin')                                    
     D  RcvRec                   102400                                                             
     D  RcvLen                       10I 0 Const                                                    
     D  RcvRecLen                    10I 0                                                          
     D  WPError                      56                                                             
      *                                                                                             
     D CvtDB           PR                  ExtProc('QtmhCvtDb')                                     
     D  RcvFile                      20    Const                                                    
     D  RcvRec                   102400    Const                                                    
     D  RcvLen                       10I 0 Const                                                    
     D  OutString                102400                                                             
     D  CvtLen                       10I 0 Const                                                    
     D  CvtLenAv                     10I 0                                                          
     D  CvtStat                      10I 0                                                          
     D  WPError                      56                                                             
      *                                                                                             
     D CGIParse        PR                  ExtProc('QzhbCgiParse')                                  
     D  CmdStr                   102400    Const                                                    
     D  ParseFmt                      8    Const                                                    
     D  TgtBuf                   102400                                                             
     D  TgtBufLen                    10I 0 Const                                                    
     D  RespLen                      10I 0                                                          
     D  WPError                      56                                                             
      *                                                                                             
      * CGI API Wrapper Prototypes                                                                  
      *//////////////////////////////////////////////////////////////*                              
      * (#WrStout) Write to Standard Output                          *                              
      *                                                              *                              
      * WrtDta (Input) - Write data to Standard Output               *                              
      *//////////////////////////////////////////////////////////////*                              
     D #WrStout        PR                                                                           
     D  WrtDta                   102400    Varying Const                                            
      *                                                                                             
      *//////////////////////////////////////////////////////////////*                              
      * (#PutEnv) Put Environment Variable                           *                              
      *                                                              *                              
      * RcvRec (Input) - Environment variable and data pair          *                              
      *                  Example: QUERY_STRING=NAME=ERPGSDK          *                              
      *//////////////////////////////////////////////////////////////*                              
     D #PutEnv         PR                                                                           
     D  RcvRec                   102400    Varying Const                                            
      *                                                                                             
      *//////////////////////////////////////////////////////////////*                              
      * (#GetEnv) Get Environment Variable                           *                              
      *                                                              *                              
      * EnvName (Input) - Environment variable name to retrieve      *                              
      * Returns - Environment variable data                          *                              
      *//////////////////////////////////////////////////////////////*                              
     D #GetEnv         PR        102400    Varying                                                  
     D  EnvName                      64    Const                                                    
      *                                                                                             
      *//////////////////////////////////////////////////////////////*                              
      * (#RdStin) Read Standard Input                                *                              
      *                                                              *                              
      * Returns - Standard input data                                *                              
      *//////////////////////////////////////////////////////////////*                              
     D #RdStin         PR        102400    Varying                                                  
      *                                                                                             
      *//////////////////////////////////////////////////////////////*                              
      * (#CvtDB) Conert to DB                                        *                              
      *                                                              *                              
      * RcvRec (Input) - Query String or Standard Input data         *                              
      * RcvFile (Input) - File used for conversion                   *                              
      * RcvLib (Input) - Library of file                             *                              
      * Returns - Converted data to be placed into a data structure  *                              
      *           defined externally using the file specified in     *                              
      *           parameters 2 and 3 .                               *                              
      *//////////////////////////////////////////////////////////////*                              
     D #CvtDB          PR        102400    Varying                                                  
     D  RcvRec                   102400    Varying Const                                            
     D  RcvFile                      10    Const                                                    
     D  RcvLib                       10    Const                                                    
      *                                                                                             
      *//////////////////////////////////////////////////////////////*                              
      * (#CGIParse) Parse CGI Variables                              *                              
      *                                                              *                              
      * InCmdStr (Input) - Command string                            *                              
      * Returns - Parsed data                                        *                              
      *//////////////////////////////////////////////////////////////*                              
     D #CGIParse       PR        102400    Varying                                                  
     D  InCmdStr                     64    Const