Products Downloads


French version


 

 

This function is used to read the value associated with a section and a key in the data file.

 

Parameters

ALPHA(256)

File

Full name of the data file.

ALPHA(n)

Section

Section.

ALPHA(n)

Key

Key.

ALPHA(n)

Value

Value retrieved by the function in the file.

NUM_BIN_4

ValueSize

Size of Value : n.

NUM_BIN_4

ReturnCode

Read return code (updated by the function).

 

Possible return code values

0

Read operation successful: Value is configured at this point.

1

Read operation truncated: Value is configured at this point, but is too small to contain all the data in the file (increase the value set for n).

 

Read operation failed: Value is cleared.

-1

Data file not found.

-2

Invalid section, for one of the following reasons:

-   Section is empty,

-   Section is an invalid item section in a list (incompatible with the number of items in the list),

-  the data file is a parameter file for use with an EXIT program and Section is not one of the permitted sections.

-3

Key not compatible with Section : this control is only performed if the data file is a parameter file for use with an EXIT program.

-99

Value not found: the data file does not contain a value associated with Section and Key .

 

Example

/* This example is a read operation in a parameter file

/* for use in an EXIT program during a correction validation procedure

ALPHA(256)

ParamFile

 

PARAM

ParamFile

/* EXIT program call parameter

 

 

 

ALPHA(40)

Section

 

ALPHA(40)

Key

 

ALPHA(200)

Value

 

NUM_BIN_4

ValueSize

 

NUM_BIN_4

ReturnCode

 

 

 

 

Section = 'USER_PARAMETER'

Key = 'VALUE'

ValueSize = 200

/* the value of the user parameter is read in the parameter file

CALL_DLL 'PgExTool' 'PgExToolReadValue' ParamFile Section Key Value ValueSize ReturnCode

 

 

 

Click below for further information about:

 

↑ Top of page

  • Aucune étiquette