IBM Books

Language Environment Interface Reference

The dtw_lei_t Structure

The interface function of each language environment receives a pointer to the dtw_lei_t structure. The dtw_lei_t structure has the following format:

typedef struct dtw_lei_t {              /* Lang. Env. Interface        */
    char *function_name;              /* Function block name         */
    int   flags;                      /* Lang. Env. Interface flags  */
 
    char *exec_statement;             /* Lang. Env. statement(s)     */
 
    dtw_parm_data_t *parm_data_array; /* Parameter array             */
    char *default_error_message;      /* Default message             */
    void *le_opaque_data;             /* Lang. Env. specific data    */
 
    void *row;                        /* For row-at-a-time processing*/
 
    char  reserved[64];               /* Reserved                    */
} dtw_lei_t;

Fields in the dtw_lei_t structure:

function_name
The function_name field contains a pointer to a string containing the name of the function block. This can be useful to specify the FUNCTION block name in error messages displayed by the language environment.

flags
The flags field is used by Net.Data to communicate with the language environment. Specify the flags field pointer by performing an OR operation using the following constants:

exec_statement
The exec_statement field contains one of the following pointers:

parm_data_array
The parm_data_array field contains a pointer to an array of dtw_parm_data_t structures. The array ends with a parm_data structure containing zeros. The dtw_parm_data_t structure is used by Net.Data to pass variables and the associated value to a language environment and to retrieve any changes to the variable value that may be made by the language environment. See The dtw_parm_data_t Structure for a description of the structure.

default_error_message
The default_error_message field is set by the language environment to a character string that describes an error condition. If the return value from a call to a language environment interface function is non-zero and the return value does not match the value of a message in a MESSAGE block, the default message is displayed. Otherwise, Net.Data displays the message selected from the MESSAGE block.

le_opaque_data
The le_opaque_data field is set by any of the interface functions in the language environment to pass parameters from one interface function to another. Net.Data saves the pointer and passes it to another interface function that Net.Data calls. After processing the Net.Data macro, and before returning to the caller of Net.Data, Net.Data defines the pointer to NULL. Because the field is thread-specific, language environments can store data that is thread specific. Use this field only if you have a dtw_cleanup() interface function, so that the function can free the storage associated with the le_opaque_data field.

row
The row field is set by Net.Data to a row object prior to calling a language environment's dtw_getNextRow() interface function. The dtw_getNextRow() function inserts a row of table data in the object using the Net.Data row utility interface functions. Net.Data then processes the row and calls dtw_getNextRow() until there are no more rows to process.

The reserved field is for IBM use only.


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