<< Click to Display Table of Contents >> Navigation: User guide > Exports > DTV file generation and use |
In most instances data can simply be exported from CL for use with another program, by, from the "Main" window selecting [Data] [Export data].
However, if the data file is very large it may be too big for the other program to use (or import). If this is the case, you will need to generate and amend a .DTV file to control which, and how much, information is exported. You would also need to do this if you did not wish to export all of the variables you had created or if you had a syndicated data file, where each member of the syndicate required different data from the file. A .DTV file should also be created if you have exported the data file before and you need to match the data previously exported.
A .DTV file has the main CL script file name and the extension .DTV. It contains a listing of all the entries (variables) which make up your IDF file, the order in which the entries occur and the space (data location widths) allocated for each.
For layout information see section DTV layout
To create a DTV file, from the "Export data" dialog box, click the [Entry select (DTV)]. At the "DTV file usage" dialog box you can choose to [Make a DTV file] which you can then modify to include only entries for which data should be exported (using the Windows notepad or a word processor, saving the file as an ASCII or text only file).
You can choose to output multi-coded variables as a spreadfield to Triple-S, SPSS and SAS by setting F in the output type column.
Once you have a .DTV file to use, from the "DTV file usage" dialog box click the [Select DTV file] button and choose the .DTV file. You are then returned to the "DTV file usage" dialog box.
If you select [Use for entry order and sizes] CL will use the DTV file to control the order of entries, and their output sizes. This might be done so that you specify that only data from certain entries is to be exported. This is especially useful if the program with which you plan to use the exported data cannot accept large data files. The selection [Use for entry locations, order and sizes] has the same effect but CL will also output each entry to the data locations you have specified, in the modified DTV file.
IMPORTANT: if you alter the data locations in a DTV file and then select [Use for entry order and sizes] from the "DTV file usage" dialog box CL will ignore the new locations you have specified in the modified DTV file. If you modify locations, you should select [Use for entry locations, order and sizes].