Step 4. Make the file Operational
Having defined the file and its fields and added the required Repository features, you need to create the I/O module.
1. Return to the File Control Menu.
pppFILMENU File Control Menu
Enter number of function or place cursor on same line and press Enter.
4 1. Create a new file definition
2. Review or change a file definition
3. Delete a file definition
4. Make new or amended file definition operational
5. Print file definitions
6. Bulk Load of OTHER files
7. Exit from LANSA
F1=Help F3=Exit F12=Cancel F14=Messages
|
|
2. Select the option to Make new or amended file definition operational.
3. Nominate the file you wish to work with via the Select File to Work With screens.
4. When you have selected your file, the Create/Recreate a File from its Definition screen is displayed. The Job Name defaults to the File Name.
DC@P200201 Create/Recreate a File from its Definition
File : FileName Library File description
Submit this job as described below . . . . . YES YES,NO
Using Job name . . . . . . . . . . . . . FileName___
Job description . . . . . . . . . *LIBL/QBATCH
Job queue. . . . . . . . . . . . . *JOBD
Output queue . . . . . . . . . . *LIBL/QPRINT
Produce file and I/O module source listings. . NO YES,NO
Ignore decimal error/strip debug data options NO YES YES,NO
User program to call at completion . . . . . . .. .
Object Library Type Action to be taken / reason(s)
F1=Help F3=Exit F12=Cancel F14=Messages
|
|
5. Press Enter to submit the job.
When the job has been completed successfully, the I/O module created will include all the file and field validations, default values, batch control logic, triggers and so on, that you have specified.
When LANSA creates a file it will make the record format name the same as the file name. If you intend to write RPG programs to access files created using LANSA, you can either:
- change the file's record format name via the Database File Attributes screen (selected from the File Definition Menu) before making the file definition operational
or
- rename the file record format within the RPG program itself.
You will find more information about creating files in the LANSA for i User Guide: