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.

ProceduresGlobal ProceduresA global 4GL procedure is a routine written in 4GL that you can call by namefrom a script or another procedure. The procedure is a component of anapplication and is stored in the application's database.Procedure StatementTo create a global 4GL procedure, use the OpenROAD Workbench to name theprocedure and declare its return value. You then write the actual procedurestatement in 4GL. The following section describes this statement. For moreinformation about creating 4GL procedures, see the User <strong>Guide</strong>.The procedure statement defines a 4GL procedure. This statement declares theparameters for the procedure and provides the actual processing statements.The syntax for a global 4GL procedure is:procedure procname [([parameterlist}])] =[declare[localvariablelist][localprocedureforwardreferences]enddeclare]]beginstatementlistend[;]{localprocedure[;]}procnameSpecifies the procedure name. You use this name when you call theprocedure in the application.parameterlistSpecifies parameters that are passed to the procedure. You can also use aparameter as a local variable within the procedure. A 4GL procedure canhave any number of parameters.A parameter can be any simple data type acceptable to OpenROAD or anynamed user class or system class. If a procedure has no parameters, theparentheses are optional.For more information about the declare block, see Initialize Statement (seepage 68).statementlistIncludes any OpenROAD statement76 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!