Features of DK2Win

Command Line Switches
Command Line Arguments
New Interface Features
New DKapture Language Features
List Type Questions
Sample File Structure
Sample Configuration File
Calls File Structure
Instructions File Commands

Command Line Switches

SwitchDescriptionUsage
-$Use Sample Control System (no File menu, requires Sample file)Command line only
-=Use Briefing Mode (no calls, data or sample written)Command line only
-=XXXUse Briefing Mode (no calls, data or sample written) and always use serial number XXXCommand line only
-[Specify title bar annotation eg. -[ "Sect 5 of Svy 201"Command line only - must be a space between [ and annotation
-aXXXMakes DK2Win attempt to enter XXX random surveys. Any random data not routing through the survey after 50 attempts are put in a "_stuck" data file.Command line only
-bAdditionally, write data records to backup data file. Even if this switch is not specified, -b is assumed. To not produce backup data files, use -b0. If using new format (DBF) data file, will write backup records to .dat flat file. If using .dat flat file, will write backup records to dbf data file. If this cannot be done, it will write to flat .bdt file.Command line and menu
-cXXXSets the number of columns to layout single and multi answer texts.Command line and spinner control
-dRecords each call and stores them in WAV files. Requires headset plugged into PC's sound card. Default compression format is CCITT U-Law at 8KHz Mono. Format is set in the DKSTATIONS file using Superwin.Command line only
-dxRecords each call but does not store them in WAV files, unless the supervisor instructs a recording to be made during the call. -dx is useful when you want to only record certain calls, not all of them, and the supervisor chooses which calls to record.Command line only
-eOn Singles and Multis, use A for 10, B for 11 etceteraCommand line and menu
-fDo a single interview and then finish.Command line only
-gRun even if there is no session now, when starting the interview.Command line only
-hDo not allow any question starting with "DKDATA" to display on the screen. Only works with the -$ switch.Command line only
-iDisplay invisible question text (enclosed in curly brackets {...} ).Command line and menu
-jXXXSet the language for various messages to that specified by XXX, where XXX is the column number in the language database \DKFILES\DKEVTBL_$$$.DBF. Column 1 is headed "ENGLISH" and is used by default. You can add more columns and enter text to translate these into other languages.Command line only
-lLeave running even if the compiled file changesCommand line and menu
-mXXXBuffer Size (XXX in milliseconds) for monitored sound output. If not specified, buffers are allocated enough to hold 1/4 second of sound.Command line only
-nUnless data filenames are explicitly specified, use old format .DAT files for data (Flat file - eg. survey.dat) rather than the default format new format data file (Database - eg. survey_dat.dbf)Command line only
-qDisplay Questionnaire TimerCommand line and menu
-rSuppress embedded {RUN... commandsCommand line and menu
-sXXXXXX is the limit for the number of characters in a verbatim before it wiggly underlines misspelt words. If -s is used on its own, the limit is 255 characters. If -s is not specified, this defaults to 50 characters.Command line only
-tThis enables you to choose what audio codec to use when compressing audio, and gives more detailed diagnostics on-screen.Command line only
-uXXXRandomises route control type questions using just the serial number at the start of the survey, rather than both the serial number and the label of the question when the question is visited. If the optional XXX is specified, the route scrambling is done based on this number and the question label. If the same XXX is used, the same route through the questionnaire is taken, whatever the serial number.Command line only
-wXXXSet the Timeout (XXX in minutes, minimum 1, default 15) for Front and Sample Control ScreensCommand line only
-xMake windows full-screen (maximised) at inceptionCommand line only
-xxMake windows full-screen (maximised) all the whileCommand line only
-%Show the advanced options button on the sample control screenCommand line and Instruction File - must be used with -$
--Run in Menu System Mode (No Data Written, Sparse Screen)Command line only
-~Do not prompt if multiple copies of DK2Win are runningCommand line only

Command Line Arguments

DK2Win takes the following command line arguments :-

DK2Win {Compiled File} {Data File} {Sample File} [Optional Command Line Switches]

When the sample system is being used, the compiled file must be specified, and if the data file or sample file names are not specified, they are derived from the compiled file, but use the extensions _DAT.DBF and _SPL.DBF respectively. The path of the compiled file is what is assumed for pathless other arguments. So, you could load a sample job with :-
DK2Win -$ f:\surveys\New1\New1
which would load the sample system, with compiled file f:\surveys\New1\New1.cpd, data file f:\surveys\New1\New1_dat.dbf and sample file f:\surveys\New1\New1_spl.dbf

If the sample system is not being used, all command line arguments are optional, and compiled and data files can be selected interactively from a File menu or Open button. There is no sample file.

When a questionnaire has been loaded up, the title bar displays the full compiled file name and the full name of the data file to which records are being written.

New User Interface Features

When you are using the sample system (-$ command line switch), you can set a background image for the DK2Win screens by creating a bitmap file for the desired backdrop, and naming it \DKFILES\DK2LOGO.BMP. This image is stretched to the screen size if its width and height are greater than 260 pixels in size, otherwise it is tiled.

The question and answers screen has 3 sections. The top section displays the question text, and this is adjusted to show as much of the question text as possible, as you move from one question to the next. The middle section contains the answers to the question. This will be scrollable if there isn't enough room to display all of them, and a little yellow label appears on the screen telling the user that the answers can be scrolled. The bottom section is where you input the answers to the question. Focus is usually in this bottom section, and you can use the various keys to help scroll both the top and middle windows when there is a lot of question or answer texts, and to move around the questionnaire.

Entries marked with an asterisk are for sample system only :-

*F3toggles display of the front screen (with the respondent details on it)
*F4login as a different interviewer (only works from sample control screen)
*F5makes an appointment for this respondent
*F6gives up this interview
F7restarts the interview
F8use next index order (on list type questions)
Shift + F8use previous index order (on list type questions)
*F9on the respondent (front) screen, this shows their call history
F10take marked answers (on SHOW type questions)
Up and Down Arrow Keysscroll the answers window up and down
Control + Up and Down Arrow KeysScrolls the question text window up and down
Enter or F2moves on to next question (if this one is answered properly)
Control + Enter or F1moves to previous question, saving any changes to the answers on the current question
Control + F1moves to the first proper question, saving any changes to the answers on the current question
Control + F2moves to the last answered question (if this one is answered properly)
Control + F5displays the state of the survey so far, in the same format used for the Sample File DATARECORD field. The display can be copied and pasted which is useful when network/drive access becomes unavailable for whatever reason.
Shift + F1moves to previous verbatim question, saving any changes to the answers on the current question
Shift + F2moves to next answered verbatim question (if this one is answered properly)

List-type Questions

A list-type question is one where a long list of possible answers is presented to the interviewer in a scrolling grid. The columns are indexed so that you can sort the list and reach the desired answer quickly. List-type questions are handled using databases, which are presented in a grid on the question screen. All columns which do not end in _PCH are displayed in the grid. You can hide columns which end in "_PCH" so the user does not see them, although they can be used in subsequent punched list-type questions. The name of the list database is specified on the answer text (the no answer code for a single coded question, and on the first answer text for a numeric or an alpha coded question), but needs no extension, and no path if resident in the compiled file's directory. This can be optionally followed by /nn where "nn" is the ordering for the records (1 means the first column, 2 the second, and so on). When setting up the database, the columns should each be indexed in left to right order. This can be easily done using ViewDBFWin and clicking the column headers from left to right, in the database holding the options for the list-type question. On normal and punched list-type questions, the number after the slash indicates which column's data, for the record selected by the user, should be entered into this question. It defaults to 1 (the first column) if not specified. See also the question text directive {DEFAULT ...} below.

List-type questions can also be automatically answered using either the [PUNCH] directive, or the [SHOW] directive. PUNCH allows you to code a question from another column of the previously answered list-type question. SHOW allows you to code a list-type directly from another question in the survey. For example :-
.qlist1..
Which brand of kettle do you use at home?

9999)Kettle_Brands
0)
.qlistbrand..
Name of brand

80)Kettle_Brands/2
0)
[ALPHA PUNCH]
and the database Kettle_Brands.dbf contains fields CODE,N,4,0 and BRAND,C,80,0

