IWC.FindAppCGIValue: Retrieving a WebFOCUS Parameter or Variable Value

How to:

The IWC.FindAppCGIValue function retrieves WebFOCUS parameter or variable values by pairing the WebFOCUS parameter or variable name with the Maintain Data variable name to which the value is assigned.

Note: Unlike Maintain variables, WebFOCUS parameters and variables are case-sensitive.

Syntax: How to Retrieve a WebFOCUS Parameter or Variable Value

IWC.FindAppCGIValue(parm,mnt_var);

where:

parm

Is the WebFOCUS parameter or variable whose value you are retrieving. This value is case-sensitive, and must be alphanumeric.

mnt_var

Is the Maintain Data variable that receives the value of the WebFOCUS parameter or variable.

Example: Retrieving a WebFOCUS Variable Value From a Launch Form

IWC.findAppCgiValue retrieves the user name and password from the IBIC_user and IBIC_pass variables, respectively:

Maintain 
COMPUTE username/A8;
COMPUTE password/A8;
IWC.findAppCgiValue("IBIC_user", username);
IWC.findAppCgiValue("IBIC_pass", password);

Example: Retrieving Parameterized Data From Excel

IWC.findAppCgiValue retrieves the values for fields listed in an Excel file:

MAINTAIN FILE car
MODULE IMPORT (webbase2 errors);
Case Top
compute xlsRetail_Cost/a0;
Infer car.ORIGIN.COUNTRY car.COMP.CAR car.CARREC.MODEL
car.BODY.BODYTYPE car.BODY.RETAIL_COST into car_stack;
car_stack.FocCount=1;
car_stack.FocIndex=1;
iwc.findAppCgiValue("COUNTRY",car_stack.country);
iwc.findAppCgiValue("CAR",car_stack.car);
iwc.findAppCgiValue("MODEL",car_stack.model);
iwc.findAppCgiValue("BODYTYPE",car_stack.bodytype);
iwc.findAppCgiValue("RETAIL_COST",xlsRetail_Cost);
car_stack.retail_cost = xlsRetail_Cost;
update car.BODY.RETAIL_COST from car_stack;
EndCase
END