Dimensions To Surveycraft
Saturday, November 1st, 2008 | Data Management, Tools
Convert your Dimensions data files into Surveycraft CVT and SEQ files as easy as one…. two…. three…
To help Surveycraft customers migrate to Dimensions at their own pace we have developed some dlls that allow them to create CVT and SEQ files from any Dimensions Data source. In the zip file attached you will see a simple mrs script that you can edit to meet your needs. The script looks like this. To see how to load a CVT and SEQ file into Surveycraft see the following article.
Dim strConnection
Dim objSurveyCraft
' XML Input files
'Const MDD_Input = "c:\temp\ccdx3.mdd"
'Const XML_Input = "c:\temp\CCDX3_qcomp.xml"
'const inputType = "mrXmlDsc"
' SAV Input files
Const MDD_Input = "c:\temp\Employee data.mdd"
Const XML_Input = "c:\temp\Employee data.sav"
const inputType = "mrSavDsc"
' Output files
Const Log_Output = "C:\temp\DemoData.log"
Const SC_CVT_Output = "C:\temp\DemoData.cvt"
Const SC_SEQ_Output = "C:\temp\DemoData.seq"
strConnection = "Provider=mrOleDB.Provider.2;" + _
"Persist Security Info=False;" + _
"User ID='';" + _
"Data Source=" + inputType + ";" + _
"Location=" + XML_Input + ";" + _
"Extended Properties='';" + _
"Initial Catalog=" + MDD_Input + ";"
set objSurveyCraft = createobject("aumrQaire.Questionnaire")
' Link into the mrStudio Output window
set objSurveyCraft.mrStudioLog = Debug
objSurveyCraft.ShowNoProgress = true
' If you comment this out things may be faster
objSurveyCraft.LogFile = Log_Output
' Load the script
objSurveyCraft.LoadScript(MDD_Input)
' Set the connection string
objSurveyCraft.CaseConnection =strConnection
' This is optional
' If you dont want all the fields specify each field you need
' objSurveyCraft.CaseSQL = "Q1,Q2,Q3"
' This is optional
' If you dont want all the records specify a where clause
' objSurveyCraft.CaseSQLWhere = "respondent.serial <> 36"
' This is optional
' True means use specified files as CaseID
' False means use recordnumber as CaseID
' objSurveyCraft.FieldToUseAsCaseID = "Q2"
' objSurveyCraft.UseFieldToUseAsCaseID = true
' This is optional
' = 1 : "Default" 1,2,3,4,5 etc ...
' = 2 : "Dimensions Value" {45},{23} etc ...
' = 3 : Special User request
objSurveyCraft.ExportResponseValue = "1"
' Read the DATA
objSurveyCraft.LoadData()
' No need to export CVT Everytime this will speed things up
objSurveyCraft.ExportScript(SC_CVT_Output)
' Export the SEQ data
objSurveyCraft.ExportData(SC_SEQ_Output)
Please note that your input MDD must have a respondent.serial in it. If you have the following in your metadata,
Metadata(en-AU, Analysis, Label, SystemVariables = false)
you must make it look like
Metadata(en-AU, Analysis, Label)
This has been reported as a bug by RI and is currently being resolved.
The use of this code and DLLs is not supported by SPSS , however if you have a question about it, or encounter a problem then email Douglas Porton and when time allows your issues will be addressed.
No comments yet.
Leave a comment
Categories
Blog Counts
News
Past Posts
- How many concurrents : Part 3
- Killing two birds with one stone : Interim Results
- How many Session Engines ( 5.5 )
- Learn JavaScript Lesson 3 : Comments , Variables & Logic
- How do I check my connection to my mrInterview SQL database
- Learn ODBC : Inserting Records
- Printing your survey results to word : Part 1
- Learn ODBC : Getting Connected
- How many concurrents : Part 1
- Tip of the day: mrStudio and memory usage



