Progress
Report Builder
Deployment Guide
Accessing Initialization (.INI) Files
To access initialization file information from the Progress 4GL, you can use the
_getini.p
procedure. Because the status file created by Report Engine has the same format as an initialization file, you can use the_getini.p
procedure to read the information out of the status file. Use the following command in the Progress 4GL application:
The following list describes the arguments for the
_getini.p
procedure:section-name
The name of the section in the initialization file. In the Report Engine status file, this is also the name of the report being run.
entry-name
The name of the entry that you want. For example, RO-ERROR-CODE or RO-ERROR-MESSAGE in the report status file.
entry-default
The default value to be used if the entry is not found in the specified section.
entry-value
The character variable that will display the value of the specified entry.
ini-pathname
The full pathname to the initialization file being used. For example, with the Report Engine table interface, this is the file specified by the Report Status File (-rbstatfile) parameter.
success
The logical variable that gets assigned a TRUE value (yes) if Progress returns a string of zero of more characters and a FALSE value if no string is returned. Currently, this parameter always gets assigned a TRUE value (yes). The parameter is included to allow for future enhancements.
The
progini.p
procedure is an example of how to run the_getini.p
procedure:
The commented numbers correspond to the following step-by-step descriptions:
- Define the variables that will pass the character value and logical value for the
_getini.p
procedure.- Call
aderb/_getini.p
and specify all six arguments, including the variables to pass the result and return values.- Test the value in the success variable, then display the appropriate information.
- Currently, the ELSE code will never be executed. The test shown will never fail—success always has the value true. This is an artifact of how the underlying MS-Windows function behaves.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |