Interview Questions   Tutorials   Discussions   Programs   Discussion   

VSAM - In vsam why we use export-import utility?

asked mar August 7, 2014 11:46 AM  

In vsam why we use export-import utility?


1 Answers

answered By Mswami   0  

The EXPORT command is used to create a portable copy of a VSAM cluster.  When the REPRO command is used to copy a cluster, only the data records are written to the output dataset.  Before the records can be restored, the cluster must be recreated by executing an AMS DEFINE command.  EXPORT copies the information required to completely reconstruct the cluster without the necessity of executing a separate DEFINE.  The portable copy of the exported cluster must always be contained in a non-VSAM, sequential dataset.

A sequential dataset created by the EXPORT command may only be processed as input to the IMPORT command, which will result in an equivalent copy of the original source cluster.  AMS first searches the target catalog for an entry with the same name as the cluster being imported.  If an entry does not exist, AMS uses the catalog information included in the portable copy to define a new catalog entry, and then it reloads the object.  If a catalog entry does exist, AMS verifies that the entry has been marked as exported by a previous EXPORT command with the TEMPORARY option.  If this is the case, AMS assumes that the cluster is being restored from the previously exported copy; AMS deletes the old object, defines a new catalog entry of it using the catalog information in the exported copy, and then reloads the object. If a catalog entry exists, but it is not marked as having been previously exported, the IMPORT command fails.  


   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!