Administration Guide : Importing Data into the Xinet Database : Importing from a Cumulus database

Importing from a Cumulus database
Cumulus 4 and Cumulus 5 databases can export data to text files, which can then be imported to Xinet. The import program has special flags made for Cumulus exports.
The elements we are concerned with are:
These elements can be exported in different ways, depending on the version of Cumulus used. Xinet currently support exports from Cumulus 4 and 5.
File information
File information may be in distinct fields, or it may be kept in one “asset reference field” that is in a binary format. When the information is in distinct fields, you can write an import command that puts those values into the new file table directly. For example, the -T and -C flags put the appropriate values in the type and creator columns in the file table. If the information is in a single “asset reference” field, then the -n flag needs to be part of the import command. This option will extract all file information from the asset field and put it into the appropriate fields in the new file table.
Previews
Previews for the Cumulus files are in a proprietary hex format. Using a -e option in the import command will extract the preview, convert it to binary, and place it in the appropriate tables within Xinet. Previews can become small previews or large previews in Xinet or even FPOs. For example, the flag
-esmallweb would put the preview for each file into the smallwebdata table.
Metadata
A Cumulus export file may or may not provide metadata in distinct fields. If distinct fields are used, the data can be imported as normal, using the regular flags for matching with existing metadata fields in Xinet.
With Cumulus 4, however, all exported metadata is commonly placed at the end of a record, right after the image preview. In such cases, Cumulus 4 does not make distinct fields for each metadata field. The values are listed one after another. As a result, it is impossible to direct values to particular metadata fields in Xinet. However, it is possible to “merge” all the values for one record into a single Xinet field. Typically, this will be something like a Notes field. The -M flag does the “merging.” This -M flag must be the last flag in the import command. The Notes field (the name is just an example) must also already exist in Xinet and should be large enough to accommodate all the data. Note that metadata found with -M follows the same character set translation rules as with other metadata fields. For an export saved in the “Mac” characterset, the flag to use would be -MNotes: charset=mac.
In Cumulus 5, exported metatdata is generally in distinct fields, so there is no need to use the -M flag.
Path
Full path information is usually part of the asset reference field. If you use the -n flag, the import program will be aware that the path is part of this field. You can use the -b flag to construct the path, using the field number to stand for the full path to the file. For example, if the field with the asset references were field 15, the argument would look like: -b"%15%". The import program would extract the full path from the asset reference field and put in place of the "%15%".
In Cumulus 5, the path to a file and the filename are usually in separate fields. An example might be:
Field 13 the volume name
Field 15 the path name (could require a m to specify format of path)
Field 14 the file name
So, as an example, the path might be referred to as:

-b "%15%/%14%"
Here is an excerpt from a sample export file made from Cumulus 4: Two chunks of binary data (fields 21 and 22) are truncated. The first is the asset reference; the preview is second.
Copyright 1992, Canto GmbH Berlin, Cumulus 1.0 Export
EPSF,8BIM,7/26/01 9:28:26 PM,7/26/01 9:28:27 PM,200699,15714,2,302,298,0.55554,0.70833,0,0,8/16/01 10:08:19 AM,8/16/01 10:10:43 AM,63435C1.s-22.8%Max ButtonHfor exampleps,Status,AssetManager,Adobe Photoshop Version 6.0.1,43754170020A000200000F462E657073,01008032476345098234010000000100,60000-69999:63435,MOVIES:H:How the Grinch Stole Christmas
import "cumulus4.export" -s2c -r0D -g4578706F7274 -TType -CCreator "-cCreateDate'MM/DD/YY hh:mm:ss AA'" "-mModifyDate'MM/DD/YY hh:mm:ss AA'" -zFileSize -iResForkSize -iColorSpace -iHRes -iVRes -iHdpi -iVdpi -iUnknown -iUnknown "-aArchivedDate'MM/DD/YY hh:mm:ss AA'" "-dRecordModifyDate'MM/DD/YY hh:mm:ss AA':def=01/01/2000 01:00:00" -iFilename -iStatus -iUser -iOpenerApp -nAssetReference -ePreview -MNotes -b"/raid/CustomerData/%m20%"
-g4578706F7274 The data starts after the string Export.
-nAssetReference This will get the full path and make it available to the import program as "%20%" (the 20th field)
-ePreview This will read in the preview exported in the file.
-MNotes Will merge together all the fields starting with the 22nd field.
-b Will use the path to the file extracted from the AssetReference field. The m converts Macintosh format paths to the Unix format.