Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
135 views

OpenEdge Development Basic Development Tools

Uploaded by

renancjsouza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views

OpenEdge Development Basic Development Tools

Uploaded by

renancjsouza
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

OpenEdge Development:

TM

Basic Development Tools


© 2003 Progress Software Corporation. All rights reserved.

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

Product Code: 4630


Item Number: 98883; R10.0A
Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preface–1

1. Application Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1


Starting the ADE tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Procedure Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Application Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3
Accessing menus and menu options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3
Navigating in dialog boxes and windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
Using the Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
Tools→Procedure Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5
Tools→Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5
Tools→OS Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5
Tools→Application Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5
Using the Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
Help→Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
Help→Recent Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
Help→Keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–7
Help→About Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–7

2. Procedure Editor Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1


Starting the Procedure Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2
Using edit buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4
Listing open buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Switching buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Displaying buffer information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Contents

Working with procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6


Creating a new procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Opening a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Saving a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7
Printing a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
Closing a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
Editing text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9
Entering text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9
Selecting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10
Cutting, copying, and pasting text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10
Searching for text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–11
Inserting a file into a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–13
Inserting a field name into a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14
Compiling, running, and checking procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15
Checking a procedure’s syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15
Compiling and running a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15
Debugging a procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16
Exiting the Procedure Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16

3. Procedure Editor Integration Hooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–1


ADE event (adecomm/_adeevnt.p) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3
Input parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3
Output parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
File-specific events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
STARTUP and SHUTDOWN events . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–6
Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–6

4. Procedure Editor Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–1


Procedure Editor menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
File→New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
File→Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
File→Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5
File→Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5
File→Save As . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
File→Print. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
File→Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7

iv
Contents

Edit menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7


Edit→Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8
Edit→Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8
Edit→Paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8
Edit→Insert File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Edit→Insert Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Search menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10
Search→Find . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Search→Find Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Search→Find Previous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12
Search→Replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12
Search→Goto Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Buffer menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Buffer→List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
Buffer→Next Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
Buffer→Previous Buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
Buffer→Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–15
Compile menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–16
Compile→Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–17
Compile→Check Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–18
Compile→Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–18
Compile→Compiler Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–19
Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–19
Help menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–19

5. Application Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–1


Starting the Application Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Using the files/directories selection list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Using the toggle boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Using the action buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4
Using the menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
File menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Compile menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Tools menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Options menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Help menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11
Compiling source files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11

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.

Chapter 2, “Procedure Editor Tasks”

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.

Chapter 3, “Procedure Editor Integration Hooks”

Describes the integration hooks you can add to the Progress Procedure Editor.

Chapter 4, “Procedure Editor Reference”

Describes the Progress Procedure Editor menu options and dialog boxes.

Chapter 5, “Application Compiler”

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

Bold Bold typeface indicates commands or characters the user types, or


the names of user interface elements.

Italic Italic typeface indicates the title of a document, provides


emphasis, or signifies new terms.

SMALL, BOLD Small, bold capital letters indicate OpenEdge™ key functions and
CAPITAL LETTERS generic keyboard keys; for example, GET and CTRL.

KEY1-KEY2 A hyphen between key names indicates a simultaneous key


sequence: you press and hold down the first key while pressing the
second key. For example, CTRL-X.

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:

Fixed width A fixed-width font is used in syntax statements, code examples,


and for system output and filenames.

Fixed-width italics Fixed-width italics indicate variables in syntax statements.

Fixed-width bold Fixed-width bold indicates variables with special emphasis.

UPPERCASE Uppercase words are Progress® 4GL language keywords.


fixed width Although these always are shown in uppercase, you can type them
in either uppercase or lowercase in a procedure.

Preface–3
OpenEdge Development: Basic Development Tools

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:

** Unknown table name table. (200)

If you encounter an error that terminates OpenEdge, note the message number before restarting.

Preface–4
Preface

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 PRO command 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:

1. Start the Progress Procedure Editor:

install-dir/dlc/bin/pro

2. Press F3 to access the menu bar, then choose Help→Messages.

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.

