Release 10.1A: OpenEdge Development:
ADM Reference

> ## 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 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 4GL 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-tabl`e 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 i   AS INTEGER          NO-UNDO.
>     DEFINE VARIABLE hTT AS HANDLE EXTENT 64 NO-UNDO.
>     /* some code */
>     /* make sure array has unknowns for all handles. */
>     DO i = 1 TO 64:
>       hTT[i] = ?.
>     END.
>     /* Table 2 must be the Order temp-table and table 3 is the test table */
>     hTT[02] = TEMP-TABLE ttOrder:HANDLE. /* Handle Order temp-table */
>     hTT[03] = httTest. /* Handle to temp-table test */
>     RUN adm2/callstringtt.p
>       ("obtainCustomerData",  /* call to make */
>        "customerbl.p",        /* manager to use */
>     /* Now 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" }
>        ).

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095