Try OpenEdge Now
skip to main content
ABL Reference
ABL Syntax Reference : PROGRESS function
 

PROGRESS function

Returns one of the following character values which identifies the ABL product that is running: Full, Query or Run-time. Can also return COMPILE if you use the Developer's Toolkit, or COMPILE-ENCRYPT if you use the run-time Compiler.
Note: Does not apply to SpeedScript programming.

Syntax

PROGRESS

Examples

The following procedure uses the PROGRESS phrase function to determine which exit prompt is displayed on a menu:
r-progfn.p
/* Depending on the version of PROGRESS you are running, the main menu reflects
   available features for end-user */

DEFINE VARIABLE menu        AS CHARACTER NO-UNDO EXTENT 3.
DEFINE VARIABLE exit-prompt AS CHARACTER NO-UNDO.

IF PROGRESS EQ "FULL" THEN
exit-prompt = " 3. Return to Full Editor ".
ELSE IF PROGRESS EQ "QUERY" THEN
exit-prompt = " 3. Return to Query Editor".
ELSE IF PROGRESS EQ "RUN-TIME" THEN
exit-prompt = "3. Exit Program".

DO WHILE TRUE:
DISPLAY
" 1. Display Customer Data" @ menu[1] SKIP
" 2. Display Order Data" @ menu[2] SKIP
exit-prompt @ menu[3]
FORMAT "x(26)" SKIP
WITH FRAME choices NO-LABELS.

CHOOSE FIELD menu AUTO-RETURN WITH FRAME choices
TITLE "Demonstration menu" CENTERED ROW 10.
HIDE FRAME choices.

IF FRAME-INDEX EQ 1 THEN MESSAGE
"You picked option 1.".
ELSE IF FRAME-INDEX EQ 2 THEN MESSAGE
"You picked option 2.".
ELSE IF FRAME-INDEX EQ 3 THEN RETURN.
END.
This procedure displays a message that tells you the type of ABL product you are using:
MESSAGE "You are currently running this PROGRESS product:" PROGRESS
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.

See also

DBVERSION function, PROVERSION function