5 12 Exporting and Importing

LANSA for i

5.12 Exporting and Importing

The export and import facilities in LANSA are provided to enable the definition of fields, files, processes, variables, lists or components to be moved from one LANSA partition to another LANSA partition. To do this, they are 'exported' from one LANSA partition and then 'imported' into another LANSA partition.

Objects that are not part of the LANSA system may also be exported and imported via these facilities.

The LANSA partitions involved may be resident in the same physical computer (within the same LANSA system or different LANSA systems) or be resident on different computers.

An example of exporting and importing on the same physical computer would be the transfer of fields, files and processes from a development partition (or system) into a production partition (or system).

An example of exporting and importing on different computers would be copying a complete application system written using LANSA that currently runs on an IBM i in one city into a new IBM i in another city.

The important thing about the 'import' and 'export' facilities is that they allow LANSA applications to operate effectively in multiple environments on the same computer or on multiple computers in the same environment.

The export facility uses a LANSA object called an 'export list'.

To export information, you first prepare a 'list of the things to be exported and then request that LANSA exports everything on the list onto a magnetic tape or into a save file on disk.

Every 'export list' you create has a name and remains in the LANSA system until you delete it. They can be altered at any time.

As an example of how the export and import facilities are used, consider a user who has to ship a small order entry system from a head office IBM i into a new IBM i in a branch office. The steps involved would be something like this:

  • On the head office IBM i prepare a list of all the 'things' that the order entry system will require to run successfully on the branch office IBM i. This is done using the list manipulation facilities provided by LANSA:

 

                       ___________________

                      | List:   DIST245   |

                      |___________________|

                      |'Thing' | Type     |

                      |________|__________|

                      | ORDNUM | Field    |

                      | CUSTNO | Field    |

                      | QUANTY | Field    |

                      | NAME   | Field    |

                      | ORDHDR | File     |

                      | ORDLIN | File     |

                      | CUSMST | File     |

                      | ORDERS | Process  |

                      | ORDENT | Function |

                      | ORDINQ | Function |

                      | ORDPRT | Function |

                      |___________________|

 

  • Request that LANSA exports all the 'things' on the list out onto a magnetic tape or into a save file. Note that this process duplicates the objects, leaving the originals unchanged.
  • Send the tape or disk to the branch office, or send the save file to the branch office via a communications link.
  • Sign on to the IBM i system at the branch office and then use the LANSA import facility to import the order entry system from the tape or save file.
  • Use the order entry system on the branch office IBM i.