Matching data locations

<< Click to Display Table of Contents >>

Navigation:  User Guide > Data > Handling raw data >

Matching data locations

Companion

For CSV data, the entry names are important, not the data locations.

Use this section when you are:

Defining a questionnaire to access a fixed format character or binary file that already exists

Defining a questionnaire so that any data collected will have a particular layout that you must follow

Filters and variables can also be stored in the data if needed.

In either case, you need a data map or a questionnaire with data locations on it.

In order to match data locations you will need to select "User sets" in [Project global settings].  You will also need to set the raw data structure as binary or character and set the data location for the serial number to be stored.  For multiple lines per questionnaire you will also need to set the card number location and list the card types that you will be using.

We now need to look at each type of answer to questions and how these might be stored:

Single-coded

This answer is a single selection from a list of responses.

Single-coded responses are normally stored as a number of up to 4 digits to represent the response number selected.

The first data location is specified, along with the width (1, 2, 3 or 4).  The width determines the maximum response number, for example a width of 2 can hold up to 99 responses.

The response numbers are stored on the right hand side in the data location allocated.

See Reference Manual, Questions, single-coded question.

Individual response locations

In this case each response is allocated its own location and code, written as location/code, for example 123/5.

The first data location is specified and each responses location is held relative to this first data location.  Changing the first data location will move all the responses.

Each data location can store up to 10 or 12 responses, depending on whether the extra codes X and V are being used.  X and V are sometimes called A and B.

The default code settings are 1234567890 but can be extended to 12345676890XV or VX0123456789 in [Project global settings].

In character data X is "-" and V is "&".

Multi-coded

This also has answers from a list of responses, but in this case more than one response can be given.

Multi-coded questions are usually stored as two or more numbers of up to 4 digits to represent the response numbers selected.

The first data location is specified, along with the width (1, 2, 3 or 4), and also the maximum number of answers (repeats) that can be given for each questionnaire.  This is sometimes called a "spread field".  As an example, a multi-coded question with 999 responses and maximum responses of 4 would need 12 consecutive columns; four 3 digit numbers.

You can use "Fixed response locations" globally to give each (not refused) response its own set of columns in which to store the response number if the response is selected.

The response numbers are stored on the right hand side in the data location allocated for each repeat.

See Reference Manual, Questions, multi-coded question.

Individual response locations

In this case each response is allocated its own location and code, written as location/code, for example 123/5.

The first data location is specified and each responses location is held relative to this first data location.  Changing the first data location will move all the responses.

In binary data each data location can store up to 10 or 12 responses, depending on whether the extra codes X and V are being used.  X and V are sometimes called A and B.

The default code settings are 1234567890 but can be extended to 12345676890XV or VX0123456789 in [Project global settings].

In character data only code 1 can be used in each data location, so each response has its own data location written as location/1.

Integer

Integer answers are stored as a number of up to 9 digits to represent the value given.

The first data location and width are specified and the answer is stored on the right hand side in the data location allocated.

See Reference Manual, Questions, Integer question.

Float

Floating point answers are stored as a number with a decimal point of up to 20 digits, to represent the value given.

The first data location and width are specified and the answer is stored on the right hand side in the data location allocated.

The decimal point will not be stored in the same place in each record.

See Reference Manual, Questions, Float question.

Character

Character (text) answers are stored as a number of up to 2000 digits to represent the text given as the answer.

If the raw data structure is "Multiple lines per questionnaire", the answer cannot be broken, so the maximum width is about 70 characters depending on the number of data locations reserved for data structure information (serial and card numbers).

The first data location and width are specified and the answer is stored on the left hand side in the data location allocated.

See Reference Manual, Questions, Character question.

Date

The date is stored as YYYYMMDD, so the width is fixed at 8 and only the first data location is specified.

See Reference Manual, Questions, Date question.

Time

The time is stored as HHMMSS, so the width is fixed at 6 and only the first data location is specified.

See Reference Manual, Questions, Time question.

Verbatim

The answers to these questions are not stored in the fixed format data file and no data locations are allocated.

Do not use verbatim questions unless you are going to "code" the answers into an open-ended multi-coded question before data delivery.

See Reference Manual, Questions, Verbatim question.

None

There is no answer to be stored, so no data location needs to be specified.

Filters

Filters can optionally be stored in the raw data when a record is saved.  One data location is used and the value stored is:

0 (zero) if the filter is false

1 (one) if the filter is true