Compile Control Commands

Compile control commands control compile operations and the format of the files made at compile time (i.e., hardcopy).

COMMENT

Leaves information after the COMMENT but before the } as a program comment.

CHECK_COLUMN_OVERLAP

Turns on PREPARE’s checking of data column overlap. This is the default.

-CHECK_COLUMN_OVERLAP would turn the checking off.

DEFAULT_NUMERIC_MINIMUM

DEFAULT_NUMERIC_MINIMUM=xx

This changes the default minimum value for numeric questions that have not had a minimum value specified.

The options are:

  • 0 – Sets the default minimum to “0” (default).
  • 1 – Sets the default minimum to “1”.
  • MINIMUM_NEGATIVE – Sets the default to the minimum value allowed by the width of the question;i.e. 0 if length is 1, -9 if the width is 2, -99 if 3. 

DO_MENTOR

Does both a DO_VARIABLES and a MAKE_SPEC_FILES.

DO_VARIABLES

Turns on the making of variables in the DB file. This is the default. Use -DO_VARIABLES to turn it off. If the header option -DB_FILE is specified, you will get no variables regardless of this setting.

HARD_CODE

Tells PREPARE to hardcode the data locations in the QSP file. If you use this option before starting to interview, and then use the QSP file to make any changes, it will prevent you from overwriting previously used data locations. You may turn this on or off for different sections of your questionnaire. Turn this off with – HARD_CODE.

HARD_COPY

HARD_COPY option

Causes a hardcopy file to be made. The hardcopy file will be called <studyname> with an extension of HRD. You can turn this on or off anytime in the questionnaire. Use -HARD_COPY to turn it off.

Additionally, the HARD_COPY command has optional parameters to control the output HRD file listing. Enter the options after each other, separated by commas. To change the option’s default, put a dash (-) before it (i.e., HARDCOPY -SHOW_CAT_AS). You cannot continue a HARD_COPY command to another line. If needed, have multiple HARD_COPY commands on separate lines.

Valid Options

  • ALL
    • Prints all questions, including GOTOs and RESETs.
    • Default is –ALL
  • COMMENT
    • Writes your COMMENT parts of the questionnaire to the hardcopy.
    • –COMMENT turns this off (default).
  • DATE
    • Prints current date. Default is DATE.
    • Use -DATE to suppress it.
  • LANGUAGE=xx
    • Prints a hardcopy script in the language specified when you have a multi-language questionnaire. (See Multiple Languages for more information on specifying languages.)
  • LINES=#
    • Skips # number of lines after the next question.
  • LINES_BETWEEN_QUESTIONS=#
    • Places a graphic line between questions (default).
  • ONE_PER_PAGE
    • Puts each question on its own page.
    • -ONE_PER_PAGE turns this off (default).
  • PAGE
    • Allows new page break here.
  • PAGE_LENGTH=#
    • Allows you to specify the default page length.
    • This is ignored in favor of fitting the whole question on a single page.
  • PAGE_TITLE=x
    • Prints title on TOP or BOTTOM (x). Default is TOP.
  • PAGE_TITLE=”text”
    • “Text” replaces the study code and study comment on the page title.
    • If used in combination with PAGE_TITLE=TOP or BOTTOM, you must specify this as PAGE_TITLE=“text”, PAGE_TITLE=TOP.
    • Your default PAGE_TITLE prints as ‘Date – study code -study comment – page #’.
  • PRINTER= 0
    • Prints with no printer type set—strips enhancement escape sequences. This is the default.
    • 1 Prints with HP Thinkjet type set
    • 2 Prints with HP Laserjet type set
  • RESPONSE_INFORMATION
    • Shows info about length of response, how many, etc. (not the default).
  • RESPONSE_ITEM_LEADER_DOTS
    • Puts leader dots between response code and text (default).
  • RESPONSE_ON_RIGHT
    • Puts response to the right of the code (default).
  • SHOW_CAT_NS
    • Shows FIELD,HIDE_RESPONSE_LIST response lists.
    • Default is not to show them.
  • SHOW_DATA_LOCATIONS
    • Show the data location (default).
  • SHOW_LABELS
    • Shows question label
    • Does not print for GENERATE questions.
    • Default is to show if there is a user-supplied label.
  • SHOW_LOGIC
    • Shows logic (IF) of question.
    • Default is to show.
  • SHOW_QQ_NUMS
    • Shows question number
    • Does not print for GENERATE questions.
    • Default is to show, even for program-supplied question numbers.
  • SHOW_SAMEAS
    • Shows SAMEAS response lists.
    • Default is not to show them.

Here is example default output:

July 08, 2015 - Exam1 - Example Questionnaire - Page 1
Question: CNTRY
       Countries
(50.4) 01 ............ United Kingdom
       02............  France
       03............  Germany
       04............  Spain

HIDE_ALL

Hides all subsequent questions. This is useful when changing the questionnaire for resumed interviews. Use -HIDE_ALL to turn off. Questions being hidden are still checked for syntax, logic, etc.

HTML_DATAQUESTIONS_ONLY

This specifies to apply !HTML formatting statements to data asking questions ONLY.

INCLUDE

INCLUDE filename

