Giovanni's logo
Other environment variable functions
questo significa Versione 2
indice analitico
M
power search
blue line
Besides getenv (retrieve environment variable), two more environment variable functions are available:
  1. contlen
  2. This procedure returns as a 4 byte integer the contents of the CONTENT_LENGTH environment variable. This environment variable contains the number of characters of the input string (query string) when the POST method is used. Example:
     * Variables common to all CGIs
     /copy mysrclib/qrpglesrc,prototypeb
     /copy mysrclib/qrpglesrc,usec
     /copy mysrclib/qrpglesrc,variables3
     *          ... etc. ...
     * Retrieve query string length
    C                   eval      inactln = contlen    


  3. putenv
  4. In some circumstances, one may need to change the value of an existing environment variable, or to create a new environment variable.
    This is useful for communication between programs running in the same job, such as your program and the Net.Data language environment.
    Example:
     * Variables common to all CGIs
     /copy mysrclib/qrpglesrc,prototypeb
     /copy mysrclib/qrpglesrc,usec
     /copy mysrclib/qrpglesrc,variables3
     *          ... etc. ...
     * Set to blank environment variable QUERY_STRING
    C                   callp     putenv('QUERY_STRING=':qusec)