CGI_SYMBOLS Command

CGI_SYMBOLS is intended to be run by a HTTP server script in order to convert the CGILIB environment to CLI symbols. An optional argument is a prefix string for the created symbols (default="WWW_").

The HTTP request information is obtained by getting the values of P1, P2, and P3 (method, path, protocol). The script running this program should not modify these symbols.

This program puts the link to the HTTP server into CGI mode and flags the environment so that WWWEXEC will automatically send the CGI terminator when the DCL script exits. Note that in CGI mode, writes to net_link must explicitly include the carriage control. The first line of output must be either a content-type: header or a location: header followed by a blank line (newline sequence).

Usage:

cgi_symbols prefix [form_prefix]
cgi_symbols table  [filename]      ! filename must contain period

If (and only if) you specify a form prefix as argument 2 on the command line, the program interprets the request contents as form input,creating a series of symbols for it. The symbols created will be (xxx is form_prefix):

xxxFIELDS
Comma-separated list of field names parsed from form input. For every name in the list a DCL symbol of the form xxxFLD_name will be created. Note that the form writer must garantee that the field names will result in valid DCL symbol names (e.g. no hyphens). This list is truncated to 255 characters.
xxxFLD_yyyy
Field value of field yyyy parsed from form input. Value is truncated to 255 characters.

If you specify a filename as argument 2 on the command line, the request content data (possibly none) is saved in a file by that name and argument 1 is a logical name table to save the environment variables in, rather than creating DCL symbols.

Examples:

$ run cgi_symbols

$ mcr sys$disk:[]cgi_symbols http_ cgiform_

$ mcr sys$disk:[]cgi_symbols lnm$process form_content044.tmp


Navigation links: [Home] [WWW Information] [CERN to OSU Conversion]
HTML 3.2 Checked... Best viewed with ANY browser! http://hepwww.rl.ac.uk/Delphi/Adye/wwwdoc/cgi_symbols.html based on comments in 2.0a's [.script_code]cgi_symbols.c by David Jones (last revised 21st March 1996). Converted to HTML (26th November 1996) by
Tim Adye, <T.J.Adye@rl.ac.uk>