skip to main content
OpenEdge Development: ADM Reference
Progress Dynamics Call Wrapper : Temp-table include files
 
Temp-table include files
The include files contain definitions for temp-tables that you can use to provide call parameters. The following sections provide information about these include files:
*calltables.i
*callttparam.i
calltables.i
The calltables.i include file located in the src/adm2/ directory contains the definition of four temp-tables that provide call parameters to the setupTTFrom functions. The following list, presented in order of efficiency, shows how tables provide call parameters to the setupTTFrom functions:
1. Parameters stored by parameter position where the value is in the native data type
2. Parameters stored by parameter position where the value is stored in a character field
3. Parameters stored by parameter name where the value is stored in the native data type
4. Parameters stored by parameter name where the value is stored in a character field
When storing parameters by position, the parameters are added to the temp-table in the order in which they are specified. You must specify all parameters. This form of the temp-table requires that the Parameter Holder temp-table structure be built using setupTTFromTable.
When storing parameters by name, the parameter name specified must match the name of the parameter as it is retrieved from a GET-SIGNATURE call on the internal entry being invoked. This temp-table format requires that the Parameter Holder temp-table structure be built using setupTTFromSig.
This include file takes the following optional parameters:
PARAM-TABLE-TYPE
Indicates the type of table to be used. Defaults to 1.
PARAM-TABLE-NAME
A name to apply to the temp-table. Defaults to ttCallParam.
For more information about temp-table types, see the “Temp-table types” section.
callttparam.i
Although most AppServer calls require that no more than two or three temp-tables be passed between the AppServer and the client, some calls might require a larger number of temp-tables. For example, the Progress Dynamics Repository Manger FetchObject call or a call to a SmartBusinessObject can require 20 or more temp-tables. In this instance, the callttparam.i include file provides an easy way to include the temp-table handles required by callstringtt.p. For more information, see the “callstringtt.p” section and the “calltables.i” section.
Before using the callttparam.i file, you must define an array of handles. The following describes the parameters supplied in the calttparam.i file:
ARRAYFIELD
Required parameter that names an extent 64 variable of data type handle.
MODE
Optional parameter. One of INPUT, OUTPUT, or INPUT-OUTPUT. The default is INPUT-OUTPUT. The MODE applies to all 64 parameters. You cannot override the mode for individual parameters.
T01 to T64
Optional parameter. An include file parameter that evaluates to a valid ABL expression that follows the MODE. If not specified, the default is
“TABLE-HANDLE {&ARRAYFIELD}[subscript]”. This form lets you specify each table differently. For example, &T01 = “TABLEttCustomer”, &T02 - “TABLE-HANDLEhTTOrder”.
In Example A–6, the temp-tables ttCust, ttOrder, and a dynamic temp-table with the handle httTest are being passed and the remaining 61 are empty. The three temp-tables being passed are passed differently. Note the following in the example code:
*An array (hTT) of 64 handles is defined and used with the include file. The array is reset so that all elements are the unknown value. This is done so that when no temp-table is provided, nothing is sent.
*In the lines of code after the array is cleared, table 2 and table 3 are set to the value of the handles for the ttOrder and httTest temp-tables.
*In the call that uses the include file, the array variable is specified as the variable for the &ARRAYFIELD include parameter.
*The code automatically passes the array field with the other two temp-tables. The &T01 parameter passes the ttCust temp-table using a TABLE rather that a TABLE-HANDLE parameter. Therefore, the only include parameter is &T01.
 
Example A–6: Using the callttparam.i include file 
DEFINE VARIABLE hTT AS HANDLE  NO-UNDO EXTENT 64.
DEFINE VARIABLE ix  AS INTEGER NO-UNDO.
 
. . . 
/* Pre-fill array with the Unknown Value (?). */
DO ix = 1 TO 64:
  hTT[ix] = ?.
END.
 
/* Table 2 must be the Order temp-table and table 3 is the test table */
hTT[2] = TEMP-TABLE ttOrder:HANDLE. /* handle to Order temp-table */
hTT[3] = httTest.                   /* handle to test temp-table */
 
RUN adm2/callstringtt.p
  ("obtainCustomerData",  /* call to make */
   "customerbl.p",        /* manager to use */
 
/* Map the parameters to the table handles */
   "INPUT HANDLE 'T:01', INPUT CHARACTER cSessionID, INPUT HANDLE 'B:02',
    INPUT HANDLE 'T:03'", /* parameter list */
   "",                    /* tables to skip */
 
/* Pass in all 64 table handles. 1 is the table structure. */
   {src/adm2/callttparam.i &ARRAYFIELD = "hTT" &T01 = "TABLE ttCust"}
  ).