Progress/400
Product Guide


General Syntax

This section describes the syntax of EPI:

OS400 EPI STATUS(sts) MESSAGES(msg) command command-parameters 

Though OS400 is a Progress 4GL statement, all additional characters are treated as the EPI command. Progress processes the EPI command at run time. The STATUS(sts) and MESSAGES(msg) parameters allow the Progress 4GL to examine error messages returned from the EPI command.

The Progress 4GL uses the STATUS(sts) parameter as a status indicator (where sts is a Progress shared variable of type INTEGER). The Progress 4GL uses the MESSAGES(msg) parameter to store the error messages encountered during parsing or execution of the EPI command (where msg is a Progress shared variable of type CHARACTER with at least one extent). If the EPI command is successfully parsed and executed, the value in the sts variable is zero (0). If errors are encountered during parsing or execution of the EPI command, the value in the sts variable is greater than zero (0) and indicates how many messages have been placed in the msg array.

Use the OS-ERROR function to determine the status of the EPI command. Progress has extended this function to support new Progress/400 EPI error numbers. To determine the results of an EPI command, examine the value returned by the OS-ERROR function.

Table 11–1 describes the error codes that can be returned.

Table 11–1: OS-ERROR Values for EPI Command
OS-ERROR Value
Error Description

4001

The STATUS variable must be defined as an integer.

4002

The MESSAGES variable must be defined as a character.

4003

The MESSAGES variable must be defined as an array with at least one EXTENT.

4004

The STATUS parameter must be specified.

4005

The MESSAGES parameter must be specified.

4006

Invalid EPI command.

4007

Invalid syntax.

4999

An error occurred. The message text is in the MESSAGES variable.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095