This chapter contains the following sections:

• Starting the ADE tools

• Accessing menus and menu options

• Navigating in dialog boxes and windows

• Using the Tools menu

• Using the Help menu


OpenEdge Development: Basic Development Tools

Starting the ADE tools


The ADE comprises the following tools:

• 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).

There are four ways to start the Procedure Editor:

• 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 , ... "

• From any of the other ADE tools, choose Tools→Procedure Editor.

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.

Accessing menus and menu options


To access and execute the menu options in the ADE tools:

1. Press F3 to access the menu bar for all tools except the Data Dictionary.

2. To choose a menu, do either of the following:

• 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.

Navigating in dialog boxes and windows


Many options you choose in the OpenEdge tools display dialog boxes and windows where you
have to enter information, toggle on boxes, or choose buttons. Use the following information as
a guide to choosing options and entering information into dialog boxes and windows when
using OpenEdge tools:

• 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.

• Reverse direction and move backward by pressing BACKTAB.

• Scroll up and down lists using the arrow keys.

• Choose a highlighted button or a toggle box by pressing RETURN.

Using the Tools menu


The Tools menu lets you access a tool from another tool. For example, you can access the Data
Dictionary from the Procedure Editor. Access to other tools, however, is allowed only in a
forward direction. For example, you cannot return to the Procedure Editor from the Data
Dictionary without closing the Dictionary. Table 1–1 lists the menu options that are available
when you choose the Tools menu option.

Table 1–1: Tools menu

Menu option Description

Procedure Editor Accesses the Procedure Editor.

Data Dictionary Accesses the Data Dictionary.

OS Shell Escapes to the operating system.

Application Compiler Accesses the Application Compiler.

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

Using the Help menu


All ADE tools except the Data Dictionary contain the Help menu. Help menu options provide
access to online help information about the tool for which you are requesting help. Table 1–2
describes the menu that appears when you choose this option.

Table 1–2: Help menu

Menu option Description

Messages... Displays OpenEdge messages.

Recent Messages... Displays the most recent OpenEdge message and a detailed
description of the message.

Keyboard... Accesses information about your keyboard and keystrokes.

About Tool... Shows information about this installation of the Tool.

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:

• Starting the Procedure Editor

• Using edit buffers

• Working with procedures

• Editing text

• Compiling, running, and checking procedures

• Exiting the Procedure Editor

For details on the menu options and dialog boxes of the Procedure Editor, see Chapter 4,
“Procedure Editor Reference.”
OpenEdge Development: Basic Development Tools

Starting the Procedure Editor


There are four ways to start the Procedure Editor:

• From any of the other ADE tools, choose Tools→Procedure Editor.

• 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

Figure 2–1: Procedure Editor window

Table 2–1 describes the features of the Procedure Editor window.

Table 2–1: Procedure editor features

Feature Purpose

Menu bar Lets you access editor commands.

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.

Using edit buffers


An edit buffer is a work area where you write and edit a Progress procedure. The Procedure
Editor creates an edit buffer for each procedure you are working on, allowing you to open and
edit multiple procedures in a single session. The number of buffers is limited by system
memory.

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:

• 32,767*bytesPerLine, where bytesPerLine is the width of your terminal.

• Available system resources.

2–4
Procedure Editor Tasks

Listing open buffers


The Procedure Editor creates buffers when you use the New or Open option. To view a list of
the open buffers for your current session, choose Buffer→List. The open buffers are listed in
the Buffer List dialog box in the order that you opened them, as shown in Figure 2–2. For more
information on the Buffer List dialog box, see Chapter 4, “Procedure Editor Reference.”

Figure 2–2: Buffer List dialog box

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.

Displaying buffer information


To display information about the current buffer, choose Buffer→Information. OpenEdge
displays the Buffer Information dialog box, which contains the filename; read and write access
for the file; the number of lines, columns, and bytes; and the modified status of the buffer.
Choose OK to close the dialog box. See Chapter 4, “Procedure Editor Reference” for more
information on the Buffer Information dialog box.

