Overview

Search:

Overview

The questionnaire is specified in the DSC script which is a text file containing a logical description of the questionnaire. This article provides an overview of the DSC structure with some examples. Fuller descriptions of the QUESTIONS and ROUTE sections are available from the menu on the left.

The DSC file is divided into four main sections:

  • Definitions - question types shared by more than one question
  • Questions - define the questions
  • Variables and functions - for computations in the route section.
  • Route - the order the questions are asked and the rules for asking them

Each section begins with the section name.

DEFINITIONS

Used for item lists or frequently used responses (yes/no, satisfaction scale, brand lists etc)

Examples

DEFINITIONS lst_satis = { 1 "Very satisfied", 2 "Satisfied", 3 "Neither satisfied or dissatisifed", 4 "Dissatisfied", 5 "Very dissatisfied" } lst_gender = { male (M) “Male”, female (F) “Female” }

Definitions can then be used in the Questions section as in the first example (question QsatisL) below:

QUESTIONS

This section defines the questions : the question text, the categories, the type etc

QUESTIONS

Q1 "Do you use product X?" : { Y (1) "Yes", N (2) "No" }

Qsatis "How satisfied or dissatisfied are you with Product X?": { 1 "Very satisfied", 2 "Satisfied", 3 "Neither satisfied or dissatisifed", 4 "Dissatisfied", 5 "Very dissatisfied" }

QsatisL "How satisfied or dissatisfied are you with Product X?": lst_satis

Q3 "What do you think of Liverpool?" : OPENTEXT

Q4 "How many bananas?" : INTEGER

Q5 "What is your weight in kilograms to 2 decimal places?": DECIMAL (5,2)

VARIABLES

In this section all the variables and functions used to program the questionnaire must be declared.

VARIABLES

c1 : CANVAS i : INTEGER j : INTEGER k : INTEGER n : INTEGER s : STRING nbq7 : INTEGER urlso : STRING urlqf : STRING rotq30[4] : INTEGER

FUNCTION GETQUOTA RETURNS INTEGER FUNCTION INCQUOTA RETURNS INTEGER

ROUTE

This section is used to define the question order, the rules for when questions are asked (conditions) and any logical checks or messages.

ROUTE

NEWPAGE() MESSAGE("Can we start by asking about @U$Product X@$") ASK(Q1) ENDPAGE() IF (Q1 IN {Y}) THEN { NEWPAGE() ASK(Qsatis) ENDPAGE() }

Note that the case, upper and lower, of the characters used in this file is taken into account by the system during the generation of the questionnaire. To aid legibility and simplify maintenance it is helpful to adhere to layout conventions.

INCLUDING SCRIPT FILES

The DSC can include the contents of other script files by using the @ command.This makes it possible to partition the DSC into several subsections.

Examples:

q4list = { @<"q4list.dsc" }

QUESTIONS @<"section1.dsc" @<"section2.dsc" @<"section3.dsc" ROUTE @<"route1.dsc" @<"route2.dsc" @<"route3.dsc"