INT003 - Using the LANSA User Agent
- The Server program identifier in the configuration file is a logical value that JSM resolves to the server side process/function, partition and language by looking up the file [email protected]
- The SVMODE should be *NONE when the CSV file contains no column heading information. When the SVMODE is *NONE you have the option of using the SVHEAD keyword to specify the CSV file format in HTTPService.properties file. If you do not use an SVHEAD, the format of the working list to receive the data must match that of the CSV file.
- The SVMODE could be *USE or *IGNORE when the CSV file contains column heading information. For the mode *USE, the column headings in the CSV file must be LANSA field names and the format of the working list is not required to match that of the CSV file.
- For the mode *IGNORE, the column headings in the CSV file can be anything and the format of the working list must match that of the CSV file.
- It is possible to automate the user actions into a single .bat file that when run will start the LANSA User Agent, specify the configuration file, specify the data file to be processed, send, and specify the name of the local file to receive the response from the server.
- It is possible to configure the LANSA User agent to take Excel spreadsheets and other formats as data. These will be converted to CSV before being sent. No change is required to the Server side function to handle these formats.
Tips & Techniques
- The format of the CSV data determines the SVMODE used to RECEIVE the file on the server.
- If you are testing using a Windows Web server and JSM server install on your own PC, you can use a host address of host=http://localhost:80 when specifying the host=http://nnn.nnn.nnn.nnn:pp.
- The LANSA User Agent also supports the saving of data to an Excel spreadsheet.
What I Should Know
- How to use the User Agent to send and receive data to a function running on an IBM i.
- How to use the JSM commands SEND and RECEIVE in Server Side functions using the HTTP Client service
- When to use the different modes to receive the files on the Server side.