reqExist()

This procedure checks if given object exists.

ParameterTypeDescription
baseNode1024A VARYING, VARSIZEMandatoryThis parameter is used to pass base node. Currently following base nodes are supproted: “IptorAPI”, “method”, “params”, “messages”, “control”, “id”
node1024A VARYING, VARSIZEOptionalNode name. This parameter is optional. If the structure is more complex then nodes must be divided by colon “:”

The procedure returns *ON if object exists or *OFF if object do not exist. Usually procedure reqExist is used in “if” statement.

Examples:

if reqExist('method');

if reqExist('parms': 'order');

if reqExist('parms': 'orders:line');

Check if object “item” exst inside “params”, if so thenget value:

if reqExist('params': 'item'); 
  X007PRDC = %TRIM(reqGetVALUE('params': 'item'));
else;
  return API_PARAMS_ERR;
endif;