Skip to content

Overview

The DSC file is divided into the following 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 and can be repeated - for example, you can have some definitions, then some questions, then some more definitions, then some variables, then some more questions. However, you may only have one ROUTE section.

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()
}

:::tip Tip 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 @< syntax. 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"