Professional > Data management scripting > Transferring data using a DMS file > Reading data > Transferring data from Quantum
 
Transferring data from Quantum
You can transfer data from any Quantum-format ASCII file by using the Quantum DSC. The Quantum format stores the responses to each question in fixed positions on lines of text. The positions are determined by card and column definitions that are stored in a separate questionnaire definition (.mdd) file. Typically, a suitable questionnaire definition file will not exist beforehand, so you will need to create one before you can start to read your Quantum data.
For more information, see Reading from a Quantum file.
How do I specify reading from a Quantum file?
In the connection string in the InputDataSource section, specify mrPunchDsc for the Data Source connection property, and specify the name and location of the Quantum file for the Location connection property. Then specify the name and location of the questionnaire definition (.mdd) file for the Initial Catalog connection property:
InputDatasource(myInputDataSource, "My input data source")
  ConnectionString = "Provider=mrOleDB.Provider.2; _
    Data Source=mrPunchDsc; _
    Location=<Name and location of Quantum file>; _
    Initial Catalog=<Name and location of .mdd file>"
End InputDatasource
Example
This example uses the Quantum DSC to read the first 100 records in the “Ski Demo” Quantum sample file provided with the UNICOM Intelligence Developer Documentation Library (DDL):
InputDatasource(myInputDataSource)
  ConnectionString = "Provider=mrOleDB.Provider.2; _
    Data Source=mrPunchDsc; _
    Location=C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Data\Quantum\skidemo.dat; _
    Initial Catalog=C:\Program Files\IBM\SPSS\DataCollection\7\DDL\Data\Quantum\skidemo.mdd"
  SelectQuery = "SELECT * FROM vdata WHERE serial <= 100"
End InputDatasource
Note This example is in the QuantumToDDF.dms sample file, which is installed with the UNICOM Intelligence Developer Documentation Library. For more information, see Sample DMS files.
See also
Reading data