Developer Documentation Library > Data Model > Available DSCs > Quantum DSC > Reading from a Quantum file > How Quantum DSC interprets the input data
 
How Quantum DSC interprets the input data
The Quantum data will be read based on card, column, and punch information held in a questionnaire definition (.mdd) file that describes the format and contents of the Quantum 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. See Creating a questionnaire definition file for instructions on how to do this. Note that you cannot use the MDSC capability in Quantum DSC to read a Quantum specification.
Once you have created a questionnaire definition file, you can choose to run Quantum DSC in either of two different modes:
Validating mode. If the Quantum file contains serial numbers, the read will fail if the serial numbers are not in ascending order or there are duplicate card numbers within a set of cards for the same respondent (in other words, a set of cards with the same serial number). In addition, if a card contains byte pairs consisting of the special value ^? (decimal 127) followed by 2 bytes of column binary, the set of cards for a respondent will be rejected if the number of multipunched columns on the card, indicated by the * character, does not equal the number of byte pairs.
Nonvalidating mode. If the Quantum file contains serial numbers then they do not need to be in order. Each change of serial number will signal the start of a new respondent. If there are duplicate card numbers within the set of cards for a respondent, the last card only with that card number will be read. In addition, if a card contains byte pairs consisting of the special value ^? (decimal 127) followed by 2 bytes of column binary, and the number of byte pairs does not match the number of multipunched columns on the card, excess byte pairs will be discarded and missing byte pairs will be treated as empty categorical responses.
Quantum DSC will also treat the Quantum file differently depending on whether you have specified in the questionnaire definition file that the Quantum file has serial numbers, or card numbers, or both:
Neither serial numbers nor card numbers have been specified. The file is treated as if it consists of single-card records.
Both serial numbers and card numbers have been specified. The file is treated as if it contains multi-card records, and the cards are inserted into position in the record according to their card number. The record will contain blanks for any missing cards. A new respondent begins on each change of serial number.
Only serial numbers have been specified. The file is treated as if it contains multi-card records, and the cards are inserted in the record in sequential order from card one. A new respondent begins on each change of serial number.
Only card numbers have been specified. The read fails, as this is not a valid Quantum file format.
On reading each card, Quantum DSC will treat an input variable as NULL (meaning "not asked") in the following situations:
The variable is blank.
A numeric variable does not contain a valid number.
A boolean variable does not contains a valid integer.
A text variable contains ASCII characters less than decimal 32 or greater than decimal 127.
A date variable does not contain a valid date.
The variable is defined as having its data in a .dau file, but the .dau file does not exist. Typically, the input data will only include a .dau file if the data was created using the write capability of Quantum DSC. For more information, see The .dau file.
See also
Reading from a Quantum file