New DKapture Language Features

In a DKapture questionnaire text file, certain new features are available :-

¬ ^ ~ and {} {R ...} {STORE} {DEFAULT ...} {OUTCOME} {STARTCALLREC}
{STOPCALLREC} {ZAPCALLREC} {PLAYSOUND ...} {EVAL ...} and {SHOW ...} {TIMER ...} {QUOTA ...}
{ONCE} {AUTO} {COLS=x} [D] {FONT ...} {PROGRESS=...}

If you use curly bracket directives in a question text, it is better to place them at the end of the actual question text itself, so as not to leave gaps on the question screen.

DKapture Data Output Formats The system will now write data to a .DBF format data file using the default extension _DAT.DBF, instead of the standard DKapture .DAT file, if you so desire. The advantage is that adding codes to a question or extending an alpha do not require data file rewrites. The disadvantage is that you can only have a maximum of 2,000 questions in a survey.

! and *
Prefixing a multi-code answer text with the ! character means that this code behaves like a no answer code, in that when this is checked, all other codes are unchecked, and if another code is checked, this code is unchecked. Basically, you cannot multi-code this !-prefixed code with other codes. If a code is prefixed with a * , then this code is fixed in its position when the question is reversed, rotated, or randomised. If you need to do both (fix the code position and make it uncheck other codes when selected), you must put the * before the !, for example, 7)*!Option 7.

