Mechanism for passing MI_DATUM values
- The routine manager passes most argument values by reference;
that is, it passes a pointer to the actual argument value.
If the argument value has a data type whose size is greater than the size of the MI_DATUM data type, the routine manager passes the argument by reference because it cannot fit the actual value onto the stack. Instead, the MI_DATUM structure that the routine manager pushes onto the stack contains a pointer to the value. The routine manager allocates the memory for these pass-by-reference arguments with a PER_ROUTINE duration.
- The routine manager passes a few special types of argument by
value; that is, the MI_DATUM structure contains the actual
argument value.
If the argument value is a data type whose size is less than or equal to the size of the MI_DATUM data type, the routine manager passes the argument by value because it can fit the actual value onto the stack.
For information about how to code routine parameters, see Define routine parameters. For information about how the routine manager passes return values out of a UDR, see Return the value.