skip to main content
OpenEdge Development: Basic Development Tools
Procedure Editor Tasks : Compiling, running, and checking procedures
 
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
Note: OpenEdge provides startup options that let you see compile-time alerts if the source code contains specified ABL statements, or that let you disable specified ABL keywords. For more information, see the “Startup parameters for Compiler behavior” section.
Checking a procedure’s syntax
To check a procedure’s syntax, choose CompileCheck 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 CompileRun from the menu bar. The Procedure Editor accesses the ABL 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 HelpMessages or HelpRecent Messages options.
If the 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 ABL 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.
When you run a procedure and have several open buffers, the 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 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 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 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 Compiler could not access the modified code.
Debugging a procedure
To debug a procedure, choose CompileDebug 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.