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.

ProceduresTo use a database procedure in an OpenROAD application, create theprocedure using the Database Procedure Editor and then register it with theOpenROAD Workbench. For instructions about how to register a databaseprocedure, see the User <strong>Guide</strong>.For more information about calling database procedures in OpenROAD, seeCalling Procedures (see page 83).3GL ProceduresA 3GL procedure is a procedure written in a third-generation language, such asC, that you can call by name from a script or 4GL procedure. 3GL proceduresare used to perform operations that are outside the scope of OpenROAD butare available from a 3GL.You maintain and compile 3GL procedures outside of OpenROAD. For moreinformation about how to register 3GL procedures in an application, see theUser <strong>Guide</strong>.The following subsections describe how to declare parameters for 3GLprocedures. They also provide language-specific information about coding theprocedures. For more information about calling 3GL procedures, see Using 3GLin Your Application (see page 295).3GL ParametersOpenROAD lets you pass simple variables to a 3GL procedure. You can alsopass objects and arrays as described in the Language Reference <strong>Guide</strong> onlinehelp and in Using 3GL in Your Application (see page 295). When you passvalues to a 3GL procedure, the data type of the values must match the datatypes of the parameters receiving them in the procedure.The following table lists the 4GL simple data types and describes theircorresponding 3GL data type declarations:4GL DataTypeCharVarcharHost Variable DeclarationFixed-length, null-terminated character string. The size isdetermined by field size or declared variable length. Dataentered into the field is padded with blank characters upto its full declared length before being passed to the 3GLprocedure.Variable-length, null-terminated character string. Unlikechar type, varchar variables are not extended with blankcharacters before being passed to the 3GL procedure.80 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!