3 4 ILE RPGX Client

LANSA Integrator

3.4 ILE RPGX Client

Seven API calls are required for an ILE RPG client to have complete interaction with the Java Service Manager services.

These APIs allow multiple connections within the same job.

3.4.1 JSMX_BEGIN

Initialize or re-initialize the service program internal state.

3.4.2 JSMX_OPEN

Open service.

3.4.3 JSMX_BINDFLD

Bind program fields to connection handle.

3.4.4 JSMX_BINDLST

Bind program list to connection handle.

3.4.5 JSMX_COMMAND

Send command.

3.4.6 JSMX_CLOSE

Close service.

3.4.7 JSMX_END

End and re-initialize the service program internal state.

 

The RPG developer only needs to understand how to use the commands offered by the JSM services.

The overall structure of the RPG programs will be the same.

The program will perform the following operations:

  • BEGIN using the API interface.
  • OPEN connection to the Java Service Manager.
  • Issue a COMMAND to LOAD the service.
  • Execute COMMANDs supported by the service.
  • Issue a COMMAND to UNLOAD the service
  • CLOSE connection to the Java Service Manager
  • END using the API interface.

On IBM i the ILE RPG client program needs to be bound to service program JSMRPGSRV and this service program needs to be shipped with the client program. The client program is also dependent on data area JSMCLTDTA and JSMMSGF message file.

Example source code and how to create a program are located in files QRPGLESRC and QCLSRC in the JSM library (as nominated during the LANSA Integrator install).

Most of the service program API character string parameters can be of any size, as the service program will determine the length of character input using IBM's CEEGSI API. The connection handle parameter is always character of length 4.

Overview of field and list exchange

Command

No fields

No list

Command + JSMX_BINDFLD

Fields

No list

Command + JSMX_BINDLST

No fields

List

Command + JSMX_BINDFLD + JSMX_BINDLST

Fields

List