3.1.2 JSMX_OPEN

The JSMX_OPEN API is used to open a new connection from the client application to the Java Service Manager. The client may have more than one (up to 100) connections open simultaneously by making multiple calls to JSMX_OPEN.

Parameters

Number

Symbolic Name

Description

1

JSMHDL

Output, character 4.

The JSMX_OPEN call returns the connection handle it assigns to this connection. This handle is used on subsequent JSMX_COMMAND and other API calls to identify the connection to which the call applies.

2

JSMSRV

Input, character (variable, recommended 50).

Identifies the server to which the client application wishes to open a connection.

3

JSMSTS

Output, character (variable, recommended 20).

The JSM server returns the status of the operation in this field.  The client application can test this field to determine whether the operation succeeded. In most cases a status of 'OK' indicates successful completion.

4

JSMMSG

Output, character (variable, recommended 512).

The JSM server may return a message concerning the operation in this field - for example a completion message or an error message when the operation fails.

 

 The server argument is optional for the connection. If the server argument is not supplied, or if the argument value contains blanks, then the remote host and port number is obtained from the data area JSMCLTDTA on IBM i.

The server argument can have any of the following values:

host:port

Use specified host and port

host

Use host and get port from JSMCLTDTA

:port

Use port and get host from JSMCLTDTA

:

Get host and port from JSMCLTDTA

 

Get host and port from JSMCLTDTA

 

The JSMX_OPEN must be executed before the JSMX_COMMAND can be used.

The JSMX_OPEN Built-In Function performs a DNS lookup to resolve the host name address. Using a dotted decimal IP address does not get around this DNS lookup.

If the JSMX_OPEN Built-In Function is slow to open a connection then you could have a DNS lookup issue. Add an entry to the local host table to improve performance.

TCP/IP connection performance can be improved if the registered DNS servers are available and performing well.

Change TCP/IP Domain

Host name search priority           *LOCAL

Domain name server

Internet address                    139.130.4.4

                                    203.48.48.13

 

If the first Domain Name Server (DNS) in the list does not respond, the second DNS server in the list will be contacted. If the second DNS server does not respond, the third DNS server will be contacted.

See IBM i - Network Performance for further information.