Specifies the name of a file to be included in the compile. The specifications in this file are not expanded into either the Script Composer question list or into the Mentor compile list file. (See also &filename in FILE ACCESS COMMANDS, Getting Specifications From An ASCII File).

MAKE_SPEC_FILES

Turns on the making of specification files (Mentor, SPSS, etc.). This is the default. Use MAKE_SPEC_FILES to turn off. This does not affect the making of variables for the utilities (see DO_VARIABLES). This command has no effect on the QSP, CLN, SUM, or CHK files. You must be making the spec files for this command to have any effect.

MENTOR_CLN_FILE/MENTOR_DEF_FILE/MENTOR_TAB_FILE

These commands control the information that gets passed to the CLN, DEF and TAB files. (See the MENTOR Manual, USING PREPARE TO GENERATE MENTOR SPECIFICATION FILES for more information.)

NUMBERING

NUMBERING #,#

Controls incrementing for PREPARE’s automatically assigned question numbers. The first # is the question number which will be used for the next question. The second # is a number that will be the increment between question numbers. Either the next or incrementing number is required. A next question number is not required; if you don’t use it, you must include a comma as a placeholder, and PREPARE will use the last known number and increase it by the increment. This command controls all subsequent questions until another NUMBERING command appears. The default increment is .02. The default starting question number is .03. The increment will affect questions (GENERATE, GOTO, etc.) but not compiler commands, which do use up question numbers. These will increment by .01.

REMOVE/END_REMOVE

Prevents compilation of a block of questions, comments, etc. REMOVE requires an END_REMOVE command to indicate where the block ends. You can also nest these commands (there is no known limit). This can be used to remove questions from an existing questionnaire. Things being removed are not checked at all for syntax, logic, etc.

NOTE: Meta commands within the block will not be removed, and they will not be executed. All other questions and commands will be ignored within the !remove/!endremove block.

RESPONSE_ON_RIGHT

RESPONSE_ON_RIGHT=x

This command should be used if you have specifications for FIELD response lists from an outside source where the response code appears to the right of the response text (e.g., Apples 01). If you have some repeating character (e.g., “.”) between the response text and the response code, you may specify that character in the command.

EXAMPLE:

{!RESPONSE_ON_RIGHT=. }

{ QFRUIT:
What’s your favorite fruit?
!FIELD
Apples .... 01
Bananas ... 02
Cherries .. 03 }

The response list will appear in the interview as a normal Survox response list:

What’s your favorite fruit?
01 Apples
02 Bananas
03 Cherries

Any extra blanks beyond the mandatory single blank between the response text and the response code will be suppressed automatically. The “=” option need not be specified. Therefore, if only RESPONSE_ON_RIGHT is specified, only extra blanks will be suppressed (along with reversing the order of the code and the text).

SET_QUOTA

SET_QUOTA name or number=#,OVERRIDE

Sets the initial quota value in new quota files. This command will not affect existing quota values unless the “,OVERRIDE” parameter is used.

STRIP_HTML

This statement strips HTML code out of the text of the questionnaire, so that users can generate support files without the accompanying HTML code. The QFF file, QSP file, CHK file, SUM file, HARDCOPY file, and DB file are all affected by this. This allows you to generate reports for Survox Utilities (SCAN, LIST, FREQ), word processors, or ASCII editors without the html code being exported. Or, you can convert the questionnaire to a standard CATI questionnaire.

NOTE1: Since the .qff file is affected, be sure to save off the running .qff file, or use the command “QFFNAME=NOHTML” to save the .qff file with the name nohtml.qff, so you don’t mistakenly try interviewing with it.

NOTE2: See ~SPECRULES STRIP_HTML which only affects the .def file and .db file variable text and not the other files. This would be useful for stripping the html for tables only.

Here is some additional information on how different statements are handled:

  • The question number or label does not print for GENERATE questions.
  • The col.width does not print when width=0 (e.g., DISPLAY question).
  • GOTO questions with text will print in the HRD file.

IF STATEMENTS

The translation of the IF statement works for FIELD questions only. The translation picks up the response text of the item(s) referenced in the expression in an attempt to put out an English-like logic statement. If the spec looks like this,

!IF DRINKS(04,09,13,16,22,25,28,34,39,42)

then the hardcopy file would look like this:

IF: (DRINKS IS DIET COKE or DIET DR. PEPPER or DIET YELLOW MELLOW or DIET MOUNTAIN DEW or DIET MUG ROOT BEER or DIET MUG CREAM or DIET PEPSI or DIET 7-UP or DIET SLICE or DIET SPRITE)

NOTE: Only the first 20 bytes of recode text are picked up. Long recode text will be truncated accordingly. You can override PREPARE’s IF translation by adding your own comment:

!IF |comment| expression

Use this in any IF/EXPRESSION you wish to document differently in the HRD file.

TARGET

TARGET quotaname=#

Sets the value for the Target quota quotaname.T; # is 1-99999. It is used in comparison to quotaname to determine whether quota has been met.

Usually one TARGET command for every quota (see SYSTEM INFORMATION STATEMENTS, Using Triplequotas Mode) is used.

TRIPLE_QUOTAS must be set in the study header. This command will not affect existing quota values.

TARGET <name=value>, OVERRIDE

This directive to set the Target value will cause the specified value to be saved even though the quota already exists and has a value. Without “override,” an existing quota value is not changed.