Summary

LANSA Integrator

Summary

INT002 - Getting Started with Basic JSM Operations

Important Observations

  • You can Load as many services as you wish in one function. You can also load more than one service in memory at the same time, as long as you use a different handle field.
  • The action to take when a JSM error occurs depends heavily on the functionality of the application. Essentially, you should apply the same error handling methodology as the one you normally apply when writing any type of application. Usually you might decide to abort processing when the JSM error is unrecoverable. When user input is likely to have caused the error you should probably route the error back to the User Interface program.
  • RDMLX functions cannot use the DISPLAY command and therefore cannot be used to display in a windows form or IBM i green screen. In these cases, a wrapper RDMLX function needs to be created in order to handle the display of information.

Tips & Techniques

  • Use the template JSMXSKEL to create a function with the basic RDMLX code required by a function using the JSM. Once you become familiar with JSMXSKEL, you might copy and modify the template to suit your own specific needs.
  • In the JSMXSKEL template code, the CHECK_STS subroutine simply formats the error message. It does not ABORT the function when an error occurs. You must write your own code for processing the error. You may wish to end the function, or you may want to return to an input screen to allow the user to correct an input value.
  • Always write the code for closing JSM. If you use the JSMXSKEL template, this code is added for you.
  • Except for HTTP server functions, always write the code for unloading JSM. If you use the JSMXSKEL template, this code is added for you.

What I Should Know

  • How to use the template JSMXSKEL to create the basic RDMLX code skeleton required by a function using JSM.
  • How to use the JSM Built-In Functions to control the JSM.
  • How to Open and Close JSM.
  • How to Load and Unload a Service.
  • How to handle JSM errors by modifying the check status subroutine.