4 9 2 What about Data

Visual LANSA

4.9.2 What about Data?

What happens if you have a file filled with data and then you make a change to the file? When you make a file operational, you can specify save and restore data options. LANSA will attempt to copy the data to the new file where possible.

You may use the  Save Table Data option when you wish to have the existing data in the table(s) saved before the table is deleted and recreated during a LANSA defined file generation/creation.  Using this option will result in all existing data being saved to a file named  ffffffff.DAT (where  ffffffff  is the table name) in the partition directory  X_LANSA_ppp  (where  ppp  is the partition identifier) in delimited ASCII format. 

Using the Reload Table Data option will attempt to restore data back into the table using the data saved in the  ffffffff.DAT  file. It may not be possible to restore data in all circumstances. For example, if a field in the file is changed from alphanumeric to packed, it will not be possible to copy the data between fields.

If you have a considerable amount of data and you make major changes to the file, you may wish to write your own data reload functions. In this case, choose only the Save table data option and then execute your own reload function once the file compile is complete.

Also See

File Compile Options in the Technical Reference Guide

Ý 4.9 Compiling Files