2–5
OpenEdge Development: Basic Development Tools

Working with procedures


This section describes how to manipulate procedures in the Procedure Editor. It describes the
following tasks:

• Creating a new procedure.

• Opening a procedure.

• Saving a procedure.

• Printing a procedure.

• Closing a procedure.

Creating a new procedure


To create a new procedure, choose File→New from the menu bar. OpenEdge creates a new
buffer in the Procedure Editor and makes the new buffer the current buffer. The Procedure
Editor adds the new buffer to the buffer list, labels it “Untitled,” and gives it a number. To use
this new buffer to write a Progress procedure, enter code and choose the Save As option to name
and store the 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:

• 32,767*bytesPerLine, where bytesPerLine is the width of your terminal.

• Available system resources.

Saving a procedure
You can save the contents of the current buffer by:

• Saving a procedure to a new file.

• Saving a procedure to the current file.

Saving a procedure to a new file

To save a new, untitled procedure to a file:

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

2. Specify the file where you want to save the procedure.

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.

Saving a procedure to the current file

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.

• Cutting, copying, and pasting text.

• Searching for text.

• Inserting a file into a procedure.

• Inserting a field name into a procedure.

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.

Entering special characters

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.

Entering long text lines

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:

DISPLAY "This is a long message ~


continued on the next line".

The Progress Compiler interprets the lines in this example as the following single line:

DISPLAY "This is a long message continued on the next 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.

Cutting, copying, and pasting text


To cut or copy text in a procedure:

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

To paste previously copied text into a procedure:

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.

Searching for text


You can search for text in the current buffer using the following menu options:

• Finding text.

• Finding the next or previous occurrence of text.

• Replacing text.

Finding text

To search for text in the current buffer:

1. Choose Search→Find. OpenEdge displays the Find dialog box:

2. Enter the text string you want to find.

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.

Finding the next or previous occurrence of text

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

To search for and replace text in the current buffer:

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.

4. Specify if the search is case sensitive.

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.

Inserting a file into a procedure


To insert the entire contents of a file into the text in the current buffer:

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.

3. Choose the file you want to insert, then choose OK.

The Procedure Editor inserts the file contents into the current buffer at the cursor position.

2–13
OpenEdge Development: Basic Development Tools

Inserting a field name into a procedure


To insert a field name into a procedure in the current buffer:

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:

3. Choose the fields you want to insert.

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

Compiling, running, and checking procedures


The Procedure Editor supports the full edit-compile-run cycle. This support includes:

• Checking a procedure’s syntax.

• Compiling and running a procedure.

• Debugging a procedure.

Checking a procedure’s syntax


To check a procedure’s syntax, choose Compile→Check Syntax from the menu bar. The
Procedure Editor checks the procedure’s syntax and displays all applicable messages in the
Compiler Messages dialog box.

Compiling and running a procedure


To compile and run a procedure in the current buffer, choose Compile→Run from the menu
bar. The Procedure Editor accesses the Progress Compiler, which compiles the procedure. If the
procedure does not compile, OpenEdge displays all applicable messages in the Compiler
Messages dialog box.

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.

Note: The Debugger requires a Motif environment.

Exiting the Procedure Editor


You can exit the Procedure Editor in two ways:

• Choose File→Exit.

• Type quit in an empty buffer, then choose Compile→Run or press GO.

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

To save any changed buffers:

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:

• ADE event (adecomm/_adeevnt.p)

• 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:

• Opening, closing, and saving files.

• Before and after a file is run, debugged, or checked for syntax.

• Startup and shutdown of the Procedure Editor.


OpenEdge Development: Basic Development Tools

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

ADE event (adecomm/_adeevnt.p)


You can modify adecomm/_adeevnt.p to intercept or filter various events that occur in an ADE
session. The Procedure Editor calls adecomm/_adeevnt.p when certain processing events occur.
Generally, these events are file oriented (for example, OPEN, SAVE, and CLOSE), but they can be
more general (for example, STARTUP and SHUTDOWN).

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

