REP005 Creating Files

Visual LANSA

REP005 - Creating Files

A LANSA file may also be referred to as a database table. Fields are added to the file to define the record format (key columns and columns). A LANSA field can also be described as a database column.  Once a file is compiled, the records in it can be retrieved, added, updated and deleted.

Objectives

  • To create two file definitions. You will create a Department Table and an Employee Table. These tables are similar to the ones used in the DirectX Examples application.
  • To review the database file attributes which can be defined in the LANSA Repository.
  • The file definitions will be as follows:

Department File iiiDepartments

Employee File iiiEmployees

iiiDeptCode*

iiiEmployNumber*

iiiDeptDescription

iiiDeptCode

iiiSurname

iiiGivenName

iiiSalary

iiiStartDate

 

iiiEmployNotes

     * indicates the fields used as the file key

Note: Files can be created manually or by copying an existing file definition in the LANSA Repository. In this lesson, you will manually create the file definitions so that you can see all the steps involved. If you copy an existing LANSA file definition, the fields, rules, and all other related database information about the file can be copied.

To achieve these objectives you will complete the following:

Step 1. Create File Definition

Step 2. Compile the File

Step 3. Create Department Maintenance Form

Step 4. Execute Department Maintenance Form

Step 5. Create the Employee File

Step 6. Create Employee Maintenance Form

Step 7. Execute Employee Maintenance Form

Step 8. Database Attributes

Summary

Before you Begin

In order to complete this tutorial, you should have completed the previous tutorials.