Routines for parmfile.kb


PackParamList

File Name

parmfile.kb

Syntax

PackParamList( Val ParamList: List of String, Ref ParamString: String ): Integer

Parameters

ParamList - list of values to pack into a string

ParamString - return value for the concatonated string

Returns

$ParmfileOK: Success

Side Effects

None

Description

This function takes the values in ParamList and concatenates them into ParamString. The string is comma separated and the values are quoted.

Dialog Forms Called

None


ReadParameter

File Name

parmfile.kb

Syntax

ReadParameter( Val ParamFile: String, Val SectionName: String, Val ParamName: String, Ref ParamValue: String ): Integer

Parameters

ParamFile - file to read configuration options

SectionName - section in the file to read

ParamName - name in the section to read

ParamValue - value for the name in the section to be read

Returns

$ParmfileOK - success

$ParmfileErrorFileNotFound - unable to open file requested

$ParmfileErrorFileRead - unable to read from existing file

Side Effects

None

Description

This procedure reads data from the paramfile. The paramfile is formatted in an INI format.

Dialog Forms Called

None


ReadParameterSectionList

File Name

parmfile.kb

Syntax

ReadParameterSectionList( Val ParamFile: String, Ref SectionList: List of String ): Integer

Parameters

ParamFile - the file to be read

SectionList - all sections in the ParamFile

Returns

$ParmfileOK - success

$ParmfileErrorFileNotFound - unable to open file requested

$ParmfileErrorFileRead - unable to read from existing file

Side Effects

None

Description

This procedure returns a list of all sections found in the parmfile.

Dialog Forms Called

None


SetTextSource

File Name

parmfile.kb

Syntax

SetTextSource( VAL RDBMS: String ): Integer

Parameters

RDBMS - name of SAIDatasource

Returns

TRUE if RDBMS found, FALSE if not found

Side Effects

None

Description

Searches the sai_sql.cfg file for the datasource that has been configured as the text retrieval source. This function uses the TDT ini* commands. Also sets globals and synonyms for text retrieval.

Dialog Forms Called

None


UnpackParamList

File Name

parmfile.kb

Syntax

UnpackParamList( Val ParamString: String, Ref ParamList: List of String ): Integer

Parameters

ParamString - concatonated string of comma seperated, and quoted values

ParamList - return value for List

Returns

$ParmfileOK - success

$ParmfileErrorInvalidPackFormat - ParamString contained format exceptions

Side Effects

None

Description

This function takes the value in ParamString and separates it into values that are inserted in ParamList.

Dialog Forms Called

None


WriteParameter

File Name

parmfile.kb

Syntax

WriteParameter(Val ParamFile: String, Val SectionName: String, Val ParamName: String, Val ParamValue: String ): Integer

Parameters

ParamFile - file to write configuration options

SectionName - section in the file to be written/updated

ParamName - name in the section to be written/updated

ParamValue - value for the name in the section to be updated/written

Returns

$ParmfileOK - success

$ParmfileErrorFileCreateFail - unable to create new file,

$ParmfileErrorFileRead - unable to read from existing file,

$ParmfileErrorWrite - unable to write parameter to file

Side Effects

None

Description

This procedure writes the data to the Paramfile. The Paramfile is formatted in an INI format.

Dialog Forms Called

None