Developer Documentation Library > Data Model > Available DSCs > Quanvert DSC > Special types of Quanvert projects > Packed Quanvert projects
 
Packed Quanvert projects
Quanvert DSC provides support for "packed" Quanvert projects. The packed format is useful for distributing Quanvert projects and for transferring them between operating systems.
You can tell the difference between packed and unpacked Quanvert projects because a packed one consists of one file with a .pkd filename extension whereas an unpacked project consists of many files including a header file called qvinfo.
When you connect to Quanvert data, you can now specify either the qvinfo header file in an unpacked project or a packed .pkd file. When you specify the .pkd file, the first time you access the data, Quanvert DSC automatically "unpacks" the project into a subfolder of the folder in which the .pkd file is located. For example, for a packed Quanvert project called Museum.pkd in the C:\Samples folder, the project will be unpacked into the C:\Samples\Museum folder. The .pkd file is retained and the next time you access it, Quanvert DSC detects the presence of the subfolder and automatically reads the data in the subfolder without unpacking it again.
This process is generally invisible to the user and is the same when accessing case data, or metadata, or both case data and metadata. However, you need to note that Quanvert DSC does not unpack a .pkd file if the expected subfolder already exists. This means that:
If for any reason the unpacking process fails after the subfolder has been created, you will need to delete the subfolder before attempting to access the data again.
If you update a .pkd file (by replacing it with a new .pkd file of the same name), you will need to delete the subfolder in order for Quanvert DSC to unpack the new .pkd file. However, Quanvert DSC would unpack the new file if you gave the .pkd file a different name (provided of course that a subfolder with that name does not already exist).
Limitations
Quanvert DSC can unpack no more than one .pkd file at the same time on the same computer. In a multiuser environment, this means that requests to unpack .pkd files are queued when necessary.
Quanvert DSC does not support packed multiprojects.
Quanvert DSC does not support packed projects that are split into more than one file. (These files typically have filename extensions .p01, .p02, and so on, with an index file with a filename extension of .pzz.)
Some Quanvert databases have an option to store variables in multiple subfolders. This option is controlled using a file called numdir.qv and was introduced because the 16-bit MS-DOS FAT file system is very slow when there are more than about 100 files in a folder. Quanvert DSC ignores this option when it is present in a packed project.
When merging two .pkd files, if any of the variables being merged include unbounded loops, the loops cannot be exported via VDATA, but will instead be exported via HDATA. As a result, the query string that is generated for lower level variables is quite different depending on whether HDATA or VDATA is used. For VDATA, individual grid slices are selected; for HDATA, the variable is simply selected at the lower level.
Errors
When an error is encountered when attempting to access a packed project, Quanvert DSC issues a message to explain the problem. For example:
Unpacked area for <Name of .pkd file> exists but does not contain a valid Quanvert project
This error occurs when you access a .pkd file for which the subfolder already exists, but the subfolder does not contain a valid unpacked Quanvert project. This might be because the project previously failed to unpack properly or because one or more of the files have been deleted from the subfolder. If you delete the subfolder and then attempt to access the .pkd file again, Quanvert DSC will recreate the folder and unpack the project again, if possible.
Can't create metadata for project <Name of .pkd file>. Error calling Unpack
This error generally means that the .pkd file you are accessing is not a valid packed Quanvert project.
Example
In addition to an unpacked project, the Museum sample Quanvert project that comes with the UNICOM Intelligence Developer Documentation Library includes a packed project file called museum.pkd. The Household sample Quanvert project also includes a packed project file, which is called househol.pkd.
To illustrate working with .pkd files, this example provides instructions on opening the museum.pkd file in DM Query.
By default, the museum.pkd file is installed in:
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum
When first installed, this folder does not contain a subfolder. This example assumes that this is still the case. If the folder contains a subfolder called museum (i.e. [INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Data\Quanvert\Museum\museum), you might want to delete it before following these steps.
1 In Windows Explorer, go to the folder in which the Visual Basic 6 version of DM Query was installed. By default, this is:
[INSTALL_FOLDER]\IBM\SPSS\DataCollection\7\DDL\Code\Tools\VB6\DM Query
2 Double-click the DM Query.exe file.
This opens the DM Query window and the Connection tab in the Data Link Properties dialog.
3 From the Metadata Type list, select Quanvert Database (read-only).
4 Enter the Metadata Location, by clicking Browse and browsing to the folder in which the Museum sample Quanvert project was installed, and then selecting the Museum.pkd file.
5 From the Case Data Type list, select None.
6 Click OK to return to the DM Query window.
7 Type an SQL query into the text box (for example, SELECT * FROM HDATA) and then press Return.
The results of the query are now displayed in the DM Query window.
8 In Windows Explorer, go to the folder in which the Museum sample project was installed. Notice that it now has a subfolder called museum, in which the project has been unpacked.
Next time you connect to the museum.pkd file, Quanvert DSC will detect the presence of the subfolder and will automatically read the unpacked data without unpacking it again.
See also
Special types of Quanvert projects