OpenEdge Development Basic Development Tools
OpenEdge Development Basic Development Tools
TM
Progress® software products are copyrighted and all rights are reserved by Progress Software Corporation. This manual is also copyrighted and all rights are
reserved. This manual may not, in whole or in part, be copied, photocopied, translated, or reduced to any electronic medium or machine-readable form without
prior consent, in writing, from Progress Software Corporation.
The information in this manual is subject to change without notice, and Progress Software Corporation assumes no responsibility for any errors that may appear
in this document.
The references in this manual to specific platforms supported are subject to change.
Allegrix, A [Stylized], ObjectStore, Progress, Powered by Progress, Progress Fast Track, Progress Profiles, Partners in Progress, Partners en Progress, Progress en
Partners, Progress in Progress, P.I.P., Progress Results, ProVision, ProCare, ProtoSpeed, SmartBeans, SpeedScript, and WebSpeed are registered trademarks of
Progress Software Corporation or one of its subsidiaries or affiliates in the U.S. and/or other countries. A Data Center of Your Very Own, Allegrix & Design,
AppsAlive, AppServer, ASPen, ASP-in-a-Box, BusinessEdge, Business Empowerment, Empowerment Center, eXcelon, Fathom, Future Proof, IntelliStream,
ObjectCache, OpenEdge, PeerDirect, POSSE, POSSENET, ProDataSet, Progress Business Empowerment, Progress Dynamics, Progress Empowerment Center,
Progress Empowerment Program, Progress for Partners, Progress OpenEdge, Progress Software Developers Network, PSE Pro, PS Select, SectorAlliance,
SmartBrowser, SmartComponent, SmartDataBrowser, SmartDataObjects, SmartDataView, SmartDialog, SmartFolder, SmartFrame, SmartObjects, SmartPanel,
SmartQuery, SmartViewer, SmartWindow, Technical Empowerment, Trading Accelerator, WebClient, and Who Makes Progress are trademarks or service marks
of Progress Software Corporation or one of its subsidiaries or affiliates in the U.S. and other countries.
SonicMQ is a registered trademark of Sonic Software Corporation in the U.S. and other countries.
Vermont Views is a registered trademark of Vermont Creative Software in the U.S. and other countries.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
Any other trademarks and/or service marks contained herein are the property of their respective owners.
This product includes Raster Imaging Technology copyrighted by Snowbound Software 1993-2000. Raster imaging technology by SnowboundSoftware.com.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/). Copyright © 1999 The Apache Software Foundation. All
rights reserved (Xalan XSLT Processor) and Copyright © 2000-2002 The Apache Software Foundation. All rights reserved (Jakarta-Oro). The names “Apache,”
“Xerces,” “Jakarta-Oro,” “ANT,” and “Apache Software Foundation” must not be used to endorse or promote products derived from this software without prior
written permission. Products derived from this software may not be called “Apache” or “Jakarta-Oro,” nor may “Apache” or “Jakarta-Oro” appear in their name,
without prior written permission of the Apache Software Foundation. For written permission, please contact apache@apache.org. Software distributed on an “AS
IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under
the License agreement that accompanies the product.
Portions of this software are copyrighted by DataDirect Technologies, 1991-2002.
This product includes software developed by Vermont Creative Software. Copyright © 1988-1991 by Vermont Creative Software.
This product includes software developed by IBM and others. Copyright © 1999, International Business Machines Corporation and others. All rights reserved.
This product includes code licensed from RSA Security, Inc. Some portions licensed from IBM are available at http://oss.software.ibm.com/icu4j/.
This product includes the RSA Data Security, Inc. MD5 Message-Digest Algorithm. Copyright ©1991-2, RSA Data Security, Inc. Created 1991. All rights
reserved.
This product includes software developed by the World Wide Web Consortium. Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All rights reserved. This work is distributed under the W3C®
Software License [http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231] in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
December 2003
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preface–1
iv
Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index–1
v
Contents
Tables
Table 1–1: Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
Table 1–2: Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
Table 2–1: Procedure editor features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–3
Table 3–1: File-specific events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
Table 3–2: Usage scenario for the Procedure Editor . . . . . . . . . . . . . . . . . . . . . . . 3–7
Table 4–1: Procedure Editor menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Table 4–2: File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
Table 4–3: Files dialog box elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5
Table 4–4: Save As dialog box fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
Table 4–5: Edit menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7
Table 4–6: Field Selector dialog box elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10
Table 4–7: Search menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10
Table 4–8: Find dialog box fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Table 4–9: Replace dialog box elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12
Table 4–10: Buffer menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Table 4–11: Buffer Information dialog box elements . . . . . . . . . . . . . . . . . . . . . . . . . 4–15
Table 4–12: Compile menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–16
Table 5–1: Save New .r toggle box and the compilation process . . . . . . . . . . . . . . 5–3
Table 5–2: Compiler action buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4
Table 5–3: File Specification dialog box elements . . . . . . . . . . . . . . . . . . . . . . . . . 5–5
Table 5–4: Application Compiler menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Table 5–5: File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Table 5–6: Compile menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Table 5–7: Options menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Table 5–8: Compiler Options dialog box fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
vi
Contents
Figures
Figure 2–1: Procedure Editor window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–3
Figure 2–2: Buffer List dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Figure 4–1: Procedure Editor menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Figure 4–2: Open dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
Figure 4–3: Files dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
Figure 4–4: Close alert box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5
Figure 4–5: Save As dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
Figure 4–6: Save Buffers with Changes dialog box . . . . . . . . . . . . . . . . . . . . . . . . 4–7
Figure 4–7: Insert File dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Figure 4–8: Field Selector dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Figure 4–9: Find dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Figure 4–10: Replace dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12
Figure 4–11: Goto Line dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Figure 4–12: Buffer List dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
Figure 4–13: Buffer Information dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–15
Figure 4–14: Example procedure output to screen . . . . . . . . . . . . . . . . . . . . . . . . . . 4–17
Figure 4–15: Compiler Messages dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–19
Figure 5–1: Application Compiler window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Figure 5–2: File Specification dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5
Figure 5–3: Compiler Results dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Figure 5–4: Compiler Options dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
vii
Contents
viii
Preface
This Preface contains the following sections:
• Purpose
• Audience
• Organization
• Typographical conventions
• OpenEdge messages
OpenEdge Development: Basic Development Tools
Purpose
This book is a user guide for OpenEdge™ Release 10 basic development toolset for character
mode. These tools include the Progress Procedure Editor, the Data Dictionary, and the Progress
Application Compiler.
Audience
This book is intended for developers who want to use OpenEdge basic development tools to
develop their applications.
Organization
Chapter 1, “Application Development Environment”
Describes how to access the Application Development Environment (ADE), access each
OpenEdge tool, and use on-line help for error messages.
Describes how to access the Progress Procedure Editor and use it to perform tasks. The
Progress Procedure Editor allows you to create, write, compile, and run Progress 4GL
procedures.
Describes the integration hooks you can add to the Progress Procedure Editor.
Describes the Progress Procedure Editor menu options and dialog boxes.
Describes how to access the Application Compiler and use its menu options. The
Application Compiler allows you to compile a set of source procedures and create
Progress r-code.
Preface–2
Preface
Typographical conventions
This manual uses the following typographical conventions:
Convention Description
SMALL, BOLD Small, bold capital letters indicate OpenEdge™ key functions and
CAPITAL LETTERS generic keyboard keys; for example, GET and CTRL.
KEY1 KEY2 A space between key names indicates a sequential key sequence:
you press and release the first key, then press another key. For
example, ESCAPE H.
Syntax:
Preface–3
OpenEdge Development: Basic Development Tools
OpenEdge messages
OpenEdge displays several types of messages to inform you of routine and unusual occurrences:
• 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.
• 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.
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.
Preface–4
Preface
• Choose Help→Messages and then enter the message number to display a description of a
specific OpenEdge message.
On UNIX platforms, use the Progress PRO command to start a single-user mode character
OpenEdge client session and view a brief description of a message by providing its number.
install-dir/dlc/bin/pro
3. Type the message number and press ENTER. Details about that message number appear.
4. Press F4 to close the message, press F3 to access the Progress Procedure Editor menu, and
choose File→Exit.
Preface–5
OpenEdge Development: Basic Development Tools
Preface–6
1
Application Development Environment
The OpenEdge™ Application Development Environment (ADE) consists of the tools you need
to create an OpenEdge application.
• Procedure Editor
• Data Dictionary
• Application Compiler
This manual covers the tools used for application development: Procedure Editor and
Application Compiler. For information on the Data Dictionary, refer to OpenEdge
Development: Basic Database Tools.
Procedure Editor
The Procedure Editor lets you create and run Progress® procedures. See Chapter 2, “Procedure
Editor Tasks” for a description of the tasks you can perform with the Procedure Editor. See
Chapter 4, “Procedure Editor Reference,” for a description of the Procedure Editor menu
options and dialog boxes.
Before starting the Procedure Editor, be sure to include the directory where you installed
OpenEdge in the PATH environment variable (DLC\bin, by default).
• To start a multi-user OpenEdge session, enter the following command at the command
line, where database refers to any database created with OpenEdge Release 10:
mpro [ database ]
• To start a single-user OpenEdge session, enter the following command at the command
line, where database refers to any database created with OpenEdge Release 10:
pro [ database ]
1–2
Application Development Environment
• To start a single-user OpenEdge session and load procedure files, enter the following
command at the command line:
pro -param
" procedure1.p , procedure2.p , procedure3.p , ... "
Application Compiler
The Application Compiler lets you compile a group of source procedures (.p and .w files). See
Chapter 5, “Application Compiler” for a complete description of how to compile a Progress
procedure.
To start the Application Compiler, choose Tools→Application Compiler from the menu bar
in any of the other OpenEdge tools.
1. Press F3 to access the menu bar for all tools except the Data Dictionary.
• Type the mnemonic (the underlined letter) in the menu name. For example, type e to
choose the Edit menu.
• Use the arrow keys to highlight the menu name, then press RETURN.
Some menu options have predefined accelerator keys assigned to them, which let you use the
keyboard to choose a menu option. Accelerator keys are function and special key combinations
that let you use the keyboard to choose a menu option. If accelerator keys are assigned to an
option, they appear to the right of the menu option on pull-down menus.
In some cases, key combinations will not work if you use the ESCAPE key while the CAPS LOCK
key is on.
1–3
OpenEdge Development: Basic Development Tools
For information about specifying keyboard mappings on your system, see OpenEdge
Deployment: Managing 4GL Applications.
• Move the highlight bar through the dialog box or window by pressing the right arrow or
TABkey. For example, press TAB to skip a fill-in area, toggle box, or button.
1–4
Application Development Environment
Tools→Procedure Editor
Choose this option to access the Procedure Editor. The Procedure Editor lets you create, edit,
compile, and run Progress procedures. See Chapter 2, “Procedure Editor Tasks” for a complete
description of the tasks you can perform with the Procedure Editor.
Tools→Data Dictionary
Choose this option to access the Data Dictionary, which lets you create and modify database
schema information including table, field, sequence, indexes, and trigger definitions. You also
can generate schema reports. See OpenEdge Development: Basic Database Tools for a
complete description of the tasks you can perform with the Data Dictionary.
Tools→OS Shell
Choose this option to temporarily leave the Procedure Editor so you can run operating system
commands from your operating system prompt. When you leave the shell, you automatically
return to the Procedure Editor.
Tools→Application Compiler
Choose this option to access the Application Compiler. The Application Compiler lets you
compile a group of source procedures (.p files). See Chapter 5, “Application Compiler” for a
complete description of the Application Compiler.
1–5
OpenEdge Development: Basic Development Tools
Recent Messages... Displays the most recent OpenEdge message and a detailed
description of the message.
Help→Messages
Choose this option to display a description of OpenEdge messages. Enter a message number to
display the description.
Help→Recent Messages
Choose this option to display a description of the most recent message and all other messages
generated by OpenEdge during the current session.
1–6
Application Development Environment
Help→Keyboard
Choose this option to show information about Editor and run-time key bindings. These lists
show the actions associated with various keystrokes you can perform with your keyboard.
In some cases, key combinations will not work if you use the ESCAPE key while the CAPS LOCK
key is on.
Help→About Tool
Choose this option to display the OpenEdge version and copyright date.
1–7
OpenEdge Development: Basic Development Tools
1–8
2
Procedure Editor Tasks
This chapter describes many of the tasks you can perform using the Procedure Editor, including:
• Editing text
For details on the menu options and dialog boxes of the Procedure Editor, see Chapter 4,
“Procedure Editor Reference.”
OpenEdge Development: Basic Development Tools
• To start a multi-user OpenEdge session with the Procedure Editor, enter the following
command at the command line, where database refers to any database created with
OpenEdge Release 10:
mpro [ database ]
• To start a single-user OpenEdge session with the Procedure Editor, enter the following
command at the command line, where database refers to any database created with
OpenEdge Release 10:
pro [ database ]
• To start a single-user OpenEdge session and load procedure files, enter the following
command at the command line:
pro -param
" procedure1.p , procedure2.p , procedure3.p , ... "
2–2
Procedure Editor Tasks
When you start the Procedure Editor, the window shown in Figure 2–1 appears.
Menu bar
Insertion
point
Procedure
area
Name of
current buffers
Command
keys
Feature Purpose
Insertion point Marks where text appears when you start typing.
Procedure area The visible part of the current buffer where you type and edit your
Progress procedures.
Current buffer The name of the procedure file you are currently editing. If the buffer has
name no name assigned, it appears as “Untitled” and is followed by a number to
make it unique.
Command Allow you to perform basic tasks in the Procedure Editor. These keys let
keys you run procedures and access menus and help. They also let you open
files into buffers and save or close them.
2–3
OpenEdge Development: Basic Development Tools
Dialog boxes, windows, or frames might appear in front of the window for various reasons. For
example, they can display alert boxes that enable you to enter search strings and filenames or
verify actions.
Although you can open multiple buffers in the Procedure Editor, you can open only one buffer
for each operating system file.
The buffer displayed in the Procedure Editor’s procedure area is called the current buffer. When
you enter text into the procedure area of the Procedure Editor, you enter it into the current
buffer. When you start the Procedure Editor, the current buffer is empty and untitled unless you
specify a procedure at the command line.
The maximum buffer size you can open in the Procedure Editor is the lesser of the following:
2–4
Procedure Editor Tasks
Switching buffers
To switch to another open buffer, use one of the following techniques:
• Choose Buffer→Next Buffer. The Procedure Editor makes the next buffer in the buffer
list the current buffer.
• Choose Buffer→Previous Buffer. The Procedure Editor makes the previous buffer in the
buffer list the current buffer.
• Choose Buffer→List, then select a buffer from the Buffer List dialog box and choose
OK. The Procedure Editor displays the buffer you selected as the current buffer.
2–5
OpenEdge Development: Basic Development Tools
• Opening a procedure.
• Saving a procedure.
• Printing a procedure.
• Closing a procedure.
Note: The Procedure Editor does not allow you to create a file with a comma in its name.
Opening a procedure
To open an existing procedure file:
1. Choose File→Open.
2. Select the filename from the Open dialog box, then choose OK.
The Procedure Editor cannot open a file with a comma in its name.
The Procedure Editor creates a new buffer, reads the file into it, makes it the current buffer, and
labels it with the name of the file. You can open multiple buffers in the Procedure Editor, but
you cannot open more than one buffer at a time for the same operating system file. The number
of buffers is limited by system memory. You can access other buffers from the Buffer menu.
For more information on the Buffer menu, see Chapter 4, “Procedure Editor Reference.”
2–6
Procedure Editor Tasks
The maximum buffer size you can open in the Procedure Editor is the lesser of the following:
Saving a procedure
You can save the contents of the current buffer by:
1. From the menu bar, choose File→Save or File→Save As. The Save As dialog box appears.
See Chapter 4, “Procedure Editor Reference” for a detailed description of the Save As
dialog box fields:
2–7
OpenEdge Development: Basic Development Tools
When you enter a filename, add the .p extension to the procedure file. Procedures are
stored as operating system files. UNIX filenames are case sensitive, unlike Windows.
Unless you specify a path when you name the file, OpenEdge stores the file in your current
working directory.
Caution: Do not name a procedure _edit.p, because that is the name of the Procedure Editor.
If you do, and the procedure falls before $DLC in your PROPATH, OpenEdge accesses
the incorrect file when you try to run the Procedure Editor.
OpenEdge saves the procedure to the specified filename and keeps the buffer open so you can
continue working in it. The buffer name changes to the specified filename.
The Procedure Editor cannot save a file with a comma in its name.
When you are in a named buffer and you choose File→Save, OpenEdge automatically saves the
procedure to the current filename and keeps the buffer open so you can keep working in it.
Printing a procedure
To print the contents of the current buffer, choose File→Print. OpenEdge sends the current
buffer contents to your computer system’s default printer. There are no print format options.
Closing a procedure
To close a procedure, choose File→Close. The Procedure Editor closes the current buffer. If
you make changes to the current buffer, OpenEdge prompts you to save the changes before it
deletes the buffer. If the buffer is untitled and you choose to save it, OpenEdge displays the
Save As dialog box. Specify the filename and choose OK to save the procedure.
2–8
Procedure Editor Tasks
Editing text
This section describes how to edit text in the Procedure Editor. It describes the following tasks:
• Entering text.
• Selecting text.
Entering text
Enter text into the Procedure Editor by typing as you would in any other editor. Text you enter
into the current buffer appears at the location of the cursor. The cursor is a place marker in text.
The location of the cursor is referred to as the insertion point.
You can use the keyboard arrow keys to relocate the insertion point. You also can choose
Search→Goto Line to move the insertion point to a specific line number within the current
buffer. See the “Search→Goto Line” section on page 4–13 for more information on this option.
There are some characters that you cannot type directly into the edit buffer. To represent ASCII
control characters or other character codes that the keyboard cannot generate directly (8-bit
codes, for example), type the three-digit octal code of the character, preceded by a tilde (~). For
more information about special characters, see OpenEdge Development: Progress 4GL
Reference.
When you write procedures with the Procedure Editor, you can use uppercase, lowercase, or
mixed case. The Progress Compiler recognizes “table,” “TABLE,” and “Table” as the same
word.
You can create and edit text lines longer than 80 characters using the Procedure Editor.
2–9
OpenEdge Development: Basic Development Tools
You can use a tilde (~) as the last non-blank character on a line to indicate that the line is
continued, beginning with column 1 of the next line in the window, as shown in the following
example:
The Progress Compiler interprets the lines in this example as the following single line:
The Procedure Editor does not change the physical presentation you give the file. When you use
a tilde to connect two lines, the Procedure Editor maintains the tilde in the code. The Procedure
Editor saves it and displays it; however, the Compiler compiles the file without the tilde.
Selecting text
Select text when you want to perform an action or command on that text or if you want to use
the selected text in a command.
You can select text by positioning the cursor where you want to begin selecting text and
pressing CTRL-V to enter block selection mode. Then move the cursor to the end of the text you
want to select. The text is not highlighted, but it is selected.
1. Select the text you want to cut or copy. See the “Selecting text” section above for the steps
to follow.
2. To cut the text, choose Edit→Cut. To copy the text, choose Edit→Copy.
The Procedure Editor deletes or copies the selected range of text from the file in the current
buffer and places it onto the clipboard.
2–10
Procedure Editor Tasks
1. Position the cursor at the point you want to insert the text.
2. Choose Edit→Paste.
The Procedure Editor inserts the contents of the clipboard at the cursor and repositions the
cursor after the pasted text.
• Finding text.
• Replacing text.
Finding text
If you have searched for a string in the current session, the Find What field displays the
text string for which you last searched. If your search is not case sensitive (that is, you do
not select the Match Case option in the Find dialog box), the string you supply can be
uppercase, lowercase, or both; otherwise, enter it exactly as you want to search for it.
3. Specify whether the search is case sensitive using the Match Case option.
2–11
OpenEdge Development: Basic Development Tools
4. Specify whether to wrap to the beginning or end of the current buffer when the search
reaches the opposite end of the buffer.
5. Specify whether to search forward or backward through the current buffer by selecting the
up or down options.
6. Choose OK.
The Procedure Editor searches for the first occurrence of the string in the direction you specify.
When it finds a match for the search string, it positions the cursor at the end of the search string.
You can choose Search→Find Next or Search→Find Previous to find the next or previous
occurrence of the text. The Procedure Editor displays an alert box if it does not find a match.
If you have used the Search→Find option in the current session, you can search for text using
the Search→Find Next or Search→Find Previous menu options. The Procedure Editor
searches for the text you specified in the Find What field of the Find dialog box in the forward
direction (Find Next) or reverse direction (Find Previous).
If you have not previously used the Search→Find option in this session, OpenEdge displays an
alert box when you select Search→Find Next or Search→Find Previous.
Replacing text
1. Choose Search→Replace.
2. Enter the text string you want to find. The Replace dialog box appears:
If you have searched for a string in the current session, the Find What field displays the
string for which you last searched. If your search is not case sensitive (that is, you do not
select the Match Case option in the Replace or Find dialog box), the string you supply
can be uppercase, lowercase, or both; otherwise, enter it exactly as you want to search for
it. You cannot use wildcard characters when specifying the find string.
2–12
Procedure Editor Tasks
3. Enter the string with which you want to replace the specified string.
5. Choose the Replace All button if you want to replace all occurrences of the search string
with the new string without confirming each occurrence.
6. Choose OK.
The Procedure Editor searches for the first occurrence of the string in a forward direction. If you
do not choose the Replace All button, the Editor prompts you to confirm the replacement for
each occurrence of the string it finds. If you choose the Replace All button, the Editor
automatically replaces each occurrence of the string with the text in the Replace With field.
When complete, the Editor displays an information alert box indicating the Replace All task is
complete and displaying the number of occurrences replaced.
1. Place the cursor at the point where you want to insert the file.
2. Choose Edit→Insert File from the main menu. The Insert File dialog box appears.
The Procedure Editor inserts the file contents into the current buffer at the cursor position.
2–13
OpenEdge Development: Basic Development Tools
1. Place the cursor at the point where you want to insert the field name.
2. Choose Edit→Insert Fields from the main menu. If you are connected to a database,
OpenEdge displays the Field Selector dialog box, as shown below.
If you are not already connected to a database, OpenEdge displays an alert box. If you
choose OK, OpenEdge displays the Database Connect dialog box. See OpenEdge
Development: Basic Database Tools for information on this dialog box. After you connect
to a database, OpenEdge displays the Field Selector dialog box:
4. Specify prefixes to include with the field names. See the “Edit→Insert Fields” section on
page 4–9 for more information on these options.
5. Choose OK. The Procedure Editor inserts the field names into the current buffer at the
cursor position.
2–14
Procedure Editor Tasks
• Debugging a procedure.
The messages displayed typically show a brief description of the message, often including the
name of the file and line number containing the error, followed by an OpenEdge message
number in parentheses. You can display additional information about the messages using the
Help→Messages or Help→Recent Messages options.
If the Progress Compiler detects any errors, the Procedure Editor moves the text cursor to the
line in the current buffer that contains the first error. If the file containing the error is not in the
current buffer but is an include file, the Procedure Editor opens the include file, making it the
current buffer. The Procedure Editor then positions the cursor on the line in the include file that
contains the error. If the include file containing the error is not syntactically complete (that is,
it does not contain at least one 4GL statement with a period), the Procedure Editor opens the
source file that references the include statement, rather than the include file that contains the
error.
2–15
OpenEdge Development: Basic Development Tools
When you run a procedure and have several open buffers, the Progress Compiler accesses only
the code in the current buffer of the Procedure Editor. It does not access files in other buffers
but uses the saved versions of the files. This means that if you run a procedure, and the Progress
Compiler detects an error in a file open in a buffer other than the current buffer, you must save
any changes you make to that called file for them to be recognized when you rerun the initial
procedure.
If you do not save the changes, the next time you run the initial procedure that calls the file, the
Progress Compiler runs the saved version of the files and disregards the changes you have made
in the open buffer of the Procedure Editor. When the Progress Compiler detects the error, the
Procedure Editor switches the called file to the current buffer and places the cursor on the line
that previously contained the error. Your changes appear in the current buffer, but because you
did not save them, the Progress Compiler could not access the modified code.
Debugging a procedure
To debug a procedure, choose Compile→Debug from the menu bar. The Procedure Editor
checks the procedure’s syntax. If the procedure compiles, the Procedure Editor opens the
OpenEdge Debugger and displays the procedure at the break point of the first executing line.
For more information about debugging a procedure, see OpenEdge Development: Debugging
and Troubleshooting.
• Choose File→Exit.
If there are open buffers with unsaved changes, an alert box prompts you to save or discard the
buffers before leaving the Procedure Editor. To discard the buffers and exit the Procedure
Editor, choose No in the alert box.
2–16
Procedure Editor Tasks
1. Choose Yes in the alert box. OpenEdge displays the Save Buffers with Changes dialog
box.
2. Select the buffers to save and choose the Save Selected button. If you are saving any
untitled buffers, the Save As dialog box appears for each buffer.
3. Specify the filename for each untitled buffer, then choose OK. After you specify the
filename for the last untitled buffer, OpenEdge closes the Procedure Editor.
When OpenEdge closes the Procedure Editor, it returns to where you started. For example, if
you start the Procedure Editor from the operating system command line, OpenEdge returns to
the command line.
2–17
OpenEdge Development: Basic Development Tools
2–18
3
Procedure Editor Integration Hooks
This chapter explains how to add integration hooks to the Procedure Editor by describing the
parameters and events for adecomm/_adeevnt.p and how to modify this procedure to interface
with source code management or your own proprietary tools:
• Parameters
• Events
• Usage
Source code management tools or your own proprietary tools can interface with the Procedure
Editor. They can intercept and augment tool behavior at the following critical points in the
application development process:
To allow source code management or your own proprietary tools to “trap” these ADE events,
the Procedure Editor calls a procedure file, adecomm/_adeevnt.p, at those critical processing
points. You can modify this procedure to intercept and augment standard tool behavior. The
source code to this procedure is provided by Progress Software. Corporation. To use this
procedure, you must copy the source code, modify it, compile it, and place it in your PROPATH.
Note: For GUI application development, there are three procedure files for integration
hooks—adecomm/_adeevnt.p, adecomm/_getfile.p, and adecomm/_chosobj.w. For
more information on how to use integration hooks for GUI application development, see
the on-line help.
3–2
Procedure Editor Integration Hooks
The source code for this file is in DLC/src/adecomm/_adeevent.p. Look at this file for the latest
information on ADE events.
Parameters
This section describes the input and output parameters for the adecomm/_adeevnt.p procedure.
Input parameters
The adecomm/_adeevnt.p procedure takes the following input parameters:
p_product
The ADE product code (for the Procedure Editor, use Editor).
p_event
p_context
A string used to uniquely identify the file being edited. The Procedure Editor uses the edit
widget-handle of the buffer for this value. A specific file has the same context ID for all
its file operations; however, if you close a file and then open it again, the context number
will change.
3–3
OpenEdge Development: Basic Development Tools
p_other
Additional information passed about an event (for example, a SAVE event normally passes
the filename for the save).
The current filename associated with the window. The name is unknown (?) if it was not
set; for example, after a File→New.
Output parameters
The adecomm/_adeevnt.p procedure uses the following output parameters:
p_ok
A logical value used to approve or cancel a subset of ADE events. For example, returning
a FALSE value from the BEFORE-SAVE event cancels the save.
Events
This section describes the file-specific events and the STARTUP and SHUTDOWN events for the
adecomm/_adeevnt.p procedure.
File-specific events
Table 3–1 describes the events (corresponding to p_event) that are related to file operations.
Event Operation
3–4
Procedure Editor Integration Hooks
Event Operation
3–5
OpenEdge Development: Basic Development Tools
• STARTUP — Called when the Procedure Editor (PE) has been loaded and initialized. This
call occurs immediately before user input is allowed. In this case:
– p_context = STRING(procedure-handle-of-the-PE-main-routine)
– p_other = STRING(widget-handle-of-the-PE-window)
• SHUTDOWN — Called when a user requests that the Procedure Editor shutdown. This call
occurs before any settings have been saved or items destroyed. In this case:
– p_context = STRING(procedure-handle-of-the-PE-main-routine)
– p_other = STRING(widget-handle-of-the-PE-window)
Usage
The following comments address Procedure Editor usage issues:
• BEFORE-CLOSE and CLOSE — Technically, p_other should be unknown (?) after a file
closes; however, this parameter still shows the last available file name for the procedure
file. Unknown (?) appears only if there is no filename.
• If the user tries to close a buffer, then the Procedure Editor first prompts the user to save.
The entire save operation events fire before the call to BEFORE-CLOSE.
• NEW is called after a buffer is created. You see the buffer before the NEW event is called. All
events are called after the event has finished.
• When you control the handle for the Procedure Editor window, you can manipulate the
display of the window. For example, you can add a menu option.
3–6
Procedure Editor Integration Hooks
Running the file BEFORE-RUN 56788 c:\9\window-1.w Run uses last filename.
Procedure Editor BEFORE-SAVE 56788 c:\9\my-file.w Closing a file can cause the
prompts user to Procedure Editor to prompt the
save changes user to save a file.
CLOSE – – –
3–7
OpenEdge Development: Basic Development Tools
3–8
4
Procedure Editor Reference
This chapter describes the Procedure Editor’s menu options and dialog boxes.
The Procedure Editor is a menu-driven tool you can use to create, edit, compile, and run
Progress procedures. The Procedure Editor is fully integrated with the Progress Compiler, the
OpenEdge Data Dictionary, and the OpenEdge Debugger. It checks the syntax of your
procedures and verifies the existence of tables and fields named in your Progress procedures.
• File menu
• Edit menu
• Search menu
• Buffer menu
• Compile menu
• Tools menu
• Help menu
For information on how to use the Procedure Editor to perform tasks, see Chapter 2, “Procedure
Editor Tasks.”
OpenEdge Development: Basic Development Tools
Menu Description
Search Searches for and replaces code strings in the current buffer.
Buffer Manages buffers, including switching the current buffer and displaying buffer
information.
Help Accesses information about OpenEdge error messages and keyboard mappings.
4–2
Procedure Editor Reference
File menu
File menu options enable you to retrieve and save Progress program files. Table 4–2 describes
the menu that appears when you choose this option.
File→New
Choose this option to create a new file or procedure. The Procedure Editor creates a new,
untitled buffer and makes it the current buffer. The number of buffers is limited by system
memory.
The maximum buffer size you can open in the Procedure Editor is the lesser of the following:
You can switch between buffers using the Buffer menu commands. For more information, see
the “Buffer menu” section on page 4–13.
4–3
OpenEdge Development: Basic Development Tools
File→Open
Choose this option to edit an existing file. When you choose this option, the Open dialog box
shown in Figure 4–2 appears.
The Procedure Editor cannot open a file with a comma in its name.
When you choose the Files button from the Open dialog box, the Files dialog box like the one
shown in Figure 4–3 appears.
4–4
Procedure Editor Reference
Table 4–3 describes the user-interface elements of the Files dialog box.
File Name Specifies the name of the file you want to open.
File→Close
Choose this option to delete the current buffer. If you make changes to the current buffer, the
Procedure Editor prompts you to save the changes to a file before it deletes the buffer. If the
buffer is untitled, an alert box like the one in Figure 4–4 appears.
File→Save
Choose this option to save the contents of the current buffer to the current file. When you choose
this option and the current buffer is untitled, the Save As dialog box is displayed, as shown in
Figure 4–5. The Procedure Editor displays an alert box if you try to save changes to a read-only
file.
4–5
OpenEdge Development: Basic Development Tools
File→Save As
Choose this option to save the contents of the current buffer to a new file or to an existing file.
When you choose this option, the Save As dialog box shown in Figure 4–5 appears.
The Procedure Editor cannot save a file with a comma in its name.
Field Use
File Name Specifies the name for the file you want to save.
File→Print
Choose this option to print the contents of the current buffer. The current buffer contents are
sent to your computer system’s default printer. There are no special formatting features or
options.
4–6
Procedure Editor Reference
File→Exit
Choose this option to close the Procedure Editor. When you exit the Procedure Editor, you
return to where you started. For example, if you start the Procedure Editor from the operating
system command line, you return to the command line.
If there are open buffers with unsaved changes, an alert box prompts you to save or discard the
changes before leaving the Procedure Editor. If you choose to save the changes, the Save
Buffers with Changes dialog box appears as shown in Figure 4–6. This dialog box lists all the
open buffers that have unsaved changes.
If you select any untitled buffers and choose the Save Selected button, the Save As dialog box
appears for each untitled buffer. You can specify a filename for each untitled buffer or cancel
the save operation.
Edit menu
Edit menu options enable you to manipulate and edit blocks of text. Table 4–5 describes the
menu that appears when you choose this option.
Cut Removes selected text from the current buffer and stores it on the system
clipboard.
4–7
OpenEdge Development: Basic Development Tools
Paste Places clipboard contents in the current buffer at the insertion point.
Insert File... Copies the contents of the selected file into the current buffer at the
insertion point.
Insert Fields... Inserts selected database field names into the current buffer at the
insertion point.
Edit→Cut
Choose this option to delete the selected text from the file in the current buffer and place it onto
the system clipboard, erasing the previous clipboard contents.
Choose the Edit→Paste option to retrieve the deleted text from the clipboard and insert it into
the current buffer.
To select text, position the cursor where you want to begin selecting text and press CTRL-V to
enter block selection mode. Then move the cursor to the end of the text you want to select. The
text is not highlighted, but it is selected.
Edit→Copy
Choose this option to make a copy of the selected text from the file in the current buffer and
place it onto the system clipboard, erasing the previous clipboard contents.
Choose the Edit→Paste option to retrieve the copied text from the clipboard and insert it into
the current buffer.
To select text, position the cursor where you want to begin selecting text and press CTRL-V to
enter block selection mode. Then move the cursor to the end of the text you want to select. The
text is not highlighted, but it is selected.
Edit→Paste
Choose this option to place the contents of the system clipboard at the insertion point in the file
in the current buffer. If text is selected, the Paste option replaces it with the contents of the
system clipboard.
4–8
Procedure Editor Reference
Edit→Insert File
Choose this option to read a copy of a file into the current buffer. When you choose this option,
the Insert File dialog box shown in Figure 4–7 appears.
The Edit→Insert File option works the same way as the File→Open option, except that it pulls
the file information into the current buffer instead of a new buffer.
Edit→Insert Fields
Choose this option to insert a field name into the current buffer. When you choose this option,
the Field Selector dialog box shown in Figure 4–8 appears.
If you are not already connected to a database, OpenEdge displays an alert box and lets you
access the Database Connect dialog box.
4–9
OpenEdge Development: Basic Development Tools
Table 4–6 describes the user-interface elements of the Field Selector dialog box.
None Indicates you do not want to include a prefix with the field
name in your procedure.
Table Indicates you want to include the table name as well as the
field name in your procedure.
Database.Table Indicates you want to include the database and table name
with the field name in your procedure.
Search menu
Search menu options enable you to search for and replace text strings in the current buffer. Table
4–7 describes the menu that appears when you choose this option.
Find Next Searches for the next occurrence of the text string specified in the Find
dialog box.
Find Previous Searches for the previous occurrence of the text string specified in the
Find dialog box.
Goto Line... Moves the insertion point to a specified line number in the current buffer.
4–10
Procedure Editor Reference
Search→Find
Choose this option to search for text within a file. When you choose Search→Find, the Find
dialog box shown in Figure 4–9 appears.
Field Purpose
Wrap at Specifies whether to wrap to the beginning of the current buffer and
Beginning/End continue searching when the search reaches the end of the buffer.
Search→Find Next
Choose this option to find the next occurrence of the text for which you most recently searched
using the Search→Find option. This option uses the same search criteria as the Search→Find
option.
4–11
OpenEdge Development: Basic Development Tools
Search→Find Previous
Choose this option to find the previous occurrence of the text for which you most recently
searched using the Search→Find option. This option uses the same search criteria as the
Search→Find option.
Search→Replace
Choose this option to search for and replace text within the current buffer. This type of search
is always in a forward direction.
When you choose this option, the Replace dialog box shown in Figure 4–10 appears.
Table 4–9 describes the user-interface elements of the Replace dialog box.
The Find What and Replace With fill-in fields default to the text and options you entered the
last time you executed the option in the current session.
4–12
Procedure Editor Reference
Search→Goto Line
Choose this option to move the insertion point to a specific line number within the current
buffer.
When you choose this option, the Goto Line dialog box appears as shown in Figure 4–11. The
Goto Line command lets you enter the line number. It defaults to the line number where the
cursor is located in the current buffer. If you enter a number that exceeds the number of lines in
the current buffer, OpenEdge moves the cursor to the end of the buffer.
Buffer menu
Buffer menu options let you select and view multiple open buffers. Each time you choose
File→New or File→Open, the Editor creates a buffer containing a copy of a file. Table 4–10
describes the menu that appears when you choose this option.
4–13
OpenEdge Development: Basic Development Tools
Buffer→List
Choose this option to display a list of open buffers. Buffers appear listed in the order in which
you open them. When you choose this option, the Buffer List dialog box shown in Figure 4–12
appears.
This list has a marker (>) that indicates the current buffer. You can switch to another buffer by
selecting it from the list and pressing GO.
An asterisk (*) marks each buffer modified since it was last saved.
Buffer→Next Buffer
Choose this option to display the next buffer in the buffer list. When you choose this option, the
next open buffer appears and becomes the current buffer. Buffers appear in the order in which
you open them. If you choose Next when the last buffer in the list is the current buffer, the first
buffer in the list appears.
Buffer→Previous Buffer
Choose this option to display the previous buffer in the buffer list. When you choose this option,
the previous open buffer appears and becomes the current buffer. Buffers appear in the order in
which you open them. If you choose Previous when the first buffer in the list is the current
buffer, the last buffer in the list appears.
4–14
Procedure Editor Reference
Buffer→Information
Choose this option to view settings for the current buffer. When you choose this option, a
Buffer Information dialog box like the one in Figure 4–13 appears.
Table 4–11 describes the user-interface elements of the Buffer Information dialog box.
User-interface
element Purpose
File Name Displays the name of the operating system file from which the buffer
was read. It always displays the full pathname of the file.
File Access Specifies whether the file from which the text in the current buffer was
read is read-only or updatable. If the file is read-only, you cannot save
changes to the current buffer in the original file. You must choose
File→Save As to save the changes to another file.
Line Displays the line position of the insertion point in the buffer.
Column Displays the column position of the insertion point in the buffer.
4–15
OpenEdge Development: Basic Development Tools
Compile menu
Compile menu options enable you to run and compile Progress procedures. Table 4–12
describes the menu that appears when you choose this option.
Check Syntax Checks the syntax of the procedure in the current buffer.
Debug Invokes the Debugger for the procedure in the current buffer.
Compiler Messages... Displays the compiler messages for the most recent compile.
4–16
Procedure Editor Reference
Compile→Run
Choose this option to compile and run a procedure in the current buffer. Figure 4–14 shows an
example of the screen output of a compiled procedure.
4–17
OpenEdge Development: Basic Development Tools
When the procedure is complete, press SPACEBAR to return to the Procedure Editor. You return
to the buffer, and the cursor is in the same position as when you executed Compile→Run.
If you run a procedure that contains only the QUIT statement, the procedure stops running and
the Procedure Editor automatically exits. If you have buffers open with changes in them, the
Procedure Editor prompts you to save the changes before exiting.
Compile→Check Syntax
Choose this option to compile the procedure in the current buffer and check for 4GL syntax
errors.
The Compiler Messages dialog box explains any problems in the syntax. OpenEdge displays
an alert box when the syntax is correct.
Compile→Debug
Choose this option to access the Debugger and debug the procedure code in the current buffer.
For more information about debugging a procedure, see OpenEdge Development: Debugging
and Troubleshooting.
Note: If the procedure in the current buffer does not compile, the Procedure Editor does not
open the Debugger when you choose this option.
4–18
Procedure Editor Reference
Compile→Compiler Messages
Choose this option to display the compiler messages for the most recent compile. Figure 4–15
shows an example of the Compiler Messages dialog box.
Tools menu
Tools menu options let you access other tools. See Chapter 1, “Application Development
Environment” for more information about this menu.
Help menu
Help menu options let you access online help information about OpenEdge error messages and
key mappings. See Chapter 1, “Application Development Environment” for more information
about this menu.
4–19
OpenEdge Development: Basic Development Tools
4–20
5
Application Compiler
The Progress Application Compiler utility lets you compile a set of source procedures (.p files)
either for the duration of an OpenEdge session (or until OpenEdge runs out of directory entries)
or for permanent storage. For a session, OpenEdge creates temporary r-code files. For
permanent storage, OpenEdge creates r-code files that inherit the name of the source file and a
.r extension by default. Once you compile a procedure, it does not get recompiled when you run
it, so the procedure runs quickly. For more information on r-code, see OpenEdge Development:
Progress 4GL Handbook.
When you start the Application Compiler, OpenEdge displays the window shown in Figure 5–1.
Menu bar
Files/Directories
selection list
Toggle boxes
Action buttons
You use the Application Compiler window to select options and define settings for your
compilation.
5–2
Application Compiler
• Save New .r Files — Table 5–1 describes how choosing this toggle box affects the
compilation process.
Table 5–1: Save New .r toggle box and the compilation process
Do not select Does not Creates a temporary r-code file that lasts only
Save New .r Files exist for the duration of the current OpenEdge session
or until OpenEdge runs out of directory entries
(-D) and must reuse the directory entry for that
r-code file.
Select Save New .r Does not Compiles the source file and saves the new
Files exist r-code file. If errors occur during compilation,
no r-code file is created.
If you specify a directory in the Save Into field of the Compiler Options dialog box, the
Application Compiler saves the new r-code files into that directory. If you do not specify
a directory in the Save Into field, the Application Compiler saves the new r-code files into
the directory that contains the source code files.
• Look in Subdirectories — Searches for and compiles the specified source files in the
subdirectories of the selected directory.
5–3
OpenEdge Development: Basic Development Tools
• Remove Old .r Files — Deletes any existing r-code file that corresponds to the specified
source file in the same directory. You do not need to select this option if you are going to
save the new r-code files because newly compiled r-code files automatically replace
existing ones.
You must select this option when you want to compile source files for only the OpenEdge
session (that is, without saving the r-code files). Thereafter, when you run the compiled
procedures, the Application Compiler ensures that you are running the latest versions. If
you do not first remove the existing r-code files, the Application Compiler does not
recompile the source files. Instead, the error message Compile aborted. SAVE not
specified and .r file exists appears.
• Only Compile if No .r File — Compiles the specified source files only when no
corresponding r-code files are found in the selected directory.
Note: You cannot specify both Remove Old .r Files and Only Compile if No .r File at the
same time. When you choose one option, the Compiler automatically deactivates the
other.
Button Action
Propath... Displays all the directories that are located on your PROPATH. Highlight the
directories you want to add to the file/directory selection list and choose OK.
Add... Adds a file or directory outside of the PROPATH to the file/directory selection
list. Specify the file or directory name you want to add.
Modify... Modifies the currently selected file or directory specification. Specify the
change you want to make to the selected file or directory specification.
5–4
Application Compiler
Button Action
Delete Deletes the currently selected file or directory from the file/directory selection
list. Verify that you want to delete the selected file or directory from the
selection list.
Start Compiles all the files specified in the file/directory selection list.
Compile
When you choose the Add or Modify action buttons, the File Specification dialog box shown
in Figure 5–2 appears.
Table 5–3 describes the user-interface elements of the File Specification dialog box.
User-interface
element Purpose
File or directory Specifies the name of the file or directory you want to add or modify.
name
Types Specifies the filter the Application Compiler uses to perform a match
on other strings such as file or directory names. A filter frequently uses
a wildcard character to match strings, for instance, a*.* returns all
filenames beginning with the letter a and containing a period. The
default types are *.p and *.w, which return all file or directory names
with the .p and .w extensions. Progress evaluates filters with the
MATCHES function. To specify more than one type, separate the types
with a space; do not separate them with a comma.
Files Displays the Files dialog box, which lists the files in the currently
selected directory.
5–5
OpenEdge Development: Basic Development Tools
Menu Description
Options Accesses Compiler options and lets you save your Compiler settings.
File menu
The File menu lets you exit the Application Compiler. Table 5–5 describes the menu that
appears when you choose this option.
Compile menu
The Compile menu lets you compile Progress source files. Table 5–6 shows the Compile menu.
5–6
Application Compiler
Compile→Start Compile
When you select this option, the Compiler Results dialog box shown in Figure 5–3 appears.
The dialog box displays messages about the status of the compilation. If you do not choose
Options→Show Status, the Compiler only indicates when the compilation completes. If you
choose Options→Show Status, however, the Compiler displays all messages generated during
the compilation. For example, the messages state whether a file compiled successfully or
whether it failed, and if so, on what line. Other messages include notices of incompatible CRC,
and so on.
Tools menu
The Tools menu lets you access other tools. See Chapter 1, “Application Development
Environment” for more information.
Options menu
The Options menu lets you specify file information and display all the compilation status
messages. Table 5–7 lists the items on the Options menu.
5–7
OpenEdge Development: Basic Development Tools
Show Status Shows all messages in the Compiler Results window when you compile.
Options→Compiler
Choose Options→Compiler to supply more information about the file you want to compile.
When you choose this option, the Compiler Options dialog box appears as shown in Figure
5–4.
Table 5–8 describes the fields in the Compiler Options dialog box.
Field Purpose
Default File Specifies the types of files you want to add to the file/directory specification
Spec list. The default file specification is *.p, *.w.
Message Specifies the file to which the Application Compiler sends compiler
Log File messages and status. The default output filename is compile.log.
5–8
Application Compiler
Field Purpose
Save into Specifies the directory where you want to save the r-code files. By default,
the Application Compiler saves the r-code files into the directory that
contains the source file.
Languages Identifies the language segment to be created in the r-code. The Application
Compiler compiles the source file as well as strings translated into different
language segments into the r-code file. The default language is the language
in your source code. Enter the names of the languages separated by a space.
Progress stores translated character strings for each specified language in
separate text segments within the r-code file. For the Application Compiler
to include translations, you must be connected to a translation database.
Stream-IO Specifies that all output from the compiled procedure be formatted for
output to a file or printer. All font specifications are ignored and all frames
are treated as if they included the USE-TEXT option.
Listing File Specifies the name of the listing file. The Application Compiler produces a
listing of the compilation that includes the following information:
• The number of the block where each statement belongs.
• The name of the source file you are compiling.
• The date and time at the start of the compilation.
• The line number of each line in the source file.
• The complete text of all include files and the name of any
subprocedures.
• The buffer and frame scopes to procedures, internal procedures, and
trigger blocks.
Page Width Specifies the page width for the listing file. The default page width is 80
characters per line. Enter a number between 80 and 255.
Page Specifies the page length for the listing file. The default page length is 60
Length lines per page. Enter a number between 10 and 127.
5–9
OpenEdge Development: Basic Development Tools
Field Purpose
Xref File Specifies the file where the Application Compiler writes cross-reference
information between source files and database objects.
For each object reference, the xref file contains one unformatted and
blank-separated line containing the following:
• Procedure name
• Source filename
• Line number
• Reference type
• Object identifier
See the COMPILE statement in OpenEdge Development: Progress 4GL
Reference for more information on the cross-reference file.
Append Specifies to append the xref listing of the source file to an existing xref file.
(xref File) If you do not select this option, the Application Compiler creates a new xref
file that replaces any file of the same name.
Debug File Specifies the file where the Application Compiler writes a listing to the
debug file. The debug file consists of a line-numbered listing of the
procedure with the text of all preprocessor include files, names, and
parameters inserted.
Encryption Specifies the key the Application Compiler uses during compilation to
Key decrypt the source file and any encrypted include files. Encrypted files
provide security against users accessing and modifying source files.
Progress lets you use either the default key to encrypt source procedures or
your own encryption key. If you use your own encryption key, enter it here.
If you use an encryption key, the Application Compiler does not produce a
listing file as a security measure.
For more information on encryption keys and procedures, see the COMPILE
statement in OpenEdge Development: Progress 4GL Reference and the
XCODE utility in OpenEdge Deployment: Managing 4GL Applications.
Defaults Changes the current Compiler options to the Application Compiler default
settings.
5–10
Application Compiler
Help menu
Help menu options let you access online help information about the Application Compiler. See
Chapter 1, “Application Development Environment” for more information.
1. Specify the source files you want to compile using the action buttons. You can select files
and directories from your PROPATH using the Propath button or from any other directories
using the Add button.
3. Choose Options→Compiler.
The Compiler Results dialog box appears and displays messages indicating the success
or failure of the compilation.
6. Choose OK from the Compiler Results dialog box to return to the Application Compiler
window.
5–11
OpenEdge Development: Basic Development Tools
5–12
Index
A Asterisk (*)
marker 4–14
About Tool option
Attributes
Help menu 1–7
buffer 4–15
Accelerator keys 1–3
Action buttons B
Application Compiler 5–4
Buffer menu
ADE. See Application Development Procedure Editor 4–13
Environment
Buffers
_adeevnt.p 3–3 current buffer name 2–3
filename 4–15
Application Compiler information 4–15
action buttons 5–4 inserting fields 4–9
Compile menu 5–6 inserting files 4–9
compiler options 5–8 to 5–10 listing 2–5, 4–14
File menu 5–6 save as option 4–6
files/directories selection list 5–2 settings 4–15
menu bar 5–6 size limits 2–4
Options menu 5–7 switching 2–5
starting 1–3, 5–2
toggle boxes 5–3 Bytes
Tools menu 1–5 buffer setting 4–15
Application Development Environment
Application 1–2
OpenEdge Development: Basic Development Tools
C E
Closing Edit menu
files 4–5 Procedure Editor 4–7
Column Editor. See Procedure Editor
buffer setting 4–15
Encryption keys
Command keys compiler option 5–10
character Procedure Editor 2–3
Exiting
Compile menu files 4–5
Application Compiler 5–6
compiler messages option 4–19
Procedure Editor 4–16 F
Compiler messages 4–19 File menu
Application Compiler 5–6
Compiling
Procedure Editor 4–3
criteria save as option 4–6
look in subdirectories 5–3
only compile if no .r files 5–4 Filename
remove old .r files 5–4 buffer setting 4–15
save new .r files 5–3
source files 5–11 Files
closing 4–5
Cursor 2–9 compiling 5–11
debug 5–10
exiting 4–7
D listing 5–9
message log 5–8
Data Dictionary opening 4–4
Tools menu 1–5 xref 5–10
Debug file Files/directories selection list 5–2
compiler option 5–10
Find option
Default file spec Search menu 4–11
Compiler option 5–8
Dialog boxes H
buffer list 4–14
compiler options 5–8 Help
compiler results 5–7 about Tool option 1–7
files 4–4 menu 1–6
open files 4–4
Index–2
I M
Information option Markers
Buffer menu 4–15 asterisk 4–14
current buffer 4–14
Insert fields option
Edit menu 4–9 Menu bar
Application Compiler 5–6
Insert file option Procedure Editor 4–2
Edit menu 4–9
Menus
Insertion point 2–9 Application Compiler
Procedure Editor 2–3 Compile 5–6
File 5–6
Integration hooks 3–1
Option 5–7
Help 1–6
Procedure Editor
K Buffer 4–13
Compile 4–16
Key Edit 4–7
encryption 5–10 File 4–3
Keyboard option Search 4–10
Tools 1–4, 5–7
Help menu 1–7
Message log file
compiler option 5–8
L
Messages
Languages compiler 4–19
compiler option 5–9
Messages option
Limits Help menu 1–6
buffer size 2–4
Modifying
Line buffer settings 4–15
buffer setting 4–15
Multiple users
Listing startup 1–2, 2–2
buffers 4–14
Listing file append
compiler option 5–9
Listing files
compiler option 5–9
Look in subdirectories
toggle box 5–3
Index–3
OpenEdge Development: Basic Development Tools
O S
Only compile if no .r files Save as option
toggle box 5–4 File menu 4–6
Opening files 4–4 Save into
compiler option 5–8
Options menu
Application Compiler 5–7 Save new .r files
toggle box 5–3
OS shell option
Tools menu 1–5 Search menu
Procedure Editor 4–10
P Settings
buffer 4–15
Page length
Single-user
compiler option 5–9
startup 1–2, 2–2
Page width
Source code management tools 3–1
compiler option 5–9
Procedure Editor 4–1 Source files 5–1
Buffer menu 4–13 compiling 5–11
buffer size limits 2–4 Starting
Compile menu 4–16
Application Compiler 1–3, 5–2
cursor 2–9 OpenEdge 2–2
Edit menu 4–7 Procedure Editor 1–2, 2–2
File menu 4–3
Help menu 1–6 Starting OpenEdge 1–2
insertion point 2–3
menu bar 4–2 Stream-IO option
Search menu 4–10 Application Compiler 5–9
starting 1–2, 2–2
Tools menu 1–5
window layout 2–3 T
Text
R find option 4–11
replace option 4–12
R-code file 5–1
Text cursor. See cursor
Recent messages option
Help menu 1–6 Toggle boxes
look in subdirectories 5–3
Remove old .r files only compiler if no .r files 5–4
toggle box 5–4 remove old .r files 5–4
save new .r files 5–3
Replace option
Search menu 4–12 Tools menu 1–4
Index–4
X
Xref file
append
compiler option 5–10
compiler option 5–10
Index–5
OpenEdge Development: Basic Development Tools
Index–6