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 the return variable, and then the parameters specified on the ENVIRONMENT statement.
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 or DTW_TABLE. Do not modify this value.
The parm_value field points 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_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 allocate and free character strings", and use dtw_table_New() and dtw_table_Delete() to allocate and free table objects. Table objects and character strings can also be modified without freeing and reallocating space.
The parm_value pointer and its contents should not be modified for input parameters. Also, do not delete or replace table objects in a parameter list.
The res1 and res2 fields are reserved fields.