Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 1
BASE PROFESSIONAL
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 2
Contents
1 Overview ............................................................................................................. 3
1.1 STARTING PROFESSIONAL _____________________________________________ 3
1.1.1 Professional Window ....................................................................................................... 4 1.1.2 Menus .............................................................................................................................. 6
1.2 FILE TYPES WITH PROFESSIONAL _______________________________________ 6
1.3 PROFESSIONAL TOOLBARS ____________________________________________ 7
1.4 CREATING A NEW SURVEY ____________________________________________ 7
1.4.1 Metadata ......................................................................................................................... 8 1.4.2 Web - Routing Section .................................................................................................... 9
1.5 OPENING AN EXISTING SURVEY _________________________________________ 9
1.6 SAVING AND CLOSING A SURVEY ________________________________________ 9
1.7 TOOLS IN DETAIL ___________________________________________________ 9
1.7.1 MetaData or MDM Explorer ............................................................................................ 9 1.7.2 Locals Pane ................................................................................................................... 11 1.7.3 Using the Expressions Pane ......................................................................................... 12 1.7.4 Breakpoints ................................................................................................................... 13
2 Change Control ................................................................................................ 15
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 3
1 OVERVIEW
Professional is a complete set of tools that supports the building of automated market
research processes. Professional includes an integrated development environment (IDE)
that enables you to create, edit, run, and debug PASW / Dimensions scripts. In simple terms
this is computer software that assists programmers in developing scripts.
Two additional options are available for Professional:
The Interview Option includes components that enable you to develop and test
interviews, and activate them in Interviewer Server.
The Tables Option includes components that enable you to create batch tables
using a script.
1.1 STARTING PROFESSIONAL
To launch Professional, follow the steps below:
Start (From the bottom left corner of Windows)
All Programs
IBM SPSS Data Collection 6
Base Professional
Base Professional
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 4
1.1.1 Professional Window
The individual panes are described in more detail in the table below.
Tab Panel Description
Edit
This is the main part of the desktop, where you edit your files.
If you open an interview script (.mdd) file, the Edit pane is separated into a
Metadata section and one or more Routing sections. By default, the
individual sections can be selected by clicking on the tabs at the bottom of
the Edit pane.
Breakpoints Lists the breakpoints that have been set in a script. When you are
debugging, you use breakpoints to indicate points in your code at which
you want to suspend the running of the script--for example, so that you can
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 5
Tab Panel Description
then step through the following lines.
Output Displays status and other information when you run a script using F5.
Expressions
Use this pane to evaluate an expression or inspect the value of a object
property when you are debugging a script. You can also use this pane to
change the value of a variable. You can also use the Expression pane to
change the value of a variable. For example, if you type a = 15 into the text
box and press Enter (or alternatively, click Execute), Professional will set
the value of the variable to 15.
Find Use to search for text.
Replace Use to search for text and replace with a different text.
Browser Use this pane to interact with the interview when you run an interview script
(.mdd) file.
Workspace
Lists the files in the current workspace. The workspace feature is
particularly useful when you are working on a number of linked files--for
example, a data management script (.dms file) that has a number of
associated Include files. You can add new and existing files to the
workspace by right-clicking in the Workspace pane and choosing Add New
Item to Workspace and Add Existing Item to Workspace, respectively. See
the topic Using the Workspace Feature for more information.
Metadata
Use to browse the questions, variables, and categories in a metadata
document (.mdd) file. This is useful when you need to refer to individual
variables and categories in your script.
Types
Similar to the Visual Basic Object Browser, this shows the properties and
methods of all of the default objects and details of the associated
enumerated constants. Similar information is shown whenever possible for
objects created in the script. When you click on an object, its properties and
methods are listed. To insert a property or method into your code, right-
click it, and from the shortcut menu, choose Add member.
Functions
Lists all of the functions in the Data Collection Function Library, showing
brief details of their parameters. To insert a function into your code, right-
click it, and from the shortcut menu, choose Add Function. For detailed
information about the functions, see PASW Data Collection Function
Library.
Locals Shows the values of the variables in your script when you are debugging it.
Auto
Answer
Shows a list of the questions that have been answered when you run an
interview script (.mdd) file in Auto Answer mode.
Repository
Shows all currently defined Question Repositories. You can navigate for
topics and survey assets, and add asset metadata and routing information
to the working .mdd file.
Help
Shows context-sensitive help topics. To access context-sensitive help,
select an element of your script and press F1, See the topic Using Context-
Sensitive Help for more information.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 6
1.1.2 Menus
We will quickly get you familiar with the menus that exist. You will get to see more of them
throughout the course.
Menu Description
File This is a standard file menu with features like open, close and new.
Edit This is a standard edit menu with features like cut, copy, paste and undo.
View You can control what toolbars and Panels you can see from this menu.
Debug This menu contains items related to the testing of scripts or surveys.
Tools This menu provides access to additional tools and macros. Also the access point
to Professional options.
Window The Windows menu allows you to switch between open scripts and surveys.
Help The help menu allows you to open the DDL from inside Professional.
1.2 FILE TYPES WITH PROFESSIONAL
Professional has been designed for working with PASW / Dimensions script files of the
following types:
Interview Script (.mdd) files
These scripts are used to create interviews that can be activated in version 3.0 (or later) of
Interviewer Server. Interview scripts have a Metadata section, and one or more Routing
sections. The Metadata section is used to define the questions that will be asked during the
interview and is written in mrScriptMetadata. A Routing section is written in mrScriptBasic
and defines which of the questions will be asked during an interview, and in what order they
will be asked. You can have individual routing sections for different interview environments,
for example, "Web" and "Paper".
mrScriptBasic (.mrs) files.
mrScriptBasic is a programming language that enables scriptable access to PASW /
Dimensions components. You would typically use a standalone mrScriptBasic script to
perform tasks that do not involve transforming data, such as creating reports, topline tables
and charts. Sometimes you might develop a mrScriptBasic script for use as an Include file in
one of the Event sections of a data management script. You can run and debug your
mrScriptBasic scripts from the Professional IDE or by using the mrScript Command Line
Runner.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 7
Data Management Script (.dms) files
These scripts are used for performing data management tasks, such as cleaning and
transferring data, creating derived variables for use during analysis, and setting up weighting
schemes. A data management script has two or more different sections, which have different
coding rules and use different technologies. For example, the InputDataSource section uses
property definition and SQL syntax, whereas the Metadata section is written in
mrScriptMetadata, and the Event sections are written in mrScriptBasic. A data management
script is particularly useful when you want to clean and transfer data and create derived
variables, because it handles the connections to the input and output data sources, the
merging of the metadata, and gives you scriptable access to the case data (in the
OnNextCase Event section). You can run your data management scripts from the
Professional IDE or by using the DMS Runner command prompt utility.
In addition to PASW / Dimensions scripts, you can also use Professional to create and edit
the following types of files:
Text (.txt) files
HTML files
XML files
Rich text format (.rtf) files
You can also open other types of text files, such as log files.
1.3 PROFESSIONAL TOOLBARS
Details can be found at
mk:@MSITStore:C:\Program%20Files\SPSSInc\PASWDataCollection5.6\DDL\Documentati
on\DDL.chm::/Professional_toolbars.htm
1.4 CREATING A NEW SURVEY
If you do not have Professional open, please launch it now.
1. From the File menu choose: New > File...
2. The New File dialog shows you a list of available file types. Click the item labeled
Metadata File.
3. In the bottom section of the New File dialog is the File Name, this probably reads
Untitled1.mdd. Change this to MyFirstInterview.mdd and click the Open button.
4. Professional has created your new file.
A Metadata file, also referred to as the MDD, is the name of the survey file type. It
contains all your questions, responses, languages and survey logic.
The survey edit is now available. On the bottom left corner you will see two tabs, Metadata
and Web.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 8
1.4.1 Metadata
The Metadata section is where you will define the questions and responses that will make up
your survey. The Metadata editor should look like below:
Metadata(en-GB, Question, label)
End Metadata
Always having three arguments passed on the Metadata function:
en-GB: the locale or base laungauge for the interview
Question: is the context
Label is the label type
NOTE: It is not mandatory to specify the language, context, or label type, as defaults
will be used if they are not provided. See below table for detailed explanation.
Positional
Parameter
Description
Language(en-US) The language portion of the line (shown here as en-us) will vary
according to the regional settings for your computer. For example, if your
regional settings are set for the UK you will see en-GB instead.
Context (Question) Defines the current user context for the metadata. User contexts define
different usages for the metadata, so that different texts and custom
properties can be used depending on how the metadata is being used.
For example, the Question user context is typically used to define the
default texts to be used when interviewing and the Analysis user context
is typically used to define shorter texts for use when analyzing the
response data.
LabelType Defines the current label type. Label types enable different types of
labels to be created for different types of information. For example, the
default label type of Label is used for question and category texts and
variable descriptions, and the Instruction label type is used for
interviewer instructions.
DataSource (NOT
in IOM) This parameter, used only when the Metadata section is part of a Data
Management Script (.dms) file, identifies the data source to which the
Metadata section relates. You specify the data source using the name
defined for the InputDataSource section in the Data Management Script.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 9
1.4.2 Web - Routing Section
The Web Routing section is where you define the order in which questions are asked and
the circumstances in which they should be asked. A script can have different Routing
sections for different contexts, such as Web, CATI and Paper. The default context is Web,
so you see a Web Routing tab.
When initially created the Routing section of an MDD contains the following script:
Routing(Web)
End Routing
1.5 OPENING AN EXISTING SURVEY
From the File menu choose: Open > File
Browse to the required file and click the open button in the bottom right hand
corner
NOTE: Notice that inside Professional along the top you still have your
"MyFirstInterview" file open. You can switch between surveys by clicking on the tabs
at the top of the editing window.
1.6 SAVING AND CLOSING A SURVEY
To save your file:
1. From the File menu choose: Save. If this is a new file it will open a standard
Save As box for you to choose the location to save the file in.
2. Alternatively from the File menu choose: Save As to save your file with a
different name or to a different location. This will open a standard Save As box.
When you run a survey it will also check whether it has been saved since you last made
changes, and if not it will try to save it.
To close your file:
1. From the File menu choose: Close
2. If you have made edits since you last saved your file you will be shown a dialog
box asking if you want to save your changes. If you click Yes it will open a
standard Save As box.
1.7 TOOLS IN DETAIL
1.7.1 MetaData or MDM Explorer
MDM explorer use to explore the variable and object in MDD.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 10
To Open – Search for shortcut on desktop (see below). Double click the icon.
If no Shortcut on desktop then check “Program
Files\SPSSInc\PASWDataCollection5.6\DDL\Code\Tools\VB6\MDM Explorer\MDM
Explorer.exe"
Explorer window
Open file – file -> Open Document
There is a short delay while the file is loaded. You can now explore the structure of MDM
Document. For example, to display the objects that correspond to the questionnaire items,
expand the Fields folder.
MDM Explorer displays a never-ending loop for Variables and VariableInstances - A
VariableInstance object has a pointer to a Variable object and the Variable object has a
collection of related VariableInstance objects. MDM Explorer merely reflects the properties
on each object. This means that you can open an endless list of Variable and
VariableInstance objects.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 11
1.7.2 Locals Pane
While debugging a script, Professional displays in the Locals pane the current value of all of
the variables in the current scope.
In addition, Professional shows in the Locals pane the current value of the properties of the
objects in the current scope. You can expand and inspect objects by clicking the plus icon
next to the object, but note that an object can only be expanded while the script is halted
during debugging, not when the script has completed.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 12
1.7.3 Using the Expressions Pane
You can use the Expressions pane to evaluate an expression or to inspect the value of an
object's properties. There are two ways of doing this:
1. Type the expression in the text box and click Evaluate.
2. Type a question mark, then type the expression and press Enter. For example, type
?a and press Enter to display the value of the a variable.
You can also re-evaluate an expression that you previously evaluated by selecting the text of
the expression in the text box and clicking Evaluate.
For example, here is the Expressions pane after using the Sqrt function to evaluate the
square root of the a variable:
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 13
Note that sometimes you might need to resize the pane in order to be able to see the output.
Here is the Expressions pane after evaluating the label of q2 :
You can also use the Expression pane to change the value of a variable. For example, if you
type a = 15 into the text box and press Enter (or alternatively, click Execute), Professional
will set the value of the a variable to 15.
The Expression pane can also be used to declare variables, which you can then use to store
the current value of another variable when you are debugging a script. For example, type
dim temp in the text box and press Enter to declare a variable called temp. Then assign the
value of a to temp by typing temp = a and pressing Enter. To restore the original value of a
at any point, type a = temp and press Enter.
1.7.4 Breakpoints
Breakpoints are added into code at the points where you want the execution to stop/hault, so
that you can step through the following lines. This is particularly useful when you have a
rough idea where the problem lies.
How to add - either of ways listed below
Choose Toggle Breakpoints from the Debug menu.
Press Ctrl+B or F9
Click the Edit pane to the left of the line number.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 14
Professional then highlights the line in red and adds the breakpoint to the list in the
Breakpoints pane.
To run the code up to the next breakpoint, press F5 or choose Start or Continue from the
Debug menu.
To run single Line step to following code press F10.
To clear a breakpoint, follow any one of below steps:-
Choose Toggle Breakpoints from the Debug menu.
Press Ctrl+B or F9
Click the Edit pane to the left of the line number.
To clear all breakpoints, press Ctrl+Shift+F9 or choose Clear All Breakpoints from the Debug
menu.
Technical Strategy and Solutions
V e r s i o n 1 . 0
P a g e | 15
2 CHANGE CONTROL
This Document may have been through various revisions.
This table shows updates over time and details any specific updates
Change Summary Date Doc Version
Change detail
Document Launch 02 Apr 2012 V1.0 Initial document launch
Top Related