VAL_FLD


1 VAL_FLD(fieldname? , tally_literal)

(Can be used in FASTREXX procedures.)

VAL_FLD allows you to obtain the value for any field defined in a template.

fieldname
The name you specify must match a field name in the template. For nonunique names, you can specify a name in the form groupname.dataname. Name matching is not case-sensitive. If the name is unqualified, then the first occurrence of the name is used. For dimensioned fields, you can refer to an individual array element by providing a suffix subscript in the form (nn), where nn is a valid subscript for the dimensioned field.
tally_literal
Specify a literal to appear on a tally report that counts every successful operation of the function.

Example

Process the records for customer Id 10270.


if VAL_FLD('CUSTOMER-ID') = 10270 then
  return
else
  RETURN 'DROP'