#".QLABEL."
Prefixing the quoted question label with a hash sign (#) in the question text, substitutes the option codes selected if the quoted question is a single or multi, instead of the corresponding answer texts. Numerics are zero-padded on the left to the width of the question, and alphas put their non-zero-padded length in (0 if not answered).

¬ ^ ~ and {}
  • The delimiter ¬ is the Shift+` key (backwards single quote) on the UK keyboard - it looks like the top right corner of a box.
    Placing question text inside any pair of these delimiters will format its on-screen appearance according to the following rules (effects can be added together). Wiggly brackets make the text invisible (including the brackets themselves), so all question text directives do not appear on screen by default. On the Options Menu, you can make invisible text visible again, for questionnaire debugging purposes. For precise control over question text appearance, use the {FONT ...} directive. For online HTML text formatting, you should use <SPAN STYLE="...">some questionnaire text here<SPAN> instead. For help on what you can put in place of ... for styling, have a look at the W3 Schools site.

    ¬large, emboldened, red, Times New Roman text
    ^ gives italicised, bold, current font, current colour text
    ~ gives underlined, blue text
    {} gives invisible text


    {R ...}
    A randomised, reversed or rotated question which has {R ...} in its question text will take its randomisation seed from the question label specified after the R. This is useful if you want a randomised question, and then another randomised in the same random order used for the first. For example, the following 2 questions are randomised the same way :-
    .q1..
    {COLS=3}Randomly organised 1
    
    1)Option 1
    2)Option 2
    3)Option 3
    4)Option 4
    5)Option 5
    6)Option 6
    7)Option 7
    8)Option 8
    9)Option 9
    10)Option 10
    11)Option 11
    12)Option 12
    13)Option 13
    14)Option 14
    15)Option 15
    16)Option 16
    17)Option 17
    18)Option 18
    19)Option 19
    20)Option 20
    0)
    [r]
    
    .q2..
    {R Q1}{COLS=3}Randomly organised 2
    
    )=q1
    
    {STORE} (Cannot be on first question)
    Putting {STORE} somewhere in the question text, signifies a stop point to the DKapture engine. When this question is reached in a sample-based interview, the data so far is written to the sample file field DATARECORD. If an appointment is next up from the sample, the last stop point visited is the question to be restored up to, or, if there are no stop points, the last question answered.

    {DEFAULT value}
    When used on a list type question, this directive instructs the question to choose the option matching "value" automatically, if no option has been chosen for this question yet. The "value" parameter should be a number or string that matches a value in the column for this list type question. It can also be a quoted question, for example, {DEFAULT ".q1a."} would bring up the row matching the contents of question q1a, if the list type has not been answered yet.

    {OUTCOME} (Cannot be on first question)
    If a question text contains this string, then, when this survey is completed, the outcome will be coded as the textual answer to this question. If it is blank, or there is no {OUTCOME} question, the Outcome fields in the Calls and Sample files are coded with the standard "Complete" outcome code. For example,
    .qoutc.
    {OUTCOME}
    
    1)Long Complete
    2)Medium Complete
    3)Short Complete
    4)Complete
    [punch]=1 if qs3 2
    =2 if qs2 3 and dd2 1
    =3 if qw3 2 and dd2 2
    =4
    
    {STARTCALLREC} (Cannot be on first question)
    When a question has this in the question text, the program immediately starts recording the session. When the interview is ended, the recording is stored in a WAV file. The name of the WAV file is formed as follows :-
    Subdirectory Recordings off of the sample file directory
    sample filename_SNserial number_INinterviewer number_STstation number_call record number.WAV
    For example, F:\Jobs\W1048\Recordings\w1048_SPL_SN101_IN91_ST15_167.wav


    {STOPCALLREC} (Cannot be on first question)
    When a question has this in the question text, the program immediately pauses recording the session until the next STARTCALLREC is encountered. If the interview is ended before another STARTCALLREC is encountered, the recording up to the this STOPCALLREC is stored in a WAV file.

    {ZAPCALLREC} (Cannot be on first question)
    When a question has this in the question text, the program immediately stops recording the session and no audio is stored.

    {PLAYSOUND filename} (Cannot be on first question)
    If a question has this in the question text, the program will play the WAV file referred to by filename. If filename does not exist, nothing is played. Only plays the sound when arriving at the question in a forwards direction. Moving on past this question will cancel the sound if it is still playing.

    {EVAL expression} or {SHOW expression}
    {EVAL|SHOW IF dktest THEN expression1 ELSE expression2}
    {EVAL|SHOW CASE dktest1 : expression1 ; dktest2 : expression2 ; ... dktestn : expressionn ; [default :] expressiony}
    A question with {EVAL ...} or {SHOW ...} in the question text can be used to evaluate things at run-time. expression is evaluated and the answer stored in the question variable for EVAL, or shown at that point on the screen for SHOW. The expression can be any valid Advantage database expression and can contain MJ Library functions. It can also contain question variables from the questionnaire in the usual DKapture format (".q2." for example). Use of the # prefix (see above) is useful for evaluating calculations with quoted single questions. Additionally, EVAL and SHOW can take IF ... THEN ... ELSE and CASE constructs. These allow test conditions to determine what is evaluated as the response to this question, or shown in the question text. The format for the test condition is the same as that for the advanced search feature of DeditWin and DentryWin (in DVerify mode using command line switch --).

    The syntax for the DKapture test condition is :-

    [#]qlabel [not] code(s)|~blank~ [and|or ...]

    Keywords not and ~blank~ are case insensitive. Square brackets denote optional elements. Prefixing the question label with # means that this is a floating point test. You can test EVAL'd ALPHAs using this notation, and the extent of multi-punching. Codes can be comma-separated ranges, single number(s), open-ended ranges like 6- (for numerics), or search strings for matching alphas. Search strings can contain wildcards ? and *, or be prefixed with mjre: for regular expression matching. If the search string contains spaces, then wrap it with double quotes. Brackets are allowed. For example,

    Q1 not 1-3,6 and (Q3 ~BLANK~ or Q4 "ch *m")

    would match data records where q1 was not coded 1, 2, 3 or 6 and, either q3 is not coded or q4 contains the string ch *m as in "such a mess".

    Here are a couple of example questionnaires that demonstrate some of the capabilities of EVAL :-

    .q1..
    Pick an expression
    
    1) 3+4*5
    2) mjsin(mjpi()/2)
    3) 4*(8-(-5))
    4) mjshortdate(date())
    5) I'll enter my own, thankyou very much.
    
    []>q2 if not 5
    
    .q1a..
    Enter your expression (not that on your face, smarmy.)
    
    250)
    [ALPHA]
    
    .q2..
    {EVAL IF Q1 NOT 5 THEN ".q1." ELSE ".q1a."}
    
    250)
    [ALPHA]>qdsp if q1 not 5
    
    .qdspa..
    ".q1a." = ".q2."
    
    []>mjend
    
    .qdsp..
    ".q1." = ".q2."
    
    .mjend.
    
    [0]
    Here is an example questionnaire text that demonstrates the use of the EVAL statement with an IF ... THEN ... ELSE construct and #-prefixed quoted questions :-

    hellosir,5
    .q1..
    Pick an answer
    
    1) Opt 1
    2) Opt 2
    3) Opt 3
    4) Opt 4
    5) Opt 5
    
    .q2..
    {EVAL IF q1 2-4 THEN #".q1."*#".q1." ELSE #".q1."+9}
    
    16)
    
    .qdsp..
    q2 came out as ".q2."
    
    {TIMER [formatstring]}
    A question with this in it is auto-answered with the time taken so far in seconds to reach this question, if the optional formatstring is not specified, otherwise, it is answered with the current date and time in the format specified and described by the following table :-

    SpecifierDisplays
    cDisplays the date using Short Date Format, followed by the time using the Long Time Format.
    dDisplays the day as a number without a leading zero (1-31).
    ddDisplays the day as a number with a leading zero (01-31).
    dddDisplays the day as an abbreviation (Sun-Sat).
    ddddDisplays the day as a full name (Sunday-Saturday).
    dddddDisplays the date using the Short Date Format.
    ddddddDisplays the date using the Long Date Format.
    mDisplays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
    mmDisplays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
    mmmDisplays the month as an abbreviation (Jan-Dec).
    mmmmDisplays the month as a full name (January-December).
    yyDisplays the year as a two-digit number (00-99).
    yyyyDisplays the year as a four-digit number (0000-9999).
    hDisplays the hour without a leading zero (0-23).
    hhDisplays the hour with a leading zero (00-23).
    nDisplays the minute without a leading zero (0-59).
    nnDisplays the minute with a leading zero (00-59).
    sDisplays the second without a leading zero (0-59).
    ssDisplays the second with a leading zero (00-59).
    tDisplays the time using the Short Time Format.
    ttDisplays the time using the Long Time Format.
    am/pmUses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
    a/pUses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
    ampmUses the 12-hour clock for the preceding h or hh specifier, and adds the relevant AM/PM string.
    /Displays the date separator character given by the current locale.
    :Displays the time separator character given by the current locale.
    'xx'/"xx"Characters enclosed in single or double quotes are displayed as is, and do not affect formatting.

    For example, {TIMER hh:nn:ss} would stamp military time into the question.

    {QUOTA HOLDUP|HOLDUPB|RELEASE|NOACTION QuotaGroupNumber|QuotaGroupDescription} (Cannot be on first question)
    Having this construct in the question text of any question apart from the very first question in the survey, will perform a quota count and, if the relevant Quota Group's target is met, hold up or release the quota group, unless NOACTION is specified, in which case, it does nothing except fill in the underlying question with the distance to the target. In a sample-based interview, the data so far is written to the sample file field DATARECORD when this type of question is reached, so that if quota control causes a problem, the data is safe. The quota group description or number can be specified as quoted answers from the survey. The count is defined by the DKapture data expression syntax in the quota record for that group. What is held up or released is defined by the corresponding Sample definition XBase expression syntax. Both expressions have to evaluate to true or false for each data or sample record. If the underlying question is not a routing or display type, then the distance to the target is stored in it. This question can be single, multi, numeric or alpha. The answer to this question will be bounded by the frame of the single or multi, or the range of the numeric, or unbounded (negative values possible) if it is an alpha. All quotas are counted up every time a data record is posted to the data file. Only type 1 quotas with action words HOLDUP, HOLDUPB, or RELEASE are considered for hold up/release. For example,
    .qquota1.
    {QUOTA HOLDUPB ".agegroup."}
    
    9999)
    0)
    
    More details on quotas can be found in the SuperWin Features help page.

    {ONCE}
    This directive tells the system that this question, containing an {EVAL, {RUN, or {QUOTA, can be filled in just once. {QUOTA's are only filled in during DK2Win in sample mode (-$). {TIMER's are never recalculated, once they have been filled in (always {ONCE} by default), even in DK2Win.

    {AUTO}
    This tells the DKapture engine that the question answers itself and moves on automatically to the next question. It can be used on both {RUN ...} and {EVAL ...} type questions. If {AUTO} is not used, then the answer is populated (once if the {ONCE} keyword is used) and then presented to the interviewer for editing.

    {COLS=x}
    Having {COLS=x} in the question text will force this question to be displayed in x columns.

    [D]
    This used to be used to display the serial number on the question screen for this question. Since the serial number is shown all the while, this is now used to Alphabetise a coded question, so that the answer texts are sorted alphabetically before being displayed on the screen. Codes with no answer text at all, go to the bottom of the list, and so do those with an answer text of "-" (do not display this option). Fixed codes (answer text prefixed with an asterisk "*") which occur before any normal codes, go at the top of the list, and fixed codes occurring after any normal codes, are put at the end of the list in the order they are encountered, but before the no answer code, if there is one.

    {FONT [fontstring]}
    This lets you change the font of the question text to anything you like. If fontstring is omitted, the font is restored to the default for question texts for that user. The format of fontstring is :-

    font name/point size/colour number/NNNN where NNNN are Y's or N's denoting Bold, Italic, Underline, and Strikeout respectively. You can also use B I U and S in place of Y to make the font definition more readable. The colour number can be looked up in the dkfiles\mjcolours.dbf database file which lists colour names with their numbers and HTML hex codes.

    For example, {FONT Verdana/9/19350/YYNN} or {FONT Verdana/9/19350/BI} would render any question text following it (up to the next {FONT ...} directive or the end of the question text) to be in Verdana font, size 9 point, colour brown, emboldened and italicised.

    {PROGRESS=value}
    This will set on-screen progress indicators to reflect this value, rather than the default calculation of the question number you are currently on as a percentage of the total questions in the survey. value should be a percentage between 0 and 100.

    Sample Files

    There are several different sample files used in a session.

    Main Sample Members File

    This is specified on, or derived from, the command line. It is created and populated by the SuperWin Create or Top Up Sample File function, and it should contain the following fields :-

    Field NameField TypeLengthDescription
    SERIALNONumeric10 Serial number for this sample member
    CONTACTCharacter120 Contact name and/or organisation
    TELNOCharacter80 Telephone number details
    OTHDETSMemo- Important details for this sample member
    NOTESMemo- Scratchpad notes for this sample member
    STATUSNumeric10
    0Fresh4Being Interviewed
    1Finished With (Complete, Refused...)5Held Up Appointment
    2Appointment7Internal Fresh Pending Release
    3Held Up Fresh9Internal Appointment Pending Release
    OUTCOMECharacter50 Last outcome for this sample member
    NUMCALLSNumeric10 Number of calls so far for this sample member
    NOANSWERSNumeric10 Number of no answers so far
    QUOTAGRPSCharacter250 A string field that stores the quota group numbers belonged to. It is filled to its width with comma-separated matching quota group numbers (from the quota field QUOTA_IDX) when a user does a full count up of quota groups in SuperWin (see the documentation for the field COUNTUPSPL in the quotas section)
    LIDATEDate- The date that any interviewer last talked to a respondent for this sample member (recorded an "Answered" call)
    LITIMECharacter8 The time that any interviewer last talked to a respondent for this sample member (recorded an "Answered" call)
    LASTDATEDate- Date of last call
    LASTTIMECharacter8 Time of last call
    APPT_DATEDate- Date of last appointment
    APPT_TIMECharacter8 Time of last appointment
    STATIONNumeric10 Station number for last call
    INTERVIEWRNumeric10 Interviewer number for last appointment
    PRIORITYNumeric10 Priority of last appointment
    NQWERONNumeric10 A numeric integer representing the question number last visited
    NREALQSNumeric10 A numeric integer representing the maximum number of proper questions answered excluding questions answered from the sample record (DKDATA fields)
    TIMESOFARNumeric10 Total time in seconds for all calls (excluding "Sample Cancelled" outcomes) made for this sample member
    DATARECORDMemo- Stores all the data from the last call, if enough questions are answered
    NOTESLKUPCharacter50 A spare string field for lookups or anything else you might need it for
    SPARECCharacter100 A spare character field to use as you please
    SPARENNumeric20 with 10 dps. A spare numeric field to use as you please
    SPAREDDATE8 A spare date field to use as you please

    Additionally, sample data fields DKDATA1, DKDATA2 ... can exist for reading into the first few questions of the questionnaire. If these fields exist, and there is data in the DATARECORD field, the DATARECORD contents take precedence over the DKDATA fields.

    The DATARECORD field is used to store the data from a part-completed interview, usually as a result of making an appointment. The format for storage of data is
    question label==data
    for each question that has been answered (including punch-types). If you are partway through the interview, the question label you were on is stored in an extra DATARECORD pseudo-variable called @@QWERON@@. When a sample record is read back for interviewing, and there is data in the DATARECORD field, the data is entered into the questions specified by the question labels, and then the questionnaire is routed through until the last doable/recorded (@@QWERON@@) question is reached, or the last stop point has been reached. Stop points are specified by having {STORE} somewhere in the question text in a DKapture questionnaire text file. If a question label in the DATARECORD field cannot be located in the questionnaire, you will see the message "Data does not match compiled file - it will be ignored." and you will start with a fresh questionnaire.

    An example sample record with appointment data in it might look like this :-
    SERIALNO   217710
    CONTACT    B Jacobs
    TELNO      0208  270447
    OTHDETS    Executive on BT Board
    NOTES
    Prefers afternoons/evenings
    STATUS     1
    OUTCOME    Complete
    NUMCALLS   4
    NOANSWERS  0
    QUOTAGRPS  ,2,
    LIDATE  23/10/2002
    LITIME  10:02:10
    NOTESLKUP
    LASTDATE   23/10/2002
    LASTTIME   10:27:11
    APPT_DATE  22/09/2002
    APPT_TIME  17:15:20
    STATION    0
    INTERVIEWR 0
    PRIORITY   100
    NQWERON  184
    NREALQS  92
    TIMESOFAR  2879
    DATARECORD
    Q1==2
    Q2==010
    Q3==D392
    Q4==f873
    QZ==F873
    Q5==7
    @@QWERON@@==Q6
    

    Sample Configuration File

    DK2Win looks for this file whenever a compiled file is loaded under sample control. It first looks in the same directory as the sample file for a file called SAMPCTRL.TXT, and if none exists, it looks in the DKFILES directory. If it cannot be found in either place, the program exits with an appropriate message. The file contains information about limits and times for the control of the sample, and these parameters can easily be changed using SuperWin. The parameters are stored in a text file. You can enter numbers for these parameters, or you can enter sample file expressions. See SuperWin Sample Control Parameters for more details. Here is an example :-

    *Engaged rebook time (mins.)
    11
    *No answer rebook time (mins.)
    86
    *Questions answered to write data to field DATARECORD
    4
    *No. of no answers before giving up
    3
    *No. of unobtainables before giving up
    4
    *Time limit (mins.) after appt. time before any interviewer can have it
    25
    *List of Give Up Codes
    Refused
    Not Available During Field Work Period
    Non-eligible Respondent
    Not Applicable
    Wrong Number
    Evacuate Building
    Other
    
    Comments in the file are prefixed with an asterisk. Lines must be in the order given above. The Give Up codes list is exactly what appears on the Give Up drop down menu list when giving up an interview, and can contain as many texts as you like. The Give Up code picked from the list, is what is written to the OUTCOME field in the calls files and the main sample members file.

    Calls Files

    Whenever any action is taken with a sample member, a record of that action is written to a database file called CALLS.DBF in the same directory as the sample member file. This same information is also written to a global calls file called CALLS.DBF in the DKFILES directory on the same drive as the sample members file. The fields are as follows :-

    Field NameField TypeLengthDescription
    SERIALNONumeric10 Serial number of sample member
    CALLDATEDate- Date of the call
    CALLTIMECharacter8 Time of the call
    OUTCOMECharacter50 Outcome of this call
    INTERVIEWRNumeric10 Interviewer number who made call
    STATIONNumeric10 Station number of PC that made this call
    DURATIONNumeric10 Time in seconds spent on this call
    CPDNAMECharacter250 Full name of the compiled file this call was for
    SESSIONNumeric2 Denotes which session of the day this call was done in

    Sample Instructions File

    The environment variable STN sets the station number for the machine DK2Win is running on. Whenever the sample control screen is showing, the system checks for the existence of an instructions file every 7 seconds. The instructions file is called DKINSTRUCT{STN}.TXT where {STN} is the station number, and the file resides in the DKFILES directory on the same drive as the sample members file. It contains lines of plain text telling the sample control system what to do next for this station. The instructions are case insensitive. Allowable instructions :-

    EXITClose the application
    ADVSHOWShow the advanced options button on the sample control screen
    ADVHIDEHide the advanced options button on the sample control screen
    LOAD ser.no.Start up the sample member specified by serial number ser.no.
    RELOAD commandlineLoad this station with a new project specified by commandline

    As each instruction is acted upon by DK2Win, the line is removed from the file. When the last instruction has been read from the file, the file is deleted. For example, to make station 7 load sample member serial number 3048 at the next opportunity, simply type the following at a DOS prompt :-

    echo load 3048 > \dkfiles\dkinstruct7.txt

    This can be more easily achieved by using the DKapture Supervisors Sample Management System SUPERWIN where you can press Ctrl+I to get an "Instruct Stations" Screen. There you can instruct ranges of stations to do things, in a much more user-friendly and graphical manner.
    Back to the Top
    Back to DKapture Help Index


    © DK Computing