The name of an event: NEW, OPEN, BEFORE-OPEN, CLOSE, BEFORE-CLOSE, SAVE,


BEFORE-SAVE, COMPILE, BEFORE-COMPILE, RUN, BEFORE-RUN, DEBUG, BEFORE-DEBUG,
CHECK-SYNTAX, BEFORE-CHECK-SYNTAX, CHECK-SYNTAX-PARTIAL, and
BEFORE-CHECK-SYNTAX-PARTIAL.

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.

Table 3–1: File-specific events (1 of 2)

Event Operation

BEFORE-CHECK-SYNTAX Called before a Check Syntax. Returning p_ok as FALSE


cancels the operation.

BEFORE-CHECK-SYNTAX-PARTIAL Called before a Partial Check Syntax. Returning p_ok as


FALSE cancels the operation.

BEFORE-CLOSE Called before a file is to be closed. Returning p_ok as


FALSE cancels the operation.

3–4
Procedure Editor Integration Hooks

Table 3–1: File-specific events (2 of 2)

Event Operation

BEFORE-COMPILE Called before a file is to be compiled. Returning p_ok as


FALSE cancels the operation.

BEFORE-DEBUG Same as BEFORE-RUN, except DEBUG is chosen.

BEFORE-OPEN Called before a file is to be opened. Returning p_ok as


FALSE cancels the operation.

BEFORE-RUN Called before a file is written to disk for a run. Returning


p_ok as FALSE cancels the operation.

BEFORE-SAVE FALSE before a file is to be saved. Returning p_ok as


FALSE cancels the operation.

CHECK-SYNTAX Called after a Check Syntax.

CHECK-SYNTAX-PARTIAL Called after a Partial Check Syntax.

CLOSE Called after a window or buffer is closed.

COMPILE Called after a file is compiled.

DEBUG Same as RUN, except DEBUG was chosen. Returning p_ok


as FALSE cancels the operation.

NEW Called after a new window/dialog box is created.

OPEN Called after a file is opened.

RUN Called after RUN of file ends.

SAVE Called after a file is saved.

Some events—for example NEW—cannot be cancelled even if returning FALSE.

3–5
OpenEdge Development: Basic Development Tools

STARTUP and SHUTDOWN events


The following Procedure Editor events (corresponding to p_event) occur at Procedure Editor
startup and shutdown:

• 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)

The Procedure Editor STARTUP and SHUTDOWN events cannot be cancelled.

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.

• BEFORE-RUN, RUN, BEFORE-DEBUG, DEBUG, BEFORE-CHECK-SYNTAX, and CHECK-SYNTAX —


These all use the last specified filename as p_other. The actual file being run or checked
is a temporary file with a name like p01928384.ped. This name is not used.

• 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.

The scenario shown in Table 3–2 applies to the Procedure Editor.

3–6
Procedure Editor Integration Hooks

Table 3–2: Usage scenario for the Procedure Editor

Action p_event p_context p_other Comments

Creating, saving, and running the file

File→New NEW 56788 ? Filename unknown.

File→Save BEFORE-SAVE 56788 c:\9\window-1.w –

SAVE 56788 c:\9\window-1.w –

Running the file BEFORE-RUN 56788 c:\9\window-1.w Run uses last filename.

RUN 56788 c:\9\window-1.w –

File→Save As BEFORE-SAVE 56788 c:\9\my-file.w Same context, new name.

SAVE 56788 c:\9\my-file.w –

Closing the file with modifications

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.

SAVE 56788 c:\9\my-file.w –

Procedure Editor BEFORE-CLOSE 56788 c:\9\my-file.w –


closes the file
CLOSE 56788 c:\9\my-file.w –

Opening the file

File→Open BEFORE-OPEN ? c:\9\my-file.w Occurs after the Open dialog box.


Before-open can be cancelled.

OPEN 46647 c:\9\my-file.w Observe the new context number.

Closing the file without modifications

