Program execute function

When the User-defined function is used in an ITP Model the ITP iSeries Connection will call the program registered in the User-defined function using the library list of the host DataManager job in which it is called, refer to the ITP Administration Manual. The program is called with two parameters for ITP internal use followed by a parameter for every Input parameter of the User-defined function. The first two parameters are both defined as ten bytes alphanumeric, the other parameters are passed conform the definitions of the appropriate Input parameter.

The only requirement on what the program has to do is that it must send the Result back to ITP using a call to the program ISNDDTA (since version 2.1) or the QSNDDTAQ program in the ITP iSeries Connection option "Pre-2.1 Connection legacy". The first four parameters of the programs are the same as the parameters of the iSeries program QSNDDTAQ, which was actually used in ITP/400:

Parameter 1

10 bytes alphanumeric

ITP internal use; is equal to the first parameter of the program execute function interface.

Parameter 2

10 bytes alphanumeric

ITP internal use; is equal to the second parameter of the program execute function interface.

Parameter 3

Packed decimal (5,0)

Length of the Result passed in parameter 4.

Parameter 4

Buffer with length indicated by parameter 3

A buffer containing the Result to be returned to the ITP Model.