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:
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