File→Close BEFORE-CLOSE 46647 c:\9\my-file.w –

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.

This chapter contains the following sections:

• Procedure Editor menu bar

• 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

Procedure Editor menu bar


The following sections describe the menus and options available from the Procedure Editor.
Figure 4–1 shows the Procedure Editor menu bar. To access the menu bar, press F3.

Figure 4–1: Procedure Editor menu bar

Table 4–1 describes the Procedure Editor menus.

Table 4–1: Procedure Editor menus

Menu Description

File Manages files and exits the Procedure Editor.

Edit Manipulates and edits blocks of code.

Search Searches for and replaces code strings in the current buffer.

Buffer Manages buffers, including switching the current buffer and displaying buffer
information.

Compile Runs and compiles Progress procedure files.

Tools Accesses other Progress tools.

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.

Table 4–2: File menu

Menu option Description

New Creates a new file or procedure.

Open... Opens an existing file or procedure to edit.

Close Closes the current buffer.

Save Saves the contents of the current buffer.

Save As... Saves the contents of the current buffer to a file.

Print Prints the contents of the current buffer.

Exit Ends your current Procedure Editor session.

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:

• 32,767*bytesPerLine, where bytesPerLine is the width of your terminal.

• Available system resources.

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.

Figure 4–2: Open dialog box

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.

Figure 4–3: Files dialog box

4–4
Procedure Editor Reference

Table 4–3 describes the user-interface elements of the Files dialog box.

Table 4–3: Files dialog box elements

User-interface element Purpose

File Name Specifies the name of the file you want to open.

Files Lists the files in the currently selected directory.

Directories Shows the currently selected directory. The directory


selection list displays all the available directories.

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.

Figure 4–4: Close alert box

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.

Figure 4–5: Save As dialog box

The Procedure Editor cannot save a file with a comma in its name.

Table 4–4 describes the fields in the Save As dialog box.

Table 4–4: Save As dialog box fields

Field Use

File Name Specifies the name for the file you want to save.

Files Lists the files in the selected directory.

Directories Lists the directories in your file system.

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.

Figure 4–6: Save Buffers with Changes dialog box

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.

Table 4–5: Edit menu (1 of 2)

Menu option Description

Cut Removes selected text from the current buffer and stores it on the system
clipboard.

Copy Copies selected text onto the system clipboard.

4–7
OpenEdge Development: Basic Development Tools

Table 4–5: Edit menu (2 of 2)

Menu option Description

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.

Figure 4–7: Insert File dialog box

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.

Figure 4–8: Field Selector dialog box

4–9
OpenEdge Development: Basic Development Tools

Table 4–6 describes the user-interface elements of the Field Selector dialog box.

Table 4–6: Field Selector dialog box elements

User-interface element Purpose

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.

Table 4–7: Search menu

Menu option Description

Find... Searches for specific text.

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.

Replace... Searches for and changes specified text.

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.

Figure 4–9: Find dialog box

Table 4–8 describes the fields in the Find dialog box.

Table 4–8: Find dialog box fields

Field Purpose

Find What Identifies the text to search for.

Match Case Specifies whether the search is case sensitive.

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.

Direction Specifies whether to search forward or backward through the current


buffer. Choose the appropriate radio button to indicate the search
direction.

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.

Figure 4–10: Replace dialog box

Table 4–9 describes the user-interface elements of the Replace dialog box.

Table 4–9: Replace dialog box elements

User-interface element Purpose

Find What Identifies the text to search for.

Replace With Specifies the new text you want to insert

Match Case Specifies whether the search is case sensitive.

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.

Figure 4–11: Goto Line dialog box

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.

Table 4–10: Buffer menu

Menu option Description

List... Lists the open buffers.

Next Buffer Displays the next open buffer.

Previous Buffer Displays the previous open buffer.

Information... Views information about the current buffer.

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.

Figure 4–12: Buffer List dialog box

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.

Figure 4–13: Buffer Information dialog box

Table 4–11 describes the user-interface elements of the Buffer Information dialog box.

