Developer Documentation Library > Data Model > Available DSCs > Quantum DSC > Writing to a Quantum file > The .dat file
 
The .dat file
The .dat file is a Quantum-format ASCII data file that stores question responses in card and column format according to the card, column, and punch layout defined in the questionnaire definition (MDM document). When multiple cards are used for a respondent, specific columns on each card contain the respondent's serial number and the card number. The remaining columns for each card number contain the respondent's responses.
Categorical questions
The responses to single response questions are generally single punched. However, if you run Quantum DSC in dirty or non-validating mode, they can contain multipunches. Responses to multiple response questions can contain multipunches.
Numeric questions
The responses to numeric questions are stored as numeric data. If a response contains a real (decimal) value that has more digits than can fit in the number of columns that have been allocated, Quantum DSC rounds the digits after the decimal symbol in an attempt to make it fit. Note that the decimal symbol takes up one of the allocated columns. For example, if four columns have been allocated, 12.3456 will be round to 12.3, 123.456 will be rounded to 123, and 12345.6 will be rounded to 12345, which still won't fit.
Open-ended (or text) questions
The text for open-ended questions might be stored in columns allocated in the .dat file, or as a line of unlimited length in the .dau file. Text in the .dat file is typically used for responses that will not be coded, such as names and addresses. When open-ended responses are to be coded, the text is typically stored in the .dau file, and columns are allocated in the .dat file for the responses that will be defined later. In2form allocates columns in the .dat file for all open-ended text, but when the option to export source files is being used, these columns are blank and the names of the source files are stored in the .dau file, ready for transcribing.
Date questions
Quantum DSC formats all date and time values as a numeric value with the following format YYYYMMDDhhmmss, where YYYY is the year, MM is the month, DD is the day, hh is the hour, mm is the minute, and ss is the second. With the exception of the year (which is a four-digit number) all are two-digit numbers with a leading zero when less than 10. This is an internationally recognized date format and has the advantage that it is readable and easy to sort.
See also
Writing to a Quantum file
Quantum DSC
Writing to a Quantum file