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 then the Host Name is WWW.LANSA.COM:80.

If the URL is then the Host Name is

This allows multi-homing where the IP address of and are the same but the HTTP client program specifies the host name in the HTTP protocol allowing the HTTP server to treat and 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:



Application Name

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



Host Name

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




LANSA process.




LANSA function to be executed.




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




Execution language for the function.




RPG program to be executed. If an RPG 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 [email protected] 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 [email protected], 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