Table 4–11: Buffer Information dialog box elements

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.

Bytes Shows the size of the buffer in bytes.

Modified Indicates whether the buffer has unsaved changes.

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.

Table 4–12: Compile menu

Menu option Description

Run Compiles and runs the procedure in the current buffer.

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.

Figure 4–14: Example procedure output to screen

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.

Figure 4–15: 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.

This chapter contains the following sections:

• Starting the Application Compiler

• Using the files/directories selection list

• Using the toggle boxes

• Using the action buttons

• Using the menu bar

• Compiling source files


OpenEdge Development: Basic Development Tools

Starting the Application Compiler


Choose Tools→Application Compiler from the menu bar of any other OpenEdge tool to start
the Application Compiler.

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

Figure 5–1: Application Compiler window

You use the Application Compiler window to select options and define settings for your
compilation.

Using the files/directories selection list


The files/directories selection list displays the files or directories you want to compile. The
default list contains only a period (.) indicating the OpenEdge working directory. You can
modify the file and directory specifications using the action buttons.

5–2
Application Compiler

Using the toggle boxes


The toggle boxes let you specify criteria for compiling your procedures. The following list
describes the toggle boxes and how selecting them affects your compilation:

• 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

Action R-code file Compiler

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.

Exists Displays the error message Compile aborted.


SAVE not specified and .r file exists. The
message informs you there already is a valid
r-code file, and the source file is not compiled
unless you specify Save New .r Files or
Remove Old .r Files.

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.

Exists Compiles the source file and, on UNIX and


Windows, the new r-code file replaces the
existing r-code file. If errors occur during
compilation, no r-code file is created, and the
existing r-code file remains unchanged.

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.

Using the action buttons


The action buttons let you modify the file and directory selection list and compile your files.
Table 5–2 describes the action buttons in the Application Compiler window.

Table 5–2: Compiler action buttons (1 of 2)

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

Table 5–2: Compiler action buttons (2 of 2)

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.

Figure 5–2: File Specification dialog box

Table 5–3 describes the user-interface elements of the File Specification dialog box.

Table 5–3: File Specification dialog box elements

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

Using the menu bar


The following sections describe the pull-down menus and options available on the menu bar in
the Application Compiler. Table 5–4 describes the menu bar options.

Table 5–4: Application Compiler menu

Menu Description

File Exits the Application Compiler.

Compile Compiles Progress source files.

Tools Accesses other Progress tools.

Options Accesses Compiler options and lets you save your Compiler settings.

Help Accesses the Progress Help system.

File menu
The File menu lets you exit the Application Compiler. Table 5–5 describes the menu that
appears when you choose this option.

Table 5–5: File menu

Menu option Description

Exit Ends your current Application Compiler session.

Compile menu
The Compile menu lets you compile Progress source files. Table 5–6 shows the Compile menu.

Table 5–6: Compile menu

Menu option Description

Start Compile Compiles source files.

5–6
Application Compiler

Compile→Start Compile

When you select this option, the Compiler Results dialog box shown in Figure 5–3 appears.

Figure 5–3: Compiler Results dialog box

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

Table 5–7: Options menu

Menu option Description

Compiler... Supplies more information about the source files to be compiled.

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.

Figure 5–4: Compiler Options dialog box

Table 5–8 describes the fields in the Compiler Options dialog box.

Table 5–8: Compiler Options dialog box fields (1 of 3)

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

Table 5–8: Compiler Options dialog box fields (2 of 3)

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.

Append Specifies to append the current listing of the compilation to an existing


(Listing listing file. If you do not select this option, the Application Compiler creates
File) a new listing file that replaces any file of the same name.

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

Table 5–8: Compiler Options dialog box fields (3 of 3)

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.

Compiling source files


To compile source files with the Application Compiler:

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.

2. Specify the compilation criteria using the toggle boxes.

3. Choose Options→Compiler.

4. Specify any additional configuration information in the fields.

5. Choose Compile→Start Compile or press F1 to compile the source files.

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

You might also like