Registering Functions for JSMDirect

LANSA Integrator

Registering Functions for JSMDirect

On Windows and Linux, the JSMDirect program locates the LANSA function to be executed by performing a keyed lookup on file dc_w29.txt. On Windows, dc_w29.txt is by default stored in the same folder as jsmdirect.exe. On Linux, dc_w29.txt is in the $LANSAXROOT/integrator/jsmdirect directory.

The Host Name is the host component of the request URL this is determined by the HTTP protocol Host keyword.

If the URL is http://www.lansa.com/cgi-bin/jsmdirect then the Host Name is WWW.LANSA.COM:80.

If the URL is http://10.1.2.3/cgi-bin/jsmdirect then the Host Name is 10.1.2.3:80.

This allows multi-homing where the IP address of www.lansa.com and 10.1.2.3 are the same but the HTTP client program specifies the host name in the HTTP protocol allowing the HTTP server to treat www.lansa.com and 10.1.2.3 as different hosts.

A Host Name of *DEFAULT means any host.

JSMDirect first does a keyed lookup for on the Application Name and Host Name, if an entry does not exist then a second keyed lookup on Application Name and *DEFAULT is done.

To update the dc_w29.txt file use LANSA Integrator Studio or a text editor (Notepad for example).

The dc_w29.txt file is structured as a list of comma separated lines.

Lines starting with a # character are considered to be comments and are not processed.

The values are given by the token position on the line they correspond to the following dc_w29 layout:

1

K

Application Name

Name identifying the application to be executed. This is the name entered as part of the URL.

2

K

Host Name

Host Name specified either as *DEFAULT or HostName:Port.

3

 

Process

LANSA process.

4

 

Function

LANSA function to be executed.

5

 

Partition

LANSA partition. The process and function must be located in the specified partition.

6

 

Language

Execution language for the function.

7

 

Program

3GL program to be executed. If a 3Gl program is specified, then the process, function, partition and language fields should be blank.

 

 

Note: The language code is an optional value in the registration of functions in the IBM i DC@W29 but is a required one in dc_w29.txt on Windows and Linux. If you don't register the language code in the IBM i DC@W29, LANSA will run the server function using the partition's default language. If you don't register the language code in dc_w29.txt, JSMDirect will end with an error.

Example (without Program parameter):

 

#

# JSMDirect directive file

#

# Application Name, Host Name, Process, Function, Partition, Language, Program

#

ORDERENTRY,MYCOMPUTER:80,JSERVICE,JS015,WIZ,ENG

ORDERENTRY,*DEFAULT,JSERVICE,JS016,WIZ,ENG

#