Tutorials for Web Functions & WEBEVENTs

What are the Web Function Tutorials?

The LANSA Web Function Tutorials are a set of exercises designed to introduce and reinforce the fundamental skills required to build Web Function Applications with LANSA. The tutorials are integrated into the online documentation.

To install the tutorials, refer to Tutorial Installation.

The following tutorials are included:

WEB001 - Types of LANSA Web Functions

WEB002 - Coding a WEBEVENT Functions

WEB003 - IBM i Batch Debug

WEB004 - LANSA Generated HTML Pages

WEB005 - LANSA Process Pages

WEB006 - Graphic Variables

WEB007 - LANSA Tags

WEB008 - Web Components

WEB009 - Web Page Substitution (Optional - Advanced)

WEB010 - Web Skeletons (IBM i)


WEB012 - Dynamic Components

WEB013 - JavaScript and Browse Lists

WEB014 - Browse Lists

WEB015 - Data Apportionment

Who Should Use the Tutorials?

The Tutorials can be used by novice and experienced LANSA developers who wish to learn how to build Web function applications with LANSA.

In order to use the tutorials, you must be able to create LANSA processes and functions using templates. You should know how to edit RDML and how to create fields in the LANSA Repository.

Your Feedback

Your feedback regarding these tutorials will help us improve the overall quality of the LANSA documentation and training. Please email your comments to lansatraining@LANSA.com.au.

How Do I Use the Tutorials?

It is recommended that you complete the tutorials in sequence. The processes and functions created in the first tutorials are reused in later tutorials.

The first steps in an exercise provide very precise descriptions of the tasks to be performed. As the steps and tutorials progress, the instructions become much more general.

All the tutorials use HTML. Be sure to use HTML mode when you use the Web Function Editor.

The tutorials use the files from the Personnel Demonstration System.

What Partition Should I Use?  

It is recommended that you use the DEM partition for the tutorial. The DEM is automatically installed with a LANSA for IBM i system and is quickly set up using Partition Initialization on a Visual LANSA system. The DEM system contains the Personnel System demonstration system which contains the files used by the tutorial.

If you do not use the DEM partition, you can set up another partition with the Personnel System files. Remember, the partition must be properly Web-enabled.

If you do not use DEM, you can select any of your partitions when using the tutorials. Testing or training partitions are ideal. You will need to import the Personnel System demonstration files into the partition.

If you intend to set up another partition, it is recommended that you do NOT use WEB as the partition identifier as this a reserved space and any changes to this partition may affect other Web-enabled partitions in your system.

How Many Developers Can Use the Training?  

There is no limit on the number of developers who may use the training at the same time. However, it is important that developers have a unique identifier for their work.

In the tutorial, each developer will use an object prefix iii which can be based on his or her initials or could be assigned by a system coordinator. For example, you will be asked to create a process named iiiPROC01. If your initials are JDS, you would create a process named JDSPROC01.

This iii prefix must be unique in the LANSA system (not just the partition) as the iii prefix is used to create system variables. System variables are shared by all partitions.

Setup Checklist

Check that these tasks have been completed before using the tutorials. If not, go to the instructions following and complete them as applicable:

You will require this information about your specific installation:

Tutorial Installation

If you have not been able to answer "yes" the Setup Checklists question, you will need to carry out some or all of the following steps.

IBM i Installation Steps

1.Select the partition to be used for training. (You may wish to create a new partition.)

2.Use the PERSYS import on the LANSA IBM i Software CD-ROM to import the Personnel System application into the partition.

3. Web enable the partition. For details, refer to the Task: Set up IBM i Partition for Web Development in the LANSA on IBM i Administration Guide.

4. Use the LWEBWIZ2 import in the LANSA program library to import the Web Functions Wizard into the partition.

5.This step is optional.

     For the results as shown for Tutorial WEB013, ten graphic files are required. (These files will be supplied if you do the LANSA Web training in a classroom.)

     You can create your own files, preferably images sized 144 x 155 pixels (2.000 x 2.083 inches). Name the images emp1.jpg through to emp10.jpg and load them to the LANSA default directory /images on your Web Server. You should also specify the file names in the Business Phone field of accessible records in the PSLMST file.

     If these files are not in the /images directory, or not specified in the PSLMST file, it will not affect the objective of the exercise. Instead of an employee picture, you will simply see a box with an X, as no image is found.

Windows Installation Steps

If you have a DEM partition with the Personnel System files already installed in your Visual LANSA system, then you should be albe to skip this step.

Create a Partition

If you wish to create a brand new partition:

1.  Follow the instructions to create a new Partition in Create Partitions in the Visual LANSA User Guide.

2.  Initialize the new partition as described below.

Initialize a Partition

To prepare your new or existing partition for use with these Tutorials, you will need to web enable the partition and install the Personnel System files. To do this, complete the following steps:

1.  Close down LANSA Development Environment

2.  Restart LANSA Development Environment

3.  Reinitialize the partition using the Partition Init… button in the Visual LANSA Logon screen.


4.  In the Partition Initialization dialog select the Demonstration material option.


3.  Press OK and wait for the import to finish.

     For details, refer to the Partition Initialization options in the Visual LANSA Administration Guide.

If you are working with a slave LANSA system and the partition is not set up as required, contact your LANSA server administrator.