IBM Books

Language Environment Interface Reference

The dtw_parm_data_t Structure

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:

parm_descriptor
The parm_descriptor field describes the type and use of the parameter being passed to the language environment. Net.Data sets the field by performing an OR operation using the following constants:

parm_name
The parm_name field is a pointer to a string that contains the name of the parameter. Net.Data sets this pointer NULL if the parameter is a literal string.

parm_value
The parm_value field is a pointer to an object that contains the value of the parameter. This pointer is set to NULL by Net.Data if the parameter is a variable that is not already defined.

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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]