Data Control Commands

Data control commands affect the placement of the data in the data file(s). These are quite useful when using column-free data specifications.

BLOCK #/END_BLOCK

This marks a block of questions — the total number of columns allocated to these questions is specified (#). This is useful when you have a set of questions that may be expanded later, so you reserve the extra space with this command.

COLUMN_KICK

COLUMN_KICK #

This causes # blank columns before the next question’s response. It is useful for reserving columns for future added codes or questions.

COLUMN

COLUMN #

This causes the next question’s answer to be assigned to column # (a numeric entry). Use with caution to avoid overlapping responses. If you continue to add questions without data locations after this command, they will skip over any questions previously recorded there.

HIGH_POINT

HIGH_POINT x

This saves the current location as x (a letter a-z, so you may save up to 26 locations) if it is higher than a previous one saved as x.

RESET_COLUMN

RESET_COLUMN #

This removes references to existing question locations after the column specified (#). Use this command to reuse a data area over and over without worrying about specifying a location on each question.

RESTORE_COLUMN

RESTORE_COLUMN x

Resets the current location to the column saved as x. Subsequent questions are assigned columns beginning with the restored location.

SAVE_COLUMN

SAVE_COLUMN x

Saves the current location as x. You can then return to the location for subsequent questions later in the questionnaire by using RESTORE_COLUMN x.

Here is an example using HIGH_POINT, RESTORE_COLUMN, and SAVE_COLUMN:

EXAMPLE:

{ QAPPLE: 20
Do you like apples? Y or N
!VARIABLE,,1,1 }

{!SAVE_COLUMN A }

{ QWHYAPPLE: 500
!IF QAPPLE$="Y"
Why do you like apples?
!TEXT }

{!SAVE_COLUMN B }
{!RESTORE_COLUMN A }

{ QORANGE:
Do you like oranges? Y or N
!VARIABLE,,1,1 }

{!HIGH_POINT A }
{!RESTORE_COLUMN B }

{ QWHYORANGE:
!IF QORANGE$="Y"
Why do you like oranges?
!TEXT }

{!HIGH_POINT B }
{!RESTORE_COLUMN A }

In the above example, SAVE_COLUMN A stores the current location (20) as A. The next question uses column 500. The SAVE_COLUMN B stores the current location (500) as B. The “Do you like oranges?” response will be stored after the “Do you like apples?” location using the RESTORE_COLUMN A command. The HIGH_POINT A saves the current location (21) as A. The “Why do you like oranges?” response is stored after the “Why do you like apples?” location using the RESTORE_COLUMN B command. By following this scenario, you can organize your data file for your own purposes, although using the work area (see Header option WORK_START) may be easier.

REFORMAT DATA CONTROLS AND USE

You can control the output of the spread data by using compiler commands in the PREPARE program.

NOTE: These compiler commands do not affect the flow of the interview in any way and can be inserted or deleted after interviewing has been completed to change the format of the output file.

Following is a description of each of the commands, and what they control.

EXPORT_LEVEL

EXPORT_LEVEL=#

This says that variables after this statement get marked with a level that can be used when using reformat to determine which variables to include. If the export level is < = the level specified in the reformat run for a particular question, the data from that question will be included.

RFT_ON

Includes the following questions in the RFT file; this is the default. To exclude questions (like unwanted internal calculations) from the RFT file use the command -RFT_ON.

RFT_FLD_01

You can now convert specific FIELD questions to 0/1 variables in your questionnaire without converting ALL the other single or multi-response FIELD variables as well by specifying RFT_FLD_01 in your script. You can turn this feature off using -RFT_FLD_01.

RFT_FLD_RESPONSE

Use RFT_FLD_RESPONSE to set the default (back), which will write the response codes in answered order.