You can write a PL/I program as a callable routine in TIBCO Object Service Broker but you cannot write your PL/I program as a function (that is, you cannot write your PL/I program to return a value unless you pass the value back through an argument).
An RD field consists of a 4‑byte non-exclusive binary length followed by the data.
The external routine in the following example takes a number in the first argument and returns the logarithm of the number in the second argument. The routine and its arguments must be identified to TIBCO Object Service Broker as described in
Identifying Your External Routine to TIBCO Object Service Broker.
The external routine in the following example concatenates a string to itself a specified number of times. To return a value in a non-numeric argument, the PL/I program must use a pointer to access the argument; therefore, STRING points to the PSTRING argument. The routine and its arguments must be identified to TIBCO Object Service Broker as described in
Identifying Your External Routine to TIBCO Object Service Broker.