Try OpenEdge Now
skip to main content
Guide for New Developers
Creating your first ABL application : Creating an ABL Procedure file for the Server
 

Creating an ABL Procedure file for the Server

This topic shows you how to create an ABL Procedure file using the New ABL Procedure wizard. This procedure file will contain the business logic for the application.
1. Select File > New > ABL Procedure from the main menu.
2. The Container field specifies the currently open project or a folder within the project where the procedure file is to be created. Browse to the \CustomerReport\AppServer project, if not already selected.
3. Enter the name of the procedure file as Server. The .p extension is appended automatically.
4. Click Finish.
5. In the Procedure file that opens in the Editor, copy and paste the following code in the file.
DEF INPUT PARAM customerNumber AS INT64.
DEF OUTPUT PARAM customerName AS CHARACTER.

IF CONNECTED("sports2000") THEN DO:
FIND FIRST customer WHERE custNum = customerNumber NO-LOCK NO-ERROR.
IF AVAILABLE customer THEN
customerName = Name.
ELSE
customerName = "No record".
END.

OUTPUT CLOSE.
6. Save the changes. Right-click anywhere in the edit pane and select Check Syntax. You see a message that says "Syntax Checked: OK".
7. Click OK to close message.