3 7 Command

LANSA Integrator

3.7 Command

The primary means of communicating with a JSM service is by sending a command string.

The command string consists of a command name and zero or more keywords.

 

COMMAND KEYWORD1( VALUE ) KEYWORD2( VALUE )

 

The command string is parsed by the JSM service.

  • Command name is converted to uppercase
  • Keywords are converted to uppercase
  • Keyword values keep the same case
  • Keyword values have leading and trailing blanks removed
  • Keywords with a blank value are ignored

 

Special handling of keyword values is possible by using double quotes.

If a value requires leading and or trailing blanks to be preserved then double quote the value.

Any value that starts and ends with double quotes will have the double quotes removed.

Double quote the keyword value to protect open and close brackets within the keyword value.

If the value also contains double quotes and the entire string is double quoted then escape the double quote with a backslash.

 

Keyword Value

Parsed Value

 

KEYWORD (     )

null

keyword is ignored

KEYWORD ( "" )

 

empty

KEYWORD ( "    " )

 

spaces

KEYWORD ( abc )

abc

 

KEYWORD ( "abc" )

abc

 

KEYWORD ( "  abc" )

  abc

 

KEYWORD ( ab"c )

ab"c

 

KEYWORD ( "ab\"c" )

ab"c

 

KEYWORD ( "a(b)c" )

a(b)c

 

KEYWORD ( "a(\"b\")c" )

a("b")c

 

 

 

 

When a command string is printed out in the SERVICE.TXT or TRANSPORT.TXT trace files, the keyword password values are hidden by five stars (*****).

Any command keyword named PASSWORD or ending with the string PASSWORD will have the keyword value hidden.

Any command keyword named MASTER will have the keyword value hidden.

The following command keywords will have their password component hidden.

  • SIGNER ( name:password )
  • KEYSTORE ( name:password )
  • RECEIVER ( name:password )
  • RECIPIENT ( name:password )

 

To view passwords in the trace files, add the trace.passwords=*yes property to the manager.properties file.

To view field information sent with the command, add the trace.fields=*yes property to the manager.properties file.

 

Each JSM client has different command capabilities.

RDML command

3.1.2 JSM_COMMAND

RDMLX command

3.2.3 JSMX_COMMAND

ILE RPGX command

3.4.5 JSMX_COMMAND

 

 

If a JSMDirect function needs to access multiple services within the same program, then it is recommended to use multiple JSM connections.

It is possible for a single JSM connection to use multiple services sequentially by unloading and loading another service.

 

JSM OPEN

 

 

 

SERVICE_LOAD SERVICE(servicename1)

Load specified service program

 

User-defined commands

 

 

SERVICE_UNLOAD

Unload service

 

 

 

 

SERVICE_LOAD SERVICE(servicename2)

Load specified service program

 

User-defined commands

 

 

SERVICE_UNLOAD

Unload service (optional)

JSM CLOSE

 

 

 

 

The JSMStorage object is persistent between JSM OPEN and JSM CLOSE, so servicename1 can put an object into the JSMStorage object and servicename2 can get this saved object. Alternatively, you may write information to a file that can be shared between services.