3 3 2 JSMCMD JSMCMDX

LANSA Integrator

3.3.2 JSMCMD & JSMCMDX

The JSMCMD or JSMCMDX are used to load and unload services and to execute commands supported by the service. The JSMCMD or JSMCMDX can only be executed once a JSMOPEN has completed successfully.

JSMCMDX is only available to ILE clients and allows the contents of a variable to be sent with the command string. The service programmer accesses a copy of this variable byte array (sent by JSMCMDX) by using the JSMCMD getByteArray() method.

Example

 

   byte[] clientData = command.getByteArray() ;

 

Two API's are used to retrieve a byte array returned by the JSM service. Depending on the service, this array may also contain fields or working lists. JSMBYTELNGTH places the length of the last returned byte array into byte length parameter. JSMBYTERECV copies the contents of the byte array into the variable parameter.

Note that the byte array parameter must be big enough to hold the received bytes.

 

C

CALLB

'JSMBYTERECV'

C

PARM

Details

 

 

 

 

The command string sent by the JSMCMDX API is converted from the client encoding to Unicode.

The byte array is not converted and is passed to the service unprocessed.

To send single or multiple occurrence data structures using RPG, refer to 3.3.6 RPG Data Structure.

A service is loaded before commands to the service are executed. A service is unloaded once you are finished using it. Only one service can be loaded at a time. Refer to 3.7 Command.

The JSMCMDX or JSMCMDX API has a number of:

3.3.4 RPG Reserved Commands

3.3.5 RPG Reserved Keywords

For command services details, refer to Java Service Manager Services.