Transferring Data from other Multivalue Systems |
|
|
QM includes versions of the Pick style data restore tools such as T.LOAD and ACCOUNT.RESTORE however, because the media format used by the corresponding save tools (T.DUMP and ACCOUNT.SAVE) is not publicly documented, some variations have been encountered where restore of a Pick style save into QM fails. To avoid this, QM includes a tool named QMSAVE which is issued in source form and can be compiled and run on a variety of other environments. The QMRESTORE tool can then be used to read the saved data into QM.
QMSAVE
The QMSAVE tool is provided in source form in the BP file of the QMSYS account. It includes conditional compilation constructs ($IFDEF) for the parts that vary according to the environment from which data is being transferred. These constructs can be resolved manually by editing the source code or by compiling and running the preprocessor released as PREPROC in the BP file of the QMSYS account.
The source code has been written in a way that allows it to be moved to the source system simply by running the ED editor on the Pick system, going into insert mode and using the "Paste from File" option of AccuTerm.
A full description of how to modify, compile and run this tool is included in the source code. The extracted data is moved to one or more export files, each with a numeric suffix and limited to a size set in the source code. Unless the exported data is visible from the QM system, the files should then be moved using binary mode FTP, removable hard drive or other data transfer method.
The QMSAVE tool is subject to change. Users who modify it to work in new environments are encouraged to contribute their changes back to QM so that they may be shared with other users.
QMRESTORE
The QMRESTORE tool is used to restore the exported data into QM.
The command line to run this tool is QMRESTORE pathname {options} where pathname is the name of the file holding the saved data. The sequence number is added automatically. options are:
The command will prompt for the name of the saved account and the name of the files to be restored. Use of an asterisk as the file name restores all files.
To avoid damaging the QM VOC file, any file named VOC or MD in the saved data is restored as VOC-RESTORE or MD-RESTORE respectively. Any files with names that clash with a QM VOC entry that is not a file will be restored with a "-CLASH" suffix added and must be resolved manually.
UVIMPORT and UDIMPORT
The UVIMPORT tool can transfer data directly from UniVerse data files to QM files. The UDIMPORT tool is similar but reads Unidata files. Both tools are in the standard global catalogue but need a VOC entry to be created in the account(s) where they are to be used. For UVIMPORT, this should be: UVIMPORT 1: V 2: CA 3: $UVIMPORT
For UDIMPORT, it is similar but with $UDIMPORT in field 3.
The programs can import all or selected files from a U2 account. The source files may be static hashed, dynamic hashed or directory. The file byte ordering will be corrected automatically if the file has come from a system with a different architecture.
These tools do not make changes to the source files, however, it is recommended that a copy of the U2 account is used rather than the live data. It is essential that no U2 users are using the files while the import process is running.
Although the tools will work with a standard 80 x 24 screen, it is useful to enlarge the window to have as many lines as will fit on the screen. For example, TERM 80,43
The tools have two modes of operation; interactive mode and command line mode.
Interactive Mode
LOGTO the account into which data is to be imported. Create the VOC item described above if it does not already exist.
Type UVIMPORT or UDIMPORT to start the program.
Enter the pathname of the U2 account from which data is to be imported. The program scans the VOC of this account to build a list of importable files and displays this list. Each file is numbered for reference. This process may take some time to complete if there are many files.
Two file status columns are displayed, one for the data file and one for the dictionary. These columns may contain:
If the column is blank, the file could be copied but is not yet selected.
A help text box is displayed at the bottom of the screen. This display can be toggled by typing a question mark and pressing return.
To select files, type: •the line number (e.g. "5") to select a specific file •a range of line numbers (e.g. "4-9") to select multiple files •"A" to select all files
To deselect files, use the same codes prefixed with "X".
The selection/deselection initially affects both the data and dictionary portions. Type "D" to switch between both, data and dictionary modes. The current mode is displayed at the top right of the screen.
To scroll through the pages of the display (where applicable), type N or P.
Once files have been selected, type Q to quit from this screen. If any files have been selected, the program will prompt for confirmation that import is to continue.
For each selected file, the program displays the file name, source pathname and target name.
Press return to import the file, a space to omit the file, or an asterisk to import all files without further prompting.
Two progress bars are displayed, one for files, the other for groups. In a directory type file, each record is considered as a group.
If selected for import with UVIMPORT, the VOC and VOCLIB files will be restored as UV_VOC and UV_VOCLIB. For UDIMPORT, the VOC will be restored as UD_VOC.
Command Line Operation
LOGTO the account into which data is to be imported. Create the VOC item described above if it does not already exist.
The command syntax is identical for both tools. Using UVIMPORT as an example, to import to the default location, type UVIMPORT source.path or, to import to a specific location, type UVIMPORT source.path {{DICT} target.file}
If the source.path begins "D_", the program assumes that it is a dictionary and imports to the dictionary of the corresponding file.
Alternatively, if the default select list contains a list of filenames to be imported from the U2 account, type UVIMPORT account.path
The following additional command line options are supported:
|