Please enable JavaScript to view this site.

A-Shell Development History

New opcode 7 provides an alternative to opcode 2 for retrieving parameter values. Instead of retrieve one value at a time by parameter name, it retrieves several sets of parameter name, value pairs based on parameter number:

xcall CGIUTL, 7, status, skipcount, parmname1, parmvalue1, ... parmnameN, parmvalueN {,string}

skipcount  (Num)  [in]

should be set to the number of name, value pairs to skip. Set to 0 to start with the first parameter.

status  (Signed Num)  [out]

returns status:

-1 = specified starting parameter number (skipcount+1) doesn't exist

-2 = not cgi mode and no string param passed

-3 = syntax error in parameter data (last parmname arg will contain the relevant part of the string)

>=0 = # of parameter name, value pairs available to process (after the skipcount). If this is larger than the number of sets of parmname, parvalue pairs passed, it indicates to the application that it can make another call (using skipcount) to get additional parameters.

parmname  (String)  [out]

returns parameter name

parmvalue  (String)  [out]

returns parameter value. You can specify up to 48 pairs of these (to stay within the 100 XCALL parameter limit). You use the returned status to determine how many of the pairs contain valid information. (CGIUTL will also set the first ununsed parmname to "" so you could also process the pairs until the first empty parmname.)

string  (String)  [in]  optional

may be used to pass a string to use as input, instead of the stdin string normally passed to A-Shell in CGI mode. Note that CGIUTL recognizes the existence of the string argument by there being an even number of arguments > 5. (So make sure your parmname,parmvalue arguments are paired or the last one will be confused with an input string). See opcode 2 for information on the format of the string input.