NIPO ODIN Version 5.17

*CODES

Purpose

Defines a question type.

Syntax

*CODES [pos]L<length>|<pos>

Description

This command is always used in combination with *QUESTION and must be specified after this command on the same line. It defines a closed question with a set of precoded answer categories, where each category has a unique value.

Arguments

pos
This is the start of the data field where the data is written in the U-file.

length
This is the length of the data field.

In a closed, but not multiple question the number of digits of the highest category number defines the minimum length of the data field. In a closed, multiple question the highest category number (i.e. not the number of categories) defines the minimum length of the data field.

Remarks

  • It is also possible to define a dummy question by omitting the categories in order to store data from other questions or variables or to use it as a label.
  • The argument L1 may be omitted when data positions are fixed.
  • The NIPO ODIN Developer reports a warning message when the length is more than the highest code number requires. The NIPO ODIN Developer reports an error message when a *CODES question without *MULTI exceeds the maximum size of L10 (max. code number is 2147483647 = 232-1). Use *ALPHA to copy large dummy questions from and to the T-file.

Example 1

*QUESTION 1 *CODES 61

Do you own a car?

1: Yes
2: No

In this example, a closed question is defined with two precoded answer categories.

Example 2

*QUESTION 2 *CODES 62L25 *MULTI
What brands of cars do you know?

3: Citroën
4: Fiat
5: Ford
6: Hyundai
7: Mazda
8: Mitsubishi
9: Nissan
10: Opel
11: Peugeot
12: Renault
13: Suzuki
14: Toyota
15: Volkswagen
16: Volvo

24: Other *NOCON *OPEN
25: Don't know *NOCON

In this example a closed question with multiple answers is defined. Because the highest code-number is 25, the field has to be at least 25 positions long. When the interviewer or respondent is using the keyboard to type the code-numbers, the various codes should be separated by a space, that is generated automatically when a code number is ‘complete’. So it is best to skip code 1 when using code 10 and higher, skip code 2 when using code 20 and higher.

See Also