Split data records

You may use this method to split data records if a little QPSMR CL expertise is available. Users enter the data in the same collection order.

It will help if you allow extra space in the serial number width when defining the questionnaire. The conversion will be much simpler if you use fixed format data rather than CSV data.

The program writes a simple CL recode to produce a new data file. This new data file will contain a record for each repeat.

The recode:

  • Reads a questionnaire.
  • Changes the serial number by placing a 1 in an unused serial column. The program places a ‘1’ in an unused location at the end of the questionnaire, then outputs a copy of the data. This will serve for respondent tables and the first repeat
  • Changes the serial number by placing a 2 in the serial column. The program places a ‘2’ in the location at the end of the questionnaire, then copies all second repeat locations to overwrite the first repeat locations. CL then outputs a copy of the data, which will serve for the second repeat.
  • The program will do this again for any further repeats. If you need more than 9 repeats, then you will need two unused data locations in the serial number.
  • You then copy and change the QDF to delete all second and subsequent repeats. The program adds a new question called REPEAT, which picks up the extra repeat number from the end. The program then uses this in turn to make a variable called LEVEL which has two responses:
    • LEVEL/1 is REPEAT/1 (respondent)
    • LEVEL/2 is T (true) (product)

If you run tables from the new data file with the new QDF, the program will filter all product based tables on LEVEL/2. It is no longer necessary to produce a product table for each repeat, because you can do this by feeding in a new questionnaire data record for each repeat.

The main problem with this method is that each questionnaire is split into separate records, which you cannot cross-reference. For example, you cannot refer to any product on respondent based tables, nor can you refer to products other than the product being analysed in product based tables. You can overcome this difficulty by defining new variables which you then add to each record during the CL conversion.