How to: |
To invoke an Adabas stored procedure, you issue a Data Manipulation Language (DML) request, also known as a TABLE command, or an SQL SELECT statement. (DML is Information Builders internal retrieval language.) For information about the Data Manipulation Language, see the Stored Procedure Reference manual.
The syntax for invoking an Adabas stored procedure using a TABLE command is
TABLE FILE synonym PRINT [parameter [parameter] ... | *] [IF in-parameter EQ value] . . . END
where:
Is the synonym of the Adabas stored procedure you want to invoke.
Is the name of a parameter whose values you want to display. You can specify input parameters, output parameters, or input and output parameters.
If the stored procedure does not require parameters, enter an * in the syntax. This displays a dummy segment, created during metadata generation, to satisfy the structure of the SELECT statement.
Indicates that you want to display all indicated parameters.
Is used if you want to pass values to input parameters.
Is the name of an input parameter to which you want to pass a value.
Is the value you are passing to an input parameter.
The syntax for invoking an Adabas stored procedure using a SELECT statement is
SQL SELECT [parameter [,parameter] ... | *] FROM synonym [WHERE in-parameter = value] . . . END
where:
Is the synonym of the Adabas stored procedure you want to invoke.
Is the name of a parameter whose values you want to display. You can specify input parameters, output parameters, or input and output parameters.
If the stored procedure does not require parameters, enter an * in the syntax. This displays a dummy segment, created during metadata generation, to satisfy the structure of the SELECT statement.
Indicates that you want to display all indicated parameters.
Is used if you want to pass values to input parameters.
You must specify the value of each parameter on a separate line.
Is the name of an input parameter to which you want to pass a value.
Is the value you are passing to an input parameter.
EX [app_name_space/]synonym 1=parm1_val,..., N=parmN_val
EX [app_name_space/]synonym parm1_name=parm1_val,... , parmN_name=parmN_val
EX [app_name_space/]synonym [, parm1_val [,...[, parmN_val]]]
where:
Is the apps directory name under which the synonyms are stored. This value is optional.
Is the user friendly name of a repository entry that represents the object to be executed in the vendor environment.
Is the name of the parameter taken from the input metadata description.
Are the parameter values that match the input metadata description.
Note:
The following TABLE command invokes the SAMP_LEM Adabas stored procedure, passing three parameter values to it.
TABLE FILE SAMP_LEM PRINT #REF_RC SEG4.#FCHAR IF #REF_NAME EQ '12345678' IF #REF_COUNT EQ 123 IF #RESET_PARM EQ 'RESET' END
The following SELECT command invokes the SAMP_LEM Adabas stored procedure:
SQL SELECT #REF_RC SEG4.#FCHAR FROM SAMP_LEM WHERE #REF_COUNT = 123 END
The following EX commands invoke the SAMP_LEM Adabas stored procedure:
EX SAMP_LEM 225,2004 EX SAMP_LEM AM=225,YEAR=2004 EX SAMP_LEM 1=225,2=2004
iWay Software |