Invoking an Adabas Stored Procedure

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.


Top of page

x
Syntax: How to Invoke an Adabas Stored Procedure Using TABLE

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:

synonym

Is the synonym of the Adabas stored procedure you want to invoke.

parameter

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.

IF/WHERE

Is used if you want to pass values to input parameters.

in-parameter

Is the name of an input parameter to which you want to pass a value.

value

Is the value you are passing to an input parameter.


Top of page

x
Syntax: How to Invoke an Adabas Stored Procedure Using SELECT

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:

synonym

Is the synonym of the Adabas stored procedure you want to invoke.

parameter

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.

WHERE

Is used if you want to pass values to input parameters.

You must specify the value of each parameter on a separate line.

in-parameter

Is the name of an input parameter to which you want to pass a value.

value

Is the value you are passing to an input parameter.


Top of page

x
Syntax: How to Invoke an Adabas Stored Procedure Using EX
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:

app_name_space

Is the apps directory name under which the synonyms are stored. This value is optional.

synonym

Is the user friendly name of a repository entry that represents the object to be executed in the vendor environment.

parm_name

Is the name of the parameter taken from the input metadata description.

1=parm1_val
N=parmN_val
parm1_name
parm1_val
parmN_val

Are the parameter values that match the input metadata description.

Note:



Example: Invoking the SAMP_LEM Adabas Stored Procedure

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