Change serial numbers

<< Click to Display Table of Contents >>

Navigation:  User Guide > Data > Handling raw data >

Change serial numbers

Companion

Every record (questionnaire) should have a unique serial number.  The serial number must be numeric and can be up to 15 digits long.

The serial numbers are stored in each record in the data file in a particular range of data locations specified in Project global settings.

This section describes how to add or change all the serial numbers in a data file using the Raw data view window.

This window can:

Allocate serial numbers

Change serial numbers

It also allows you to allocate new serial numbers when there are problems:

Faulty serial numbers (not a number)

Duplicate serial numbers.  The same serial number is used on two different records

If the raw data structure is "Multiple lines per questionnaire" it can also be used to:

Add missing card types

When used, new serial numbers will be placed in the data locations set in [Project global settings]. If the data already has serial numbers in these locations it will be replaced.

The new serial data location width must be large enough to hold the new serial numbers generated.

Adding serial numbers

This section describes how to add serial numbers to a data file that does not have them, or if the serial number is not a number (it contains letters).

Set the data location start and width (number of data locations) for the new serial numbers in [Project global settings.], make sure that there is no data stored in the chosen space

Open the data file, it will complain about faulty serial numbers (they are all empty) and duplicate serial numbers (they will all be treated as zero)

Collate the file, this will not alter the order of the records because they all have the same serial number

Tidy the file to replace (add) the new serial numbers, the records are given sequential numbers starting at the number you specify

Changing serial numbers

This section describes how to change all serial numbers in a data file.

Set the data location start and width (number of data locations) for the new serial numbers in [Project global settings], this may be the existing serial number location or it can be a new location; if it is a new location then make sure that there is no data stored in the chosen space

Open the data file

Collate the file

You can now instruct the program how to change the serial numbers.  You can:

Allocate new sequential numbers

Add a constant value to each serial number

Merge together two number values that already exist in the data

Merging data files

If two or more files are to be put together, it is important that every record in the combined file has a unique serial number.

If you need to merge two data files that use the same serial numbers you can alter the serial numbers in one file by adding a constant value to them all as described earlier.

For example, adding 1000 to serial numbers 20 to 450 will replace them with 1020 to 1450.  In this way, the original serial numbers can still be retrieved.

For repeated projects with a wave number, you can make a new serial by merging the wave number and the serial number together to make a new serial number.  For example, if the wave is 2 digits and the serial number is 5 digits then wave 2, serial 158 becomes serial 0200158.

Note: the original serial number will always be preserved in the ZZZSEQ question.