When arguments and their descriptors are passed with a descriptor list, an extra argument is passed whenever at least one argument needs a descriptor. This extra argument is a pointer to a list of pointers. The number of entries in this list equals the number of arguments passed. For arguments that don’t require a descriptor, the corresponding pointer in the descriptor list is set to SYSNULL. For arguments that do require a descriptor, the corresponding pointer in the descriptor list is set to the address of that argument’s descriptor.
So, for example, suppose the routine sample is declared as
declare sample entry( fixed bin(31), varying char(*) )
options( byaddr descriptor );Then, if sample is called as in the following statement:
call sample( 1, 'test' );
The following three arguments are passed to the routine: