The HTTP session detail is retained on the service-access variable. The lifespan of the session of the requester depends on where the variable is declared. For example, if the variable is declared in a function invocation, the session of the requester lasts as long as the function is in scope. If the variable is declared on a library, the session of the requester is retained until the library goes out of scope. If you are accessing an EGL stateful REST service, declare the variable in such a way that the variable does not go out of scope prematurely.
ExternalType GETREC type HostProgram {platformData=[@i5OSProgram{ programName="GETREC",
programType=NATIVE, isServiceProgram=false, libraryName="*LIBL"}]}
function GETREC(CUST CUSTa10, EOF char(1), COUNT decimal(2,0)){ hostName="GETREC"};
end
The hostName property is available for a function prototype and identifies the name of the program function. The default is the name of the function prototype.
The workbench converts the IBM i data types from the host source into a Program Call Markup Language (PCML) definition. The workbench then uses that definition to create the external type and records.
The PCML file is retained for two reasons. First, you can update the file for use as the input in subsequent runs of the wizard. For example, you might put together a PCML definition that corresponds to entry points in several programs. If you use that definition as an input file, the external type that is created by the wizard can reflect all the entry points. Second, IBM technical-support representatives can use the retained PCML file as a debugging tool, if necessary.
The following table lists the corresponding data types in IBM i structured records and EGL structured records.
| IBM i | Rules | EGL data type in the EGL external type | |
|---|---|---|---|
| char | charType = single byte | CHAR (PCML length) | |
| charType = double byte | UNICODE (PCML length) | ||
| int | 2 byte signed | precision != 16, length=2 | SMALLINT |
| 2 byte unsigned | precision = 16, length = 2 | INT | |
| 4 byte signed | precision != 32, length = 4 | BIGINT | |
| 4 byte unsigned | precision = 32, length = 4 | BIGINT | |
| 8 byte signed | length = 8 | BIGINT | |
| packed | DECIMAL (PCML length, PCML precision) | ||
| zone | NUM (PCML length, PCML precision) | ||
| float | length = 4 | SMALLFLOAT | |
| length = 8 | FLOAT | ||
| byte | HEX (PCML length * 2) | ||
You might need to update the workbench-created EGL record fields that correspond to IBM i types that are not supported by EGL or are not converted by PCML. Details about PCML are available in the online information center for IBM WebSphere Development Studio Client for iSeries®: http://publib.boulder.ibm.com/infocenter/iadthelp/v7r0/topic/com.ibm.etools.iseries.webtools.doc/topics/rdtcattr.html.
01 P1 PIC 9(5) USAGE BINARY.
01 P2.
02 P2A PIC X(5) OCCURS 1 to 10 TIMES
DEPENDING ON P1.
The following table lists the corresponding data types in structured and non-structured records. You might need to update the workbench-created non-structured record fields that are of type HEX or INTERVAL.
| Data Type in Structured Record | Data Type in Non-Structured Record |
|---|---|
| BOOLEAN | BOOLEAN |
| CHAR, DBCHAR, MBCHAR, STRING, UNICODE | STRING |
| HEX | HEX |
| DATE | DATE |
| TIME | TIME |
| TIMESTAMP | TIMESTAMP |
| INTERVAL | INTERVAL |
| DECIMAL, BIN(length), BIGINT, INT, MONEY, NUM, SMALLINT, SMALLFLOAT | Corresponding numeric types |
| BIN(length, decimalPlaces) where decimalPlaces > 0 | NUM(length, decimalPlaces) |
| NUMC(length, decimalPlaces) | NUM(length, decimalPlaces) |
| PACF(length, decimalPlaces) | NUM(length, decimalPlaces) |