Step 2. Create a System Variable

In this step you will create a system variable which increments a number nn (2 digits) by one and returns it as an alphanumeric value.

To create this system variable you use a LANSA shipped evaluation program M@SYSNUM. The names of system variables using this program must start with *AUTOALP or *AUTONUM.

1.  Select New in the File menu and select System Variable from the graphical menu. The New system variable dialog is displayed.

2.  Enter the following characteristics for the system variable:


*AUTOALP02iiiNUM (where iii are your initials).


Next Available Number

Method of derivation


Data type




Program Type

3GL program

Program name



3.  Press the Create button.

4.  The system variable has been created.

     The value of the system variable will be set automatically when it is accessed in the next step. The value is stored as an IBM i Data Area, named IIINUM. In a Windows application LANSA emulates data areas in an internal table.