Text Question Type

TEXT questions are similar to VARIABLE questions in that they are used for open-ended responses.  TEXT questions have no response list.

Responses to TEXT questions can be up to 5000 characters long. This will be further limited by the size of the box you describe, or the actual number of columns available in the text area of the data file.

TEXT questions can accommodate very long responses or very short responses. The data from TEXT questions is stored at the end of the data file in a compressed format for efficient use of the data file’s space. The TEXT question itself holds a pointer to its response data at the end of the file, and must have a length of 1 for the pointer.  Blanks are removed from the front of responses before it is stored.

WARNING: If you put another question over the text pointer, that data may be lost. Use the CHK file to verify that you haven’t done so. Overwritten TEXT pointers can be recovered using the RAWCOPY program (back-pointers only) or with the example FIXTEXT.SPX spec file (all recoverable text problems).

A TEXT response takes as much space as it needs in the data file on a case-by-case basis. This is in contrast to VARIABLE questions that must reserve enough space in the data file to hold a response as long as the specified maximum length. If a TEXT question is not asked, it will only use up one column, the column for the pointer.

Text data will start in the column indicated on TEXT_START on your header statement or, if you haven’t used TEXT_START, in the next data column after the last data column used. That location through the end of the data file is available for text data. You can fit approximately two times the number of typed characters as the number of data locations available.

PREPARE doesn’t check to see if you’re allowing yourself enough room for TEXT responses. If you don’t have at least 100 data columns available, you will not be able to enter any TEXT responses.

Data from TEXT questions can be put in the regular data area using the GENERATE,COPY_DATA statement and a VARIABLE question placeholder.


will move data from question TEXT1 to the VARIABLE question VARIABLE1.

TEXT question responses can be displayed with the LIST utility (see the Utilities manual), recoded with the RECODE utility (see RECODE), put out as ASCII characters in a file with the REFORMAT utility (see REFORMAT), and displayed or modified using CLEANIT (Utilities).

The syntax for a TEXT question type is:

!TEXT,subtype,# of lines,# of columns (full-screen mode)
!TEXT,subtype,# of characters (line mode)

NOTE: Specifying a subtype, or number of lines, columns, or characters is optional and is used for Terminal Mode only.  The options are not used in Web Mode surveys.

Valid Subtypes

  • BLANK=


Shortform: TEXT,BLKOK

Allows the question to be unanswered (and blank in the data).  Allows you to use an ESC (DOS, UNIX in full screen mode) or Enter (in line mode) as the only response; by default, at least one character must be entered. Pressing Enter in full screen mode will not generate a blank response; it will just move you to the next line in the full screen edit box.  Use this with caution because it is difficult to track the interviewers’ movements if some questions are blank.


This keyword puts data into a question that is left unanswered if presented.  The question subtype must be BLANK_OK (see above) or the question must be inside of a !GRID,BLANK_OK statement (allow blank in grid of questions).



This will save the string NO COMMENT into the data and answer array.



Used to give a TEXT question identity to a location containing text pointer data from a previous TEXT question (see GENERATE,COPY_DATA and SPECIAL,GET_DATA_CASE CODINGMODE). Like the FIELD,USE_PREVIOUS_ANSWER and VARIABLE,USE_PREVIOUS_ANSWER question types, the TEXT,USE_PREVIOUS_ANSWER is “hidden” from the interviewer. This TEXT,USE_PREVIOUS_ANSWER response can then be back-referenced in the text of a subsequent question.


What is your main reason for using the store brand?

In this example, no subtype is specified. The interviewer could type from one to approximately 750 characters as a response to the question.


What is your main reason for using the store brand?

This is the same question as above except it is a subtype BLANK_OK which allows no response — the interviewer could press ESC (DOS) or Enter (UNIX) if the respondent will not provide an answer, or if this question is being used for an interviewer comment and they have none.