Products Downloads


French version


 

 

This function is used to write the value associated with a section and a key in the data file. If the data file is a parameter file for use with an EXIT program, this function checks whether the section can be modified, and in turn whether write operations are permitted.

 

If Value is blank, this function deletes the key from the section.

If Key is blank, this function deletes the whole section, and as such all the section's keys.

 

Parameters

ALPHA(256)

File

Full name of the data file.

ALPHA(n)

Section

Section.

ALPHA(n)

Key

Key.

ALPHA(n)

Value

Value updated in the file.

NUM_BIN_4

ReturnCode

Write return code (updated by the function).

 

Possible return code values

0

Value successfully written to the data file.

 

Write operation failed:

-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.

-20

Non-modifiable section: this control is only performed if the data file is a parameter file for use with an EXIT program.

-21

Unauthorized value; the value is not one of the possible values: this control is only performed if the data file is a parameter file for use with an EXIT program.

-99

An error occurred during the write operation to the data file.

 

Example

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

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

ALPHA(256)

   

PARAM

   

 

   

ALPHA(40)

   

ALPHA(40)

   

ALPHA(200)

   

NUM_BIN_4

   

 

   

Section = 'USER_PARAMETER'

 

Key = 'VALUE'

Value = 'Value sent from EXIT program to EXIT program'

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

CALL_DLL 'PgExTool' 'PgExToolWriteValue' ParamFile Section Key Value ReturnCode

 

Value = *BLANK

/* the value of the user parameter is deleted from the parameter file

CALL_DLL 'PgExTool' 'PgExToolWriteValue' ParamFile Section Key Value ReturnCode

 

 

 

Click below for further information about:

 

↑ Top of page

  • Aucune étiquette