6 42 LceGetVariable

LANSA Open Guide

6.42 LceGetVariable

Retrieve the value associated with a given system or multilingual variable.

BOOL

LceGetVariable

(int

iSession,

 

 

 char far * 

strVariableName,

 

 

 char far * 

strValue )

  

Parameters

iSession

The session identifier as returned by LceGetSessionId.

strVariableName

The system or multilingual variable name.

strValue

Pointer to the array to receive the returned value. This will be a zero length string if no value is returned from the host. The size should be at least FIELD_DATA_SIZE + 1 as defined in the LCOE.H header file.

  

Return Values

TRUE is returned if the session can retrieve the requested value.

FALSE is returned if an error occurs.

Notes

If the request is for a multilingual variable, the partition must be multilingual. The value returned will be based on the language defined when the session is open.

This function uses string parameters. Even if the variable you are getting is non-numeric, it will contain a string value representing the variable's numeric value. You will need to convert the string value to a numeric before using it in your application. Note also that any "decimal point" used (if appropriate) will be that which applies on the host.

  • This function may be executed at any time after the session is opened.
  • LceGetVariable communicates with the host for all initial calls for the given variable. Subsequent calls will result in communication with the host only if the variable is defined as dynamic.