Retrieve single parameter

xcall CGIUTL, CGIOP_GETPAR, parmname, parmval, status {, string}

Opcode 2, CGIOP_GETPAR, retrieves the web form parameter whose name is specified by parmname, into the string variable parmval. This requires that the web form was submitted with the "POST" action, and that the A-Shell session was launched via the CGI process, using the -cgi switch. (In this case, the parameters willl have been passed via the stdin channel.)  Returns status=0 for OK, or -1 if the parameter is not found, or –2 if not in CGI mode.

If string is specified it is used in place of stdin. It must be formatted in the same way that stdin would have been formatted by the CGI interface, i.e.:

name1=value1&name2=value2&...nameN=valueN"

"+" characters are interpreted as spaces, and anything of the form %xx (where xx are two hex digits) is translated to the equivalent ASCII character.)

Note that if you use the form action GET instead of POST, you can query the variables by retrieving the definition of the environment variable QUERY_STRING (see MX_GETENV) into the string parameter.

Also note that when string is specified, you do not actually have to be in CGI mode, and thus the operation could be useful for non-CGI purposes.