Release 10.1A: OpenEdge Development:
ADM Reference

> ## Position native data type table

> The Position Native data type table (table type 1), contains a record for each parameter with a sequence number that matches the ordinal position of the parameter in the call. The value of the parameter is stored in one of the value fields in the native data type of the parameter.

> Figure A–1 shows the definition of the native position data type table.

>     DEFINE TEMP-TABLE ttCallParam NO-UNDO
>         FIELD iParamNo       AS INTEGER
>         FIELD cParamName     AS CHARACTER
>         FIELD cDataType      AS CHARACTER
>         FIELD cIOMode        AS CHARACTER
>         FIELD cCharacter     AS CHARACTER
>         FIELD tDate          AS DATE
>         FIELD lLogical       AS LOGICAL
>         FIELD iInteger       AS INTEGER
>         FIELD dDecimal       AS DECIMAL
>         FIELD aRaw           AS RAW
>         FIELD hHandle        AS HANDLE
>         FIELD rRowid         AS ROWID
>         INDEX pudx IS UNIQUE PRIMARY
>           iParamNo.

> Figure A–1: Position native data type table definition

> In Example A–7, the following parameters are added to the`ttCallParam temp-table`:

> - A character input parameter with a value of `aaa`.

> - An integer input-output parameter with a value of 12.

> - A handle output parameter.

> Example A–7: Parameters stored in a position native data type table
>     /* Include the temp-table definition */
>     {src/adm2/calltables.i
>      &PARAM-TABLE-TYPE = "1"}
>     /* Create the parameter values into the parameter value table */
>       CREATE ttCallParam.
>       ASSIGN
>         ttCallParam.iParamNo   = 1
>         ttCallParam.cDataType  = "CHARACTER"
>         ttCallParam.cIOMode    = "INPUT"
>         ttCallParam.cCharacter = "aaa"
>       .
>       CREATE ttCallParam.
>       ASSIGN
>         ttCallParam.iParamNo   = 2
>         ttCallParam.cDataType  = "INTEGER"
>         ttCallParam.cIOMode    = "INPUT-OUTPUT"
>         ttCallParam.iInteger   = 12
>       .
>       CREATE ttCallParam.
>       ASSIGN
>         ttCallParam.iParamNo   = 3
>         ttCallParam.cDataType  = "HANDLE"
>         ttCallParam.cIOMode    = "OUTPUT"
>         ttCallParam.hHandle    = ?
>       .

> The parameter number specified in `iParamNo` indicates the order in which the parameters are specified. As a result, a `RUN` statement using these parameters would look something like the code in Example A–8. Note the order in which the parameters appear.

> Example A–8: Parameters specified in iParamNo
>     DEFINE VARIABLE iVal    AS INTEGER NO-UNDO.
>       DEFINE VARIABLE hHandle AS HANDLE NO-UNDO.
>       iVal = 12.
>       hHandle = ?.
>     RUN x.p (INPUT "aaa", INPUT-OUTPUT iVal, OUTPUT hHandle).

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