6.65 LceSetSessionOption
This function enables you to switch options to:
- vary the format in which data is returned to you (and to set and reset the option during the session).
- specify the time of file opening.
The default values are reinstated when the session is closed.
This function will be extended to support more options as they are required.
BOOL |
LceSetSessionOption |
(int |
iSession, |
|
|
int |
iOption, |
|
|
char far * |
strValue) |
Parameters
iSession |
The session identifier. |
iOption |
The option to be set. Available options are listed in the Notes. |
strValue |
The value of the option. Refer to the Notes for the available values. |
Return Values
TRUE is returned if the option was set successfully.
FALSE is returned if an invalid option or value was specified.
Notes
The default values required for these options should be set in the Windows System Registry. If these defaults are not set, LANSA Open sets those described with each option.
Refer to Configuration File in the PC Configuration File section of this guide for further information about setting the default values.
LCE_OPT_NUMERIC_DATA
This option can be set and reset at any time during a session.
- "PAD" causes LANSA Open to return all numeric values with leading zeros. This can be useful if using PACKED data to store dates.
- "STRIP" causes LANSA Open to return all numeric values with the leading zeros stripped.
LANSA Open's default: Numeric values will be returned stripped of all leading zeros and only containing a leading sign if negative.
LCE_OPT_ALPHA_DATA
This option can be set and reset at any time during a session.
- "PAD" causes LANSA Open to return all alpha values with the trailing spaces up to their correct length.
- "STRIP" causes LANSA Open to return all alpha values with the trailing spaces stripped.
LANSA Open's default: Alpha values are returned stripped of all trailing spaces.
LCE_OPT_EDIT_DATA
This option can be set and reset at any time during a session.
This option allows you to specify the way in which data is returned to you by LceGetFieldValueX.
- "Y" causes LANSA Open to format the data before it is returned. If you have recorded an Edit Code for the field definition in the Repository, then the data will be returned in the format associated with that edit code. For example, a date could be returned as mm/dd/yy instead of as straight numeric. See under Creating a New Field Definition for in the for more information about Edit Codes.
- "N" causes LANSA Open to return the data unedited.
LANSA Open's default: Data returned is not reformatted, regardless of the field's Edit Code.
LCE_OPT_OPEN_FILE_ON_DEMAND
This option must be specified before the session is opened
- "Y" causes LANSA Open to open files only when they are used. This saves considerable time when many files are used in a session, however, if a file without an I/O module is accessed during the course of processing, unacceptable processing delays may occur.
- "N" causes LANSA Open to open all the files to ensure that they all have I/O modules, before returning from the call to LceOpenSession. If a file without an I/O module is detected, LceOpenSession will fail.
LANSA Open's default: All the files are opened at the beginning of a session, to ensure that all the I/O modules exist.