5 3 3 JSM from LANSA for Linux

Install LANSA on Linux

5.3.3 JSM from LANSA for Linux

In this scenario, you will use server-side LANSA functions on Linux to send commands to the JSM Server on the same machine. You can either use a LANSA client on IBM i or Windows to initiate the function, or run the functions in batch mode.

Before You Begin

Before you begin to test the JSM Server, check the following:

  • Have you installed the JSM Server on the Linux machine? (JSMDirect is not necessary.)
  • Have you installed the JSM Server licenses?
  • Have you installed LANSA on the Linux machine?
  • Do you know the IP address of the JSM Server on the Linux machine?
  • If you are planning to use a LANSA client on IBM i or Windows:
  • Have you installed LANSA on IBM i or Windows?
  • Is the LANSA listener running on Linux?

Step 1. Start JSM

Use the strjsm script to start a JSM instance. Note that it will print the process ID of the new instance script.

If the JSM Server does not start, or stops after a few seconds, refer to Troubleshooting in the Installing LANSA on Windows Guide.

Step 2. Execute Example Function

If you are using an IBM i or Windows client, execute the client portion of the function. The LANSA User should be the same as the username to be used on the Linux server.

The example functions will ask you for some parameters:

  • Server Name – the name of the Linux server. Refer to the LANSA Communications Setup Guide for details about setting up communications with other servers.
  • Password – the password to be used on the Linux server.
  • Arguments – the X_RUN arguments to be used when executing the server function. This should include database details as a minimum; for testing, it should also indicate what level of tracing to use. See below for example parameters.
    Be sure that tracing is ON, as you will need it in the next step, Check Tracing Files.

If you are executing the functions in batch mode, you need to call x_run from the Linux command line with the appropriate parameters. Here is an example command that calls function EXAMPL1 in process JSMTEST, using a database called MY_DB, as user LANSAUSER:

x_run PROC=JSMTEST FUNC=EXAMPL1 DBID=MY_DB DBII=MY_DB DBUT=ORACLE DBIT=ORACLE DBUS=SYSTEM PSWD=MANAGER PART=DEM LANG=ENG USER=LANSAUSER ITRO=Y ITRL=4

 

Refer to Override X_RUN arguments inherited from the Client in the Deploying LANSA Applications on Linux Guide for details.

Step 3. Check Trace Files

For functions run in batch mode, the best way to check whether they have run successfully is to check for new trace files. Trace files will be present if you left tracing on in the preceding step, Execute Example Function.

To find the trace files, locate the directory inside ${INTEGRATOR_ROOT}/integrator/instance/trace matching the JSM instance's process ID (refer to Step 1. Start JSM). If the function was executed successfully, this directory will contain a subdirectory called CLIENT00000001 (unless you have turned tracing off). If either directory does not exist, refer to Troubleshooting.