RPG Array Operations - LOOKUP (Look Up a Table or Array Element)

Description: Searches an array or table for a value and sets indicators.

Legacy RPG400 Example:

C   SearchVal   LOOKUP   ArrayName    99

Modern RPGLE Example:

dcl-s Index int(10);

Index = %lookup(SearchVal : ArrayName);

if Index > 0;
// Found
endif;
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>