10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ProceduresOpenROAD lets you create three types of procedures:4GL proceduresGlobal 4GL procedures are created in the OpenROAD Workbench. Local4GL procedures are declared and defined in the frame, field, or procedurescript in which they are called. For the procedure statement syntax to writea 4GL procedure, see the Language Reference <strong>Guide</strong> online help.Database proceduresDatabase procedures are created and maintained independently ofOpenROAD, but must be registered with specific applications. They areavailable outside of OpenROAD applications.3GL procedures3GL procedures are created and maintained independently of OpenROAD,but must be registered with specific applications.How You Can Create Procedures in OpenROADCreating a global procedure in OpenROAD is a two-step process:1. Declare the procedure in OpenROAD with the Procedure Editor. At thisstage, you give the procedure a name and declare the return value type.For instructions about this process, see the User <strong>Guide</strong>.2. Write the body of the procedure directly in the Script Editor using theprocedure statement.Creating a local 4GL procedure in OpenROAD is also a two-step process:1. Declare the procedure directly in the frame, field, or procedure script.2. Write the body of the procedure using the procedure statement.You register and create database procedures or 3GL procedures using theappropriate Procedure Editor in OpenROAD Workbench. You write 3GLprocedures as you would any 3GL program. After you create and compile thesource code for a 3GL procedure, you create a dynamic-link library to link theprocedure into the application.To call a procedure, you can use the callproc statement. There are slightlydifferent versions of the callproc statement for each type of procedure. Calling4GL and database procedures is described in subsections of this chapter.For more information about creating, calling, and linking 3GL procedures, seeUsing 3GL in Your Application (see page 295).Writing Scripts and Procedures 75

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!