Use ProcParse to set specified variables to values determined from the procedure parameter character string (PARMLIST).
ProcParse may also be entered as Parse.
Required Operands
VBL1 is the name of a previously declared variable (see the VarDeclare command.) The variable can be declared with any attributes. ProcParse will verify that the value in PARMLIST that is to be parsed into the VBL1 variable conforms with these attributes. For character variables, data is translated to upper case if the variable is declared (explicitly or by default) as an upper case variable.
Optional Operands
VBL2-16 are an additional 15 variable names that can be specified. The discussion regarding VBL1 also applies to VBL2-16.
When a procedure is invoked, the entire parameter string is assigned to a predefined variable named PARMLIST. If the parsing scheme used by ProcParse is not adequate for a particular situation, PARMLIST can be analyzed directly.
Since ProcParse always analyzes the PARMLIST variable, it can be used to analyze data other than the parameter string. If you have other data to parse (for example, data from a session line) you can assign that data to the PARMLIST variable, and then issue the ProcParse command.
If a variable is declared with CASE=U, ProcParse will translate its value to uppercase.
ProcParse uses the same analysis routines used by the BIM-EDIT/XP commands. That is, operands can be entered positionally, by keyword, or by a combination of the two methods.
Return Codes
OK Successful.
Examples
Retrieve the parameters for a procedure:
------------------------------------------------------------------------
DECLARE MEM,CHAR,33,V
DECLARE OPT,CHAR,8,V
PARSE MEM,OPT
IF MEM,EQ,''
EXIT ER,'** MEMBER REQUIRED **'
IF OPT,EQ,''
SET OPT,PROD
------------------------------------------------------------------------
If the above procedure were called SMAP, we could invoke the procedure with parameters as follows:
=> smap omrexio,prod
We could also have invoked it as follows:
=> smap opt=prod,mem=omrexio
Or, as follows:
=> smap omrexio,opt=prod