List of CGI Environment Variables

Nr. Env. Var Desc. Value


01 02 FILLER PIC X(256) VALUE "DOCUMENT_ROOT;The root directory of your server". *> 02 02 FILLER PIC X(256) VALUE "HTTP_COOKIE;The visitor's cookie, if one is set". *> 03 02 FILLER PIC X(256) VALUE "HTTP_HOST;The hostname of the page being attempted". *> 04 02 FILLER PIC X(256) VALUE "HTTP_REFERER;The URL of the page that called your program". *> 05 02 FILLER PIC X(256) VALUE "HTTP_USER_AGENT;The browser type of the visitor". *> 06 02 FILLER PIC X(256) VALUE "HTTPS;on, if the program is being called through a secure server". *> 07 02 FILLER PIC X(256) VALUE "PATH;The system path your server is running under". *> 08 02 FILLER PIC X(256) VALUE "QUERY_STRING;The query string". *> 09 02 FILLER PIC X(256) VALUE "REMOTE_ADDR;The IP address of the visitor". *> 10 02 FILLER PIC X(256) VALUE "REMOTE_HOST;The hostname of the visitor (if your server has reverse-name-lookups on, otherwise this is the IP address again)". *> 11 02 FILLER PIC X(256) VALUE "REMOTE_PORT;The port the visitor is connected to on the web server". *> 12 02 FILLER PIC X(256) VALUE "REMOTE_USER;The visitor's username (for .htaccess-protected pages)". *> 13 02 FILLER PIC X(256) VALUE "REQUEST_METHOD;GET or POST". *> 14 02 FILLER PIC X(256) VALUE "CONTENT_LENGTH;length of content". *> 15 02 FILLER PIC X(256) VALUE "CONTENT_TYPE;type of content". *> 16 02 FILLER PIC X(256) VALUE "REQUEST_URI;The interpreted pathname of the requested document or CGI (relative to the document root)". *> 17 02 FILLER PIC X(256) VALUE "SCRIPT_FILENAME;The full pathname of the current CGI". *> 18 02 FILLER PIC X(256) VALUE "SCRIPT_NAME;The interpreted pathname of the current CGI (relative to the document root)". *> 19 02 FILLER PIC X(256) VALUE "SERVER_ADMIN;The email address for your server's webmaster". *> 20 02 FILLER PIC X(256) VALUE "SERVER_NAME;Your server's fully qualified domain name (e.g. www.name.com)". *> 21 02 FILLER PIC X(256) VALUE "SERVER_PORT;The port number your server is listening on". *> 22 02 FILLER PIC X(256) VALUE "SERVER_SOFTWARE;The server software you're using (e.g. Apache 1.3)". 01 WS-ENV-VARS-R REDEFINES WS-ENV-VARS. 02 WS-ENV-VARS-LINES OCCURS C-MAX-IND TIMES. 03 WS-ENV-LINE PIC X(256). 01 WS-TAB-FIELDS. 02 WS-ENV-NAME PIC X(40). 02 WS-ENV-DESC PIC X(216). 02 WS-ENV-TXT PIC X(256). ?> C-MAX-IND INITIALIZE WS-TAB-FIELDS UNSTRING WS-ENV-LINE(WS-IND) DELIMITED BY ";" INTO WS-ENV-NAME WS-ENV-DESC MOVE FUNCTION TRIM(WS-ENV-NAME) TO LNK-ENV-NAME OF LNK-HTM2COB-ENV CALL "HTM2COB-ENV" USING LNK-HTM2COB-ENV END-CALL MOVE FUNCTION TRIM(LNK-ENV-VALUE OF LNK-HTM2COB-ENV) TO WS-ENV-TXT DISPLAY "" ""WS-IND"" ""WS-ENV-NAME"" ""WS-ENV-DESC"" ""WS-ENV-TXT"" "" END-DISPLAY END-PERFORM EXIT SECTION . ?>