NIPO ODIN Version 5.17

Previous Topic

Next Topic

Scenario: *ALPHA for MBCS Storage

For each *ALPHA field of a questionnaire for MBCS output, the NIPO ODIN script writer needs to take the following steps:

  1. Determine the length of the required maximum amount of actual characters that may be entered (by the interviewer / by the web respondent). Set this as length of the actual input *ALPHA field.
  2. Determine the maximum possible amount of required bytes for data storage. A good convention for this is to multiply the length of the *ALPHA field with 3 (the maximum amount of bytes per character in most MBCS (multi-byte languages)).
  3. Create a dummy *ALPHA question. The positions of this dummy must immediately succeed the positions of the previously defined *ALPHA question.
  4. The length for the dummy should equal the result of the calculation at 2 minus the length of the original *ALPHA field. Fewer positions may be used, but will result in truncated text. Using more positions is recommended.

Shortcut method for steps 1-4:

The definition of a successive (dummy) *ALPHA field can be avoided by defining an *ALPHA field and multiplying its length by 3. This results in enough storage space to store an answer of the originally intended length. No dummy needs to be created, and the MBCSFields setting only needs to refer to a single *ALPHA field. Moreover, an exported data file (definition) contains a variable reference for the complete field; dummy usage requires a reference to the complete field. The disadvantage is that the maximum amount of characters to be inserted by the NIPO CATI Interviewer or web respondent cannot be controlled. The length of the *ALPHA field explicitly decides the maximum amount of input characters. As a result, excess data may be truncated and the answer may be incomplete.

  1. Configure the set of positions occupied for this MBCS field in the survey configuration file. The following section, setting and format are used:

    [Config]
    MBCSFields=posLlen[,posLlen, ...]

    Multiple fields may be specified, separated by commas. The position indicates the start position of the original *ALPHA field whereas the length specifies the total length of bytes (not characters) that may be written. In case of step 1-4 the length will be of the two fields together.

    For omnibus surveys, the following setting names exist:

    MBCSFields for the main (first) survey of the omnibus as described above
    MBCSFieldsNN for unnamed sub-surveys (name is not known) of the omnibus, where NN is 01-99 and 01 is the first sub-survey.
    MBCSFieldsSURVEY where SURVEY is replaced with the name of the sub-survey.
  2. The system truncates the input of the first *ALPHA field into the positions specified by the MBCSFields value, left aligned. Trailing spaces are inserted after the text to fill the field specified by MBCSFields.

The raw U-file is MBCS-encoded with fixed positions. This data can immediately be used for NIPO Diana output. The NIPO ODIN Developer 32-bit exports for these MBCS files are flawless as long as the data format is retained. However when the data format is not retained, the positioning of data during export may result in shifted positions again because the export, too, uses Unicode internally. In this case, the following steps are required:

  1. NIPO ODIN script writer uses the ODIN Developer 32-bit to export data to NIPO Diana / Nvision Script as the data format is always retained.
  2. On the basis of the exported VAR and DAT files, NIPO ODIN script writer uses NIPO Diana / Nvision Script to create an export for the required product such as IBM SPSS, Quantum, et cetera.

You must specify the MBCSFields setting for each *ALPHA field that you want to store as multi-byte. It is the NIPO ODIN script developer's responsibility that the field length is sufficient. For instance, typing 10 Chinese or Japanese (double-byte) characters requires a *ALPHA L10 field, but the MBCSFields must be 20 positions (each double-byte character is stored in 2 positions). If the MBCSFields is shorter than twice the *ALPHA field, the Chinese text is truncated.

You can not 'combine' fields. For example, MBCSFields=101L30,131L30,161L30 can not be combined as MBCSFields=101L90.

There is no validity check to see if the MBCS fields really match *ALPHA fields defined in the questionnaire. This means that data may be overwritten or truncated, or that the MBCSFields definition points to the wrong positions.

This functionality not only applies to the NIPO CATI Client, but also to the STRAND tool and the NIPO CATI Standalone system. This means that you might correct errors by changing the survey configuration file accordingly and exporting the data through the NIPO Strand Tool (STRAND.EXE).

This feature should only be used by expert NIPO ODIN Script writers. For this reason the setting is not accessible to the Fieldwork Manager, unless they edit the survey configuration file directly.

To be able to convert multi-byte characters correctly, you must also specify the code page that the NIPO CATI / Web Master should use for the conversion of your multi byte characters in the survey.INI file:

Survey configuration of questionnaire A1234 using code page932

[Files]
Q=""A1234Q:932""

The code page number should be supported by the NIPO CATI / Web Master computer. Check the Control Panel > Regional and Language Settings / Regional Options > Advanced settings for supported code pages.

See Also