OpenEdge Development: Progress 4GL Reference
![]() ![]() ![]()
|
PrefaceThis Preface contains the following sections:
Purpose
This book defines the Progress® 4GL. It covers all 4GL statements, functions, phrases, operators, preprocessor directives, special symbols, widgets, handles, attributes, methods, and events.
Audience
This book is intended for programmers who develop applications using Progress and for anyone who needs to read and understand Progress 4GL code.
Organization
This book consists of the following three volumes:
- Volume I (Syntax A-F) contains a dictionary of Progress statements, functions, phrases, operators, preprocessors, and special symbols beginning with the letters A-F.
- Volume II (Syntax G-Z) contains a dictionary of Progress statements, functions, phrases, operators, preprocessors, and special symbols beginning with the letters G-Z.
- Volume III (Widgets, Handles, Attributes & Methods, Events, & Indexes) contains:
Using this manual
The explanation of each statement, function, and phrase includes:
- Platform-restrictions, in the form of a table or individual notes.
- A purpose or description of the language element.
- Block properties for all block statements.
- Data movement diagrams for all data handling statements.
- The syntax for the element.
- The options and arguments you can use with the statement, phrase, or operator.
- One or more examples that illustrate the use of the element.
- Notes that highlight special cases or provide hints on using the element.
- A See Also section that lists related language elements.
Some elements and features of the Progress 4GL do not apply to all software platforms—operating systems, user interfaces, and database management systems—that OpenEdge™ supports. The documentation tries to note each such platform restriction either with a platform restriction table, with platform restriction notes, or with both.
Platform Restriction Tables
The following is a sample platform restriction table:
A table similar to this appears in each entry of Volumes I and II, and in each entry of the Handle Reference in Volume III.
The first column mentions any restrictions based on interface. Interfaces are graphical and character. For example, a 4GL element might be limited to graphical interfaces only, or to character interfaces only. The preceding table describes a 4GL element not restricted to any particular interface.
The second column mentions any restrictions based on operating system. For example, a 4GL element might be restricted to UNIX only, or to Windows only. The preceding table describes a 4GL element not restricted to any particular operating system.
The third column mentions if the 4GL element applies to SpeedScript. Some 4GL elements do not. The preceding table describes a 4GL element that does.
Platform Restriction Notes
A reference entry might contain one or more platform restriction notes—perhaps in addition to a platform restriction table. The platform restriction notes that appear in the documentation include the following:
- AppServer™ only
The element or feature applies only to the OpenEdge AppServer.- Character interfaces only
The element or feature applies only to the character interfaces that OpenEdge supports.- Graphical interfaces only
The element or feature applies only to the graphical interfaces that OpenEdge supports.- NT and UNIX only
The element or feature applies only to the Windows and UNIX versions that OpenEdge supports.- ORACLE only
The element or feature applies only to the ORACLE versions that OpenEdge supports.- SpeedScript
The element or feature applies to SpeedScript.- UNIX only
The element or feature applies only to the UNIX versions that OpenEdge supports.- Windows only
The element or feature applies only to the Windows versions that OpenEdge supports.- Windows only; Graphical interfaces only
The element or feature applies only to the graphical interfaces of the Windows and versions that OpenEdge supports.For a complete list of the software platforms that OpenEdge supports, see the OpenEdge Getting Started: Installation and Configuration for UNIX or the OpenEdge Getting Started: Installation and Configuration for Windows.
Typographical conventions
This manual uses the following typographical conventions:
Examples of syntax descriptions
In this example,
ACCUMis a keyword, andaggregateandexpressionare variables:
FORis one of the statements that can end with either a period or a colon, as in this example:
In this example,
STREAMstream,UNLESS-HIDDEN, andNO-ERRORare optional:
In this example, the outer (small) brackets are part of the language, and the inner (large) brackets denote an optional item:
A called external procedure must use braces when referencing compile-time arguments passed by a calling procedure, as shown in this example:
In this example,
EACH,FIRST, andLASTare optional, but you can choose only one of them:
In this example, you must include two expressions, and optionally you can include more. Multiple expressions are separated by commas:
In this example, you must specify
MESSAGEand at least oneexpressionorSKIP[ (n) ], and any number of additionalexpressionorSKIP[ (n) ] is allowed:
In this example, you must specify {
include-file, then optionally any number ofargumentor&argument-name = "argument-value", and then terminate with }:
Long syntax descriptions split across lines
Some syntax descriptions are too long to fit on one line. When syntax descriptions are split across multiple lines, groups of optional and groups of required items are kept together in the required order.
In this example,
WITHis followed by six optional items:
Syntax WITH [ ACCUMmax-length] [expressionDOWN ]
[ CENTERED ] [nCOLUMNS ] [ SIDE-LABELS ]
[ STREAM-IO ]
Complex syntax descriptions with both required and optional elements
Some syntax descriptions are too complex to distinguish required and optional elements by bracketing only the optional elements. For such syntax, the descriptions include both braces (for required elements) and brackets (for optional elements).
In this example,
ASSIGNrequires either one or morefieldentries or onerecord. Options available withfieldorrecordare grouped with braces and brackets:
Syntax ASSIGN { [ FRAMEframe] {field[ =expression] }
[ WHENexpression] } ...
| {record[ EXCEPTfield... ] }
Example procedures
This manual provides numerous example procedures that illustrate syntax and concepts. Examples use the following conventions:
- They appear in boxes with borders.
- If a procedure is available online, its name appears above the box and starts with a prefix associated with the manual that references it:
i-— OpenEdge Development: Programming Interfaces, for example,i-ddeex1.ph-— OpenEdge Development: Progress 4GL Handbook, for example,h-cleanup.pr-— OpenEdge Development: Progress 4GL Reference, for example,r-dynbut.pIf the name does not start with a listed prefix, the procedure is not available online.- If a procedure is not available online, it compiles as shown but might not execute for lack of completeness.
- Example procedures used in OpenEdge Development: ProDataSets can be found on the Documentation PDF CD in a self-extracting ZIP file (DVPDS_examples.exe). You can also find the procedures in a ZIP file (DVPDS_examples.zip) on the Documentation page of the Progress Web site: http://www.progress.com/products/documentation.
Accessing files in procedure libraries
Documentation examples are stored in a procedure library,
prodoc.pl, in thesrcdirectory where OpenEdge™ is installed.You must create all subdirectories required by a library before trying to extract files from the library. You can see what directories and subdirectories a library needs by using the
PROLIB-listcommand to view the contents of the library. See OpenEdge Deployment: Managing 4GL Applications for more details on thePROLIButility.Creating a listing of the procedure libraries
Creating a listing of the source files from a procedure library involves running
PROENVto set up your OpenEdge environment, and runningPROLIB.To create a listing of the source files from a procedure library:
- From the Control Panel or the Progress Program Group, double-click the Proenv icon.
- The Proenv window appears, with the
proenvprompt.RunningProenvsets theDLCenvironment variable to the directory where you installed OpenEdge (by default,C:\Program Files\Progress).Proenvalso adds theDLCenvironment variable to yourPATHenvironment variable and adds thebindirectory (PATH=%DLC%;%DLC%\bin;%PATH%).- At the
proenvprompt, enter the following command to create theprodoc.txttext file, which contains the file listing for theprodoc.pllibrary:
Extracting source files from procedure libraries (Windows)
Extracting source files from a procedure library involves running
PROENVto set up your OpenEdge environment, creating the directory structure for the files you want to extract, and runningPROLIB.To extract source files from procedure libraries:
- From the Control Panel or the Progress Program Group, double-click the Proenv icon.
- The Proenv window appears, with the
proenvprompt.- At the
proenvprompt, enter the following command to create theprodocdirectory in your OpenEdge working directory (by default,C:\OpenEdge\Wrk):
- Create the
langrefdirectory underprodoc:
- To extract all examples in a procedure library directory, run the
PROLIButility. Note you must use double quotes because “Program Files” contains an embedded space:
PROLIBextracts all examples intoprodoc\langref.To extract one example, runPROLIBand specify the file that you want to extract as it is stored in the procedure library:
PROLIBextractsr-syshlpchm.pintoprodoc\langref.Extracting source files from procedure libraries (UNIX)
To extract source files from procedure libraries:
- Run the
PROENVutility:
Runningproenvsets theDLCenvironment variable to the directory where you installed OpenEdge (by default,/usr/dlc). Theproenvutility also adds the bin directory under theDLCenvironment variable to yourPATHenvironment variable (PATH=$DLC/bin:$PATH).- At the
proenvprompt, create theprodocdirectory in your OpenEdge working directory:
- Create the
handbookdirectory underprodoc:
- To extract all examples in a procedure library directory, run the
PROLIButility:
PROLIBextracts all examples intoprodoc/interfaces.To extract one source file (i-ddeex1.p) from a procedure library (prodoc.pl), runPROLIBand specify the file you want to extract as it is stored in the procedure library:
PROLIBextractsi-ddeex1.pintoprodoc/interfaces.OpenEdge messages
OpenEdge displays several types of messages to inform you of routine and unusual occurrences:
- Execution messages inform you of errors encountered while OpenEdge is running a procedure; for example, if OpenEdge cannot find a record with a specified index field value.
- Compile messages inform you of errors found while OpenEdge is reading and analyzing a procedure before running it; for example, if a procedure references a table name that is not defined in the database.
- Startup messages inform you of unusual conditions detected while OpenEdge is getting ready to execute; for example, if you entered an invalid startup parameter.
After displaying a message, OpenEdge proceeds in one of several ways:
- Continues execution, subject to the error-processing actions that you specify or that are assumed as part of the procedure. This is the most common action taken after execution messages.
- Returns to the Progress Procedure Editor, so you can correct an error in a procedure. This is the usual action taken after compiler messages.
- Halts processing of a procedure and returns immediately to the Progress Procedure Editor. This does not happen often.
- Terminates the current session.
OpenEdge messages end with a message number in parentheses. In this example, the message number is
200:
If you encounter an error that terminates OpenEdge, note the message number before restarting.
Obtaining more information about OpenEdge messages
On Windows platforms, use OpenEdge online help to obtain more information about OpenEdge messages. Many OpenEdge tools include the following Help menu options to provide information about messages:
- Choose Help
Recent Messages to display detailed descriptions of the most recent OpenEdge message and all other messages returned in the current session.
- Choose Help
Messages and then enter the message number to display a description of a specific OpenEdge message.
- In the Progress Procedure Editor, press the HELP key or F1.
On UNIX platforms, use the Progress
procommand to start a single-user mode character OpenEdge client session and view a brief description of a message by providing its number.To use the pro command to obtain a message description by message number:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |
![]() ![]() ![]()
|