Question Label Line

The question label line contains the label, question number, data location and width, and options, in that order. Each is separated by one or more spaces.

The syntax for a question label line is:

{ QLABEL:  [data location] options

NOTE: For the syntax explanations in this documentation, wherever label references are used, question number references are also allowed.

Question Label

The question label is a name for the question.

  • A question label is not required but is highly recommended.
    • Survox recommends that you provide a label (or a question number) if the question will be referenced by another question or for use with suspends.
  • It is always followed by a colon (:).
  • The question label can be used by other questions to reference this question and for other functions such as skips and rotations.
  • The question label can be up to 30 characters in length and can contain any alphanumeric character along with  periods (.) and underscores (_).
  • The first character must be a letter.
    • The name cannot start with QQ.
  • The question label cannot end with a period followed by a number (i.e., ABC.1).
    • This is because a question label can be used as a data location specifier and that may require a width.
    • In addition, it cannot end with a period or contain more than one consecutive period.
  • A question label cannot match the study name.
  • The question label appears in the CHK and SUM files created after compiles and may print at the bottom of interviewers’ screens.

EXAMPLE:

{ QAGE:
  • PREPARE assigns temporary labels if you do not include a label.
    • They are in the form of Q###.##.
    • You should not reference temporary labels from other questions because they will change as that question is accessed (modified, moved, etc.) or other questions are added or deleted.
  • PREPARE saves the question labels in the compiled questionnaire file for interviewers to reference.
  • There is a limit of 4000 labels in a questionnaire.
  • The following Survent keywords are disallowed as question labels:
    • ABORT, ABORTOS, ALTER, BKOK, GOTO, RESET, RETAKE, SHOW and SUSPEND.
    • Also disallowed are function names, such as X, NUMITEMS, QUOTA, etc.
  • You may use a minus sign before the label to “comment out” the question so it does not get executed (eg. {-QLABEL: …}.

If the questionnaire has a question with the special label of TERMINAT and the interviewer types “TERMINATE”, the interview will skip to that labeled question and do whatever is indicated. This may include asking one or more questions, incrementing quota counters, saving the incomplete data case (or not) or terminating the interview.

EXAMPLE:

{ TERMINAT:

The Terminate block is typically placed at the end of the questionnaire with logic branching nonterminators around it. If you prefer multiple Terminate blocks in your questionnaire (i.e. doing different things at different points in the questionnaire), label them TERMIN_A, TERMIN_B, etc.

When the interviewer enters TERMINATE, they will go to the next such block.

Question Data Location

The data location is where the data is stored for data entry or data creating questions. The data location is not needed for other question types. The default data location is the next data location that is the next available location beyond the furthest specified location so far. By default, the data width will also be automatically determined, based on your question specifications.

To avoid overwriting data, Survox recommends that you not specify a data location or width unless it is necessary. If you do specify a data location, you should specify the location throughout the questionnaire (See header option DATALOCATION_REQUIRED). You can look at the CHK file to see the locations assigned to all questions, whether assigned by the program or by you.

The syntax for the data location can be specified using one of the following:

{ QLABEL: [label.width]
{ QLABEL: [column.width]
{ QLABEL: [column-column]
{ QLABEL: WORK

The keyword “WORK” will assign the location of the question to the next available location in the WORK area (See header option WORK_START).  By using this keyword, you can have “column-free” questionnaires, even if you want to separate your data into the “Regular” data (to be sent to the client, etc.) and the “Work” data (used for calculations, etc.).

EXAMPLE:

{ QTOTAL: WORK
!EXPR,,X(STORE1)+X(STORE2)+X(STORE3)+X(STORE4) }

Otherwise, the location specification may be placed within optional brackets([ ]). If you use the column.width format, the brackets around the location are not required (although when referencing a data location on condition statements or control statements, it is always specified within brackets) (See  USING DATA LOCATION REFERENCES).

You may use a previous question’s label as the data location, if, for instance, you want the data from two different optional questions stored in the same location by specifying a numeric location (90).

When using a label or question number for the data location, you can use a column offset.

Here is the syntax for using a column offset:

[label+/- offset.width]

EXAMPLE:

{ QLABEL: [FIRST+3]

This example will use the data location three columns higher than the first column used by question FIRST. An offset of 0 means the first column in the field (same as using no offset).

If you specify a location without a width, PREPARE will provide the width (based on the question specifications). Labels without widths will use the same width as the original question.

EXAMPLE:

{ QLABEL: [Counter]

This would put the data for this question in the same location as the question labeled Counter. The same width as Counter will also be used; you must specify the width if you want a different one.

You will be warned if the length given is less than or greater than the width needed.

EXAMPLE:

{ QLABEL: 90

This would put the data in the location 90 and PREPARE will fill in the width.

EXAMPLE:

{ QLABEL: 90-100
{ QLABEL: 90.10

This would put the data in 90 through 100.

The width would be useful if, for instance, you wished to store an answer in a field and specify a width larger than was needed (to allow for modification later on). It is specified with a period, followed by the width. Different question types have different maximum widths (FIELD=5000, NUMERIC=16, VARIABLE=5000, and TEXT=1) or default widths. You may specify a width without specifying a specific location, such that the “next” location would be used with the width specified. If you specify a width that is too short for the question’s requirements, an error message will be displayed when you compile the question.

You can specify a width greater than needed for any question. FIELD questions will generate warnings.

EXAMPLE:

{ QLABEL: [Counter.4]

This would put the data in the location of the previous question Counter with a width of 4.

EXAMPLE:

{ QLABEL: .2

This question would use the next data location and use a width of 2. If you don’t assign locations, and have already started interviewing, you may want to save your locations to avoid having them shift if you add or delete questions later. You can do this by using the HARD_CODE compiler command to hardcode locations in the backup specification file (QSP) when you compile. Using this file to make future changes will ensure that you are warned if you overwrite columns.

If you do not use the HARD_CODE option, and wish to insert questions after interviewing has started without affecting unassigned locations, use the SAVE_COLUMN and RESTORE_COLUMN compiler command. (This would not affect subsequent questions.)

To delete questions and save the old location(s), use the HIDE option to hold the data space or set a specific column on the next question. If data is accidentally shifted for some interviews, you may be able to use Mentor or some other data manipulation program to shift it back later. (See WHAT TO DO WHEN A STUDY HAS BEEN SOFT CODED for more information on making changes to a questionnaire once interviewing has started).

If you specify a data location that has already been used by another question (either assigned by you or the program) or by the case ID, a warning message will be issued during compilation unless you use the compiler command -CHECK_COLUMN_OVERLAP.

Question Options

The question label line includes options to hide the question and to save the answer to the question under a previous alias name. If you use both options on the same question label line, HIDE must be before ALIAS.

Hide Option

  • The option HIDE hides the question.
  • This lets you create questions for internal purposes that will not be displayed on the interview screen.
  • You will want to use a question label or number on a hidden question to reference it with.
  • The hide question is used as a position marker for subsequent IF conditions or EXPRESSION statements, or to create variables for later reports.
  • You cannot display text on a hidden question’s codes, but you can display the data.
  • You can reference it in logic conditions or expressions.
  • The hide question uses up data space.
    • However it will never execute or store anything under the ALIAS=name.

EXAMPLE:

{ SAVEDATA: HIDE

would create a hidden question called SAVEDATA. 

Alias Option

  • The alias question is the name of a previous question to store the answer to this question under for back-referencing purposes.
  • The syntax is ALIAS=label.
  • This tells the program to save the answer as if it were the response to the previous question specified.
  • The data is not affected, just the answer array.

For example, you might have the same question in two different branches of the questionnaire and later you might want to back-reference the response to that question, no matter where it was asked.

If you alias the second version of the question to the first, your back-reference can just point to the first question’s label and you will automatically get the respondent’s answer no matter where the question was asked.

Sometimes people use ALIAS when they have an Other (Specify) situation.

For example, if a question with a response list (i.e., FIELD type) allows other as a response, and you have a later question (i.e., TEXT type) asking specifically “What other?”, the response to the TEXT question can be saved as if it were a response to the original FIELD question. Then, when the original FIELD response is referenced in the display of a subsequent question, and the respondent has given some other response, this response would be displayed.

EXAMPLE:

{ OTHER:  ALIAS=FIELDQUESTION

This would store the answer to OTHER as if it was a response to FIELDQUESTION. Back-references to FIELDQUESTION would pick up this response if there was one, otherwise the response to FIELDQUESTION. Back-references to OTHER would pick up only the answer to the later question.

Miscellaneous Examples

{ QADDRESS: 23

Label is QADDRESS, question number is flexible, data location is column 23; no width is specified (width to be determined by PREPARE); and there are no options.

{ QDATE: 24.2

Label is DATE, data location is column 24, width is 2 columns, no options.

{ QRATINGS: [RATE1]

Label is QRATINGS. The data location is the same as the prior question RATE1.

{ QEDUCATE: ALIAS=YEARS

Label is QEDUCATE, and if asked, the response will be stored as if it was a response to the previous question labeled YEARS.