Data editing > Data-mapped variables > Automatically generating a Quantum spec
 
Automatically generating a Quantum spec
Quick reference
To create a data-mapped Quantum spec from an existing qdi file, at the command line, type:
qdiaxes [–a][–t n] input_qdi_file output_filename
More information
Using an existing Quancept qdi file, you can automatically generate a data-mapped Quantum specification. The qdi file contains details of all the variables defined, their possible values (that is, the possible responses), and where in the data records the information for particular variables is located. The generated Quantum run file includes the necessary statement to the qdi file which is then referred to for information during the Quantum run. You might need to manually adjust the generated specifications, but in general, this automatic creation can save you a great deal of time (especially for new spec writers) and reduces the likelihood of errors.
The main body of the Quantum specification is generated using the qdiaxes program. This program reads the qdi file and creates the following files:
a run file containing a struct statement, a *usemap statement for the specified qdi file, *include statements for the ‘tab’ and ‘axes’, and a dummy breakdown axis
a table specification file containing a tab statement line for each data item in the qdi file
axis specifications: either standard axes statements or grid axis statements.
The Quancept utility, qditum, can also generate a basic Quantum specification from a qdi file. However the specification that it creates does not use the data-mapping feature. For information about qditum, see the Quancept Utilities Manual.
Syntax
To create a Quantum spec file from an existing Quancept qdi file, type:
qdiaxes [–a][–t n] input_qdi_file output_filename
Parameters
–a
Removes all text strings of the form < ... > from question texts. This is useful for Quancept Web projects where the text may contain embedded HTML directives.
Text-formatting codes resulting from a Quancept CAPI script are always removed since they are meaningless to Quantum.
–t n
(Optional.) Specifies the minimum length of a response text in the generated axes file. n can be set to any length providing it is enough to uniquely identify the response text (in the qdi file) in question.
If this option is omitted, the text is truncated, by default, to 12 characters.
input_qdi_file
The name of the qdi file, with or without the qdi suffix.
output_filename
The base name for the output files. qdiaxes appends the relevant suffix to each Quantum output file.
Example
The statement:
qdiaxes holidays.qdi holidays
reads the qdi input file holidays.qdi and generates the corresponding Quantum files (that is, holidays.run, holidays.tab and holidays.axs). Since the –t parameter is not specified, the response texts (written to the holidays.axs file) are truncated to 12 characters.
See
Quancept CAPI and Quancept Web text-formatting options
Reducing the response texts
Files produced by qdiaxes
See also
Data-mapped variables