Question Structure
Questions are used to collect the data or perform other functions and follow a specific structure. Each question specification is enclosed in curly braces ( { } ). The left brace and question label line options are on the first line, followed by lines that specify other parts of the question structure. A right brace follows whatever is on the last line of the question specification, either on that line or on a line by itself.
The syntax for the question structure is:
{ QLABEL: [data location] options (Left brace is required, Question label is not required but highly recommended, and the Data location and options are optional.) !HELP, MISC, or RDG statements (Optional) !IF condition statement (Optional) Question Text Lines (Optional) !QUESTION TYPE,<subtype>,<options> (Required) Response List Items (Required but depends on Question type) } (Right brace is required)
The first line is the question label line, which includes a left brace ({), a question label, a data location and other options. The left opening brace is required to start a question and the right closing brace is required to end a question. The question label is not required but it’s highly recommended to label every question within your spec especially if you want to reference this question from other questions or you will have suspends. The HELP statement allows you to specify a line of text that will print at the bottom of the screen for the question. The MISC statement allows you to set certain values for purpose of generation of supporting files. The RDG statement controls the frequency of certain responses when doing “Random Data Generation” questionnaire testing (See RANDOM DATA GENERATION).
The condition statement is on the next line. This is included if you need to specify that the question be asked only under special conditions (See CONDITION STATEMENT). An individual condition statement can have as many as 32,000 characters of references. This allows a virtually limitless condition so that you don’t have to worry about breaking it up into separate questions.
The question text begins on the following line. The text of the question is free-form; it will be presented to the interviewer or respondent exactly as you format it. Special screen formatting commands are available to highlight words, display prior responses, etc. (See QUESTION TEXT).
The question type, subtype and options are specified on the line following the question text. The question type is required and must be specified. The available subtypes and options depend on the question type and are described in the sections on question types and control statements (See BASIC QUESTION TYPES and CONTROL STATEMENTS).
For some question types, a response list must follow the question type, listing the possible responses. You can control the data stored and skip to other questions based on the response (See FIELD QUESTION RESPONSE LIST).
Only the question label line opening brace, question type, and closing brace are required. Depending on the question type, other parameters may be required. We will discuss the required elements of the questions first (question label line and question type) followed by the optional elements (question text and condition statements).
For advanced users:
Where appropriate, you can specify a question structure on fewer lines. One-line items such as GENERATE, GOTO, or QUOTA statements can be moved up to the label line.
EXAMPLE:
{!GEN,COPY_DATA,to,from,length } {!GOTO,label }
Here are the guidelines to follow:
- If your question label line is blank, or has only a label: on it, you can move up the next line if it is a ! line (not text).
- You can never move text up.
- The only two different items you can have on the same line are the question label and a !item.
- This means you can also put an !IF on the question label line.
EXAMPLE:
{ INCMAN: !IF SEX(1)
If using a !MISC, !RDG or !HELP command in your question structure, they are specified at the top of the question block, either before or after the (optional) IF, in any order.