The first step in developing this example is to write the ABL procedure GetCustName.p. The procedure requires an INTEGER parameter as input and a CHARACTER parameter as output. The code is as follows:

DEF INPUT PARAM customerNumber AS INTEGER.
DEF OUTPUT PARAM customerName AS CHAR.
IF CONNECTED("sports2000") THEN DO:
   FIND FIRST customer WHERE custNum = customerNumber NO-LOCK NO-ERROR.
   IF AVAILABLE customer THEN
      customerName = Name.
   ELSE
       customerName = "No record".
   MESSAGE "CustomerName = " customerName SKIP.
END.

Save the .p file.