10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 10: Using 3GL in Your ApplicationThis section contains the following topics:How You Can Call 3GL Procedures (see page 295)How You Can Use Exec 4GL Statements in 3GL Procedures (see page 298)How You Can Use Exec SQL Statements in 3GL Procedures (see page 305)How You Can Preprocess Exec 4GL and Exec SQL Statements (see page 305)How You Can Link 3GL Procedures (see page 306)Technical Tips (see page 306)Sample 3GL Procedures (see page 307)Most of your application development needs can be met by coding inOpenROAD 4GL. However, there are occasions when you want to makeprocedure calls to 3GL or embedded SQL. The most common such occasionsinclude:• Improving performance of numerical calculations• Using existing 3GL codeNote: All the code examples described in this chapter assume that you areusing an Ingres DBMS.How You Can Call 3GL ProceduresThis section describes how to call 3GL procedures from an OpenROADapplication.Callproc StatementYou call a 3GL procedure from an OpenROAD script or 4GL procedure using thecallproc statement similarly to the way you call a 4GL procedure. The basicsyntax for calling a 3GL procedure is:[return_variable =] callproc procedurename;procedurenameSpecifies the name that you specified when you created the 3GL procedureand also used when you registered the 3GL procedure. Use this procedurename and create a component for the procedure in OpenROAD Workbench.This name does not refer to the name of the file in which the procedure isstored but to the procedure itself.For more information about creating components for 3GL procedures inOpenROAD Workbench, see the User <strong>Guide</strong>.Using 3GL in Your Application 295

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

Saved successfully!

Ooh no, something went wrong!