Company News Products Projects Texts Museum Download Contact Map RSS Polski
YAC Software Museum DataGate Suite Trybiks' Dive



DataGate Suite

Script Language

Reserved words

DataGate Suite
Applications for manual entry of questionnaire data: DataGate Studio for the development of scripts that control the process in the data entry program DataGate Station. Details:

DataGate Studio

This is an editor for script development integrated with modules that check and test scripts as well as check and process the entered data.

As an editor, it includes all standard editing functions:
  • undo/redo,
  • full set of block operations,
  • standard, line and column blocks,
  • search and replace,
  • bookmarks.
The following functionality helps in script development:
  • syntax highlighting,
  • reserved words templates,
  • macros for definitions of more complex structures of fields:
    • field groups,
    • multi-choice questions,
    • single-choice questions with additional text responses of the type "other",
    • open-ended questions;
  • checking script correctness,
  • list of found errors and navigation between those errors,
  • test running of the whole script or just a part of the script,
  • full help on specific reserved words and on script development in general.
Additionally, the following functions facilitate working with entered data:
  • merging of many data sets with deleting partial records,
  • viewing the data,
  • viewing the distribution of values in a field,
  • checking data correctness,
  • splitting data by records,
  • splitting data by fields,
  • exporting data and field descriptions to SPSS.

DataGate Station

This program is used mainly for data entry itself. The two screenshots below correspond to the script presented earlier:


Script language

Full documentation of the script language ca be found here.


Differences between WD and DGS
  • File format:
    • In WD, the number of definitions is limited by the memory available to real mode DOS programs (max. 640 kB); DGS uses all available memory.
    • In WD, the maximum number of characters per line is 255; DGS has no such limits.
  • Script interpretation:
    • If there's an error in the script, WD stops on the first error encountered; DGS reports all found errors.
    • WD uses Polish reserved words; DGS can use Polish (for backward compatibility) or English reserved words.
    • WD divides long pages automatically into smaller ones (screens) - on a single page there can be at most 21 fields; DGS pages can contain any number of fields.
    • Comments in WD can be at most 76 characters long, left descriptions of fields - 20 characters long, right descriptions of fields - 49 characters longs; DGS has no such limits.
    • The maximum width of a text field in WD is 48 characters; in DGS the limit is 255 characters.
    • Labels in WD cannot contain underscore characters; DGS supports this.
    • DGS has stronger control of valid value ranges: ranges cannot overlap, range limits have to be specified in the correct order, and all values in the range have to fit in the field's width.
    • In DGS, the automatic value must belong to the range of valid values.
    • In DGS, special non-numeric auto values can be defined for numeric fields.
    • DGS controls active filter values - these must belong to the range of valid values and cannot cover the entire range of valid values.
    • Additional warnings in DGS: unused label, no left description, unable to create a variable name based on the left description, duplicate variable names.
    • New instructions were added to DGS scripts that facilitate data exporting to SPSS: VALLAB, VARLAB and VARNAME.
  • Operation: in DGS, standard line editing is available; in WD, entered characters can only be overwritten.


Processing and analysis of the entered data is facilitated by the following command-line utilities:
  • Merger - merges data files and checks their format,
  • Checker - checks data correctness against script rules; creates a report on error types and numbers by coders,
  • Payroll - calculates the minimum number of keys punched needed to enter the data; creates a report of entry costs by coders,
  • TopLine Reporter - fast creation of tabular reports:
    • data weighting and filtering,
    • frequencies and cross-tabs,
    • automatically creates tables for all fields from the given range,
    • counts and percentages,
    • row, column and total percentages,
    • identifies significant results,
    • significance is computed on three levels: 0.05, 0.01 and 0.001;
  • LogiQ - checks data against additional rules that can define complex relationships between many fields; creates a report on error types and numbers by coders,
  • Belfer - compares data before and after cleaning; creates a report on error types and numbers by coders,
  • Multi - converts sets of multi-value variables into dichotomous variables.


First versions of these applications were written in 1997. From the very beginning they were implemented in Delphi and ran on Windows 3.11 and Windows 95. The scripting language was based on earlier programs WD/PD/KD written by Wojciech Niepokojczycki (scripts from those programs should run without any problems in DataGate applications).

Although these programs were written in Delphi 2, DataGate Station was then compiled in C++Builder 3 to make it executable on Windows 3.11 with the Win32s library (compiling it in Delphi 2 was not enough). Of course, all kinds of Win16 limits had to be adhered to then (such as the maximum size of data structures - couldn't exceed 64k, or available system resources). What's worse, the program reported Access Violation errors in places where the memory allocation code was obviously correct. What's funny, the method below worked amazingly well:
    x := GetMem(n);
    x := GetMem(n);
Why Windows 3.11? Well, most of the key punchers had computers with this operating system (or at least computers that wouldn't let you run Windows 95). After all, earlier programs required only DOS... That's why I initially spent a lot of time trying to squeeze these programs into Windows 3.11 (without going back to Delphi 1). I never managed to get rid of all those AV errors... Fortunately, after less than a year, we decided to move data entry to Windows 95 and I finally could compile the program for Win32 - all errors caused by the Win32s approach disappeared immediately. But some of the implemented solutions remained in the code for a long time yet...

First versions of these applications had also different names: DEDAL (Data Entry Developer and Librarian) and DESAS (Data Entry Stand-Alone Station).

DEDAL came first - I wrote the program to help my wife run the Data Entry Dept. in Millward Brown SMG/KRC (when she was its manager and still wrote scripts in WD). DESAS was created when the memory limits of WD forced splitting up of the big TGI (Target Group Index) scripts into 3 smaller ones. In DESAS, you could handle all the data in a single script.


Clients Top

Download a demo