WinCross has commands that let you test statements and DECLARE, DEFINE, RECODE, ASSIGN and COMPUTE new and existing variables. You write statements using those commands in Setup|Glossary Variables.
Important: WinCross 15 and earlier versions required the use of ADDLEN with some glossary instructions such as ASSIGN, DEFINE and COMPUTE. Beginning with WinCross 16, you can now use the DECLARE instruction to create new variables and assign and compute values directly into the new variables without using ADDLEN. |
Looping logic in the Glossary allows you to combine multiple statements into a few logic commands.
Glossary statements can be written using IF/ELSE logic.
The use of glossary variables is optional. When you run tables, WinCross first reads the glossary variables and applies them to your data. You can also choose to create a new data file based on your glossary statements.
Since the statements you enter in the glossary variables dialog box are applied to your table, filter and banner logic, they can save you time and effort. For instance, just one change you enter in glossary variables can affect many of your already-defined logic statements. This feature is particularly useful in wave studies, where data locations change but table rows, filters or banners do not.
You can also use glossary variables to create new variables. For example, you might want to create a new variable so you can substitute the variable name for the record/column location when using ASCII data. Or, you might have a very complicated definition that you want to represent with a new variable. New and changed variables that result from glossary variable statements can be used in your table, filter and banner logic statements.
Glossary variables can also let you “clean” data files. For example, you might want to recode some current variables that were a result of assigned values or data entry errors. You can save glossary transformations by choosing Setup|Glossary Variables|Save Data As and optionally choose whether to use the glossary transformations when tables are run.
You can explore and clean data with the TEST command, which lets you create a list of respondents qualifying for the logic for the test condition.
Choose Setup|Glossary Variables to write statements using the following commands:
Setup|Glossary Variables also includes:
Each statement must be typed on its own line and can be entered in any case. Lowercase statements are converted to uppercase upon exit from the Setup Glossary Variables dialog. You can type in any position on the line. Each line can have up to ** 1024 characters, including blanks. Statements are evaluated in order, from top to bottom. A statement that creates a variable must appear before any statement that refers to that variable.
For ASCII data, statements must use a record number in front of the column number even if the data only has one record (for example 1/12:2 represents record number 1, columns 12 and 13).
The Setup Glossary Variables dialog box offers a right-click editing menu, from which you can choose Cut, Copy, Paste and/or Undo functions. Select All allows you to select all text at one time to Cut or Copy. A sixth function, entitled Check syntax, instructs WinCross to examine the statements you have entered for correctness.
Certain elements of the glossary can be color-coded according to either the WinCross job file color-coding defaults or the colors you assign to elements of the job file (see View|Job File Font and Colors).
When you run ExpressTabs, run tables, run a frequency, run a marginal, run simple weighting, run sample balancing or run factor analysis, if the Use glossary transformations option is selected, WinCross first reads the glossary statements and applies them to your data. Variables created in the Glossary using the DECLARE or DEFINE instructions, will be available in the list of variables to choose from when you run a frequency, simple weighting, sample balancing and factor analysis.
Choose Run TEST Commands to process TEST statements in the Glossary and/or to produce a Summary of Global Variables defined in the Glossary. Glossary statements that are entered as lowercase will be interpreted as uppercase when using this option.
Check Syntax
Select Check Syntax to perform a syntax check on all glossary statements. Glossary statements that are entered as lowercase will be interpreted as uppercase when using this option.
Select Save Data As to save your data file with glossary transformations applied.
View Data File Information can be helpful when writing Glossary instructions as a lookup for variable names in your data file without having to exit the Setup Glossary Variables dialog.
** WinCross logic using variable names is converted to record/column location when evaluating the length. In most cases the 1024 character logic limit when converted to record/column location will be different than the original number of characters using variables names. If the record/column location conversion results in more than 1024 characters, a syntax error will be issued indicating the logic is more than 1024 characters.
Related topics: