4.1.2 Migrating a Partition from a Slave to a VCS Master for Vault VCS

Note: the most efficient way of installing a Visual LANSA Independent System to a VCS Master is to perform a Custom Install, and in the Initialize Database and Partitions options only choose Example Partition Definition. This is because the whole partition will be replaced. Other partition initializations such as Visual LANSA Framework need to be done after the partition has been replaced with the Slave data:

1.  Start the Visual LANSA Independent System which is to be connected to your VCS Master. If it's a completely new install the logon will display something like this:

2.  Click OK.

3.  Create a new Partition with the same name as the source system. Let's say it's called DEX (New/Partition). This partition is going to be replaced, so the actual settings do not matter. You just need to be able to select it on the logon dialog.

4.  Close the Development Environment and select DEX and click OK.

5.  Leave that system running while you prepare the export from your source system.

Note that the export may be produced by an IBM i.

6.  On the Source System (which contains the COMPLETE and up-to-date partition), use the Deployment Tool to export your whole partition to your Independent System. Use the XEXPORT template to create an application and check that the settings are as shown below. No other configuration is required. Save the Package and Build it.

7.  Once the Package is built, close the Package and go to the Package Folder.
Now navigate to the internal directory of the package you have built. Something like this: C:\PROGRAM FILES\SlaveSystem\X_WIN95\X_LANSA\X_APPS\EXPORT\X_PKGWRK\6.0.0\Build\internal

     Note: Choosing the Go To Folder option from the Deployment Tool will take you straight to C:\PROGRAM FILES\SlaveSystem\X_WIN95\X_LANSA\X_APPS\EXPORT.

8.  Copy the path ready for the import.

9.  Return to the Visual LANSA Independent System which is to be connected to your VCS Master.

10.  Start the LANSA Import. Paste the path into the Filename field and click open, then double click the lxxdir.del file. A dialog like the following will be displayed.

11. Click Import.

cid:image001.png@01D40257.B9B98320

12. When the import is completed, close down the Development Environment and restart it.

     Note: Once the Job Status is completed, you do not need to wait for the Refreshing Repository to complete nor do you need to press F5. So at this point you can close the Development Environment:

     When you restart the Development Environment you will be prompted to initialize the partition if the import came from an older version of LANSA. Choose the options you need to use.

Populate VCS Working Folder

Once the Development Environment is displayed, expand the Repository List that was generated. Select all objects that you wish to add to version control.

Tip: To select all objects in a list, click the first item, scroll down to the last item, hold down the Shift key and click on the last item. Alternatively, make the list a favorite by right clicking on the list and selecting Is Favorite. Go to the Favorites view, click on the list, click on an object in the list and press Ctrl-A.

Right click on a selected object and click Add to Version Control.

cid:image002.png@01D4025B.A8BDAF70

All selected objects will be saved into the VCS Working Folder. This can take quite a while for a large partition.

Pointing the Version Control System at the LANSA VCS Working Folder

Now you need to point the VCS at the LANSA VCS Working Folder. How you perform this step will depend on your Version Control System. The example used here is Vault from SourceGear. The use of this as an example is not an endorsement that this particular VCS will suit your development and management style.

1.  Create a Folder in your VCS to hold the entire LANSA Repository.
In this example the Slave System was connected to an IBM i Master that was installed in the program library DEVPGMLIB. To indicate this relationship, the folder has been named after the program library.

2.  Go to the LANSA Development Environment and on the VCS tab right click on the Version Control folder and choose Show in Windows Explorer. Copy the whole of the path. Paste this path into the working folder in the VCS:

     You should see the LANSA directories ghosted in the VCS Folder:

3.  Right click on each ghosted folder and choose Add this Folder. You'll see something like this:

4.  Right click on DEVPGMLIB and choose Get Latest Version. This ensures the file states are up to date.
In particular it sets all files to read-only.

     LANSA and the VCS are now linked together. All objects will be unavailable to edit as they are not checked out from the VCS. (This presumes you use the Check Out/Edit/Check In concurrent development style of version control). If you open an object it will display this message:

     If you check it out from the VCS you will be allowed to edit it.

     If you use the concurrent development style Edit/Merge/Commit, then of course the objects are always editable and you must resolve the status of the objects using the VCS.