Net.Data uses the dtw_parm_data_t structure to pass parameters to a language environment. Parameters are obtained from three sources:
Net.Data passes explicit parameters first, followed by parameters specified in the ENVIRONMENT statement, and then the return variable.
The dtw_parm_data_t structure has the following format:
typedef struct dtw_parm_data_t { /* Parameter data */ int parm_descriptor; /* Parameter descriptor */ char *parm_name; /* Parameter name */ char *parm_value; /* Parameter value */ void *res1; /* Reserved */ void *res2; /* Reserved */ } dtw_parm_data_t;
Fields in the dtw_parm_data_t structure:
Net.Data always sets the parm_descriptor field to DTW_IN, DTW_OUT, or DTW_INOUT and uses a logical OR with DTW_STRING and DTW_TABLE.
The res1 and res2 fields are reserved fields.
Both parm_name and parm_value point to an object allocated from the Net.Data run-time heap, the area of memory used for dynamic memory allocation by Net.Data. If parm_name or parm_value is replaced with another string, the original string must be freed and replaced with a pointer to a character string allocated from the Net.Data heap. Use the dtw_malloc() and dtw_free() utility functions to free the original string.