Triple-S Specs

~REFORMAT sss.xml

The ~REFORMAT option sss_xml will cause ~REFORMAT to create a fixed ASCII file with data definitions in triple-s XML format. Files created in this way can be imported into any program that supports this format. See http://www.triple-s.org for general information about triple-s.

At this time response values in triple-s must be numeric. In the future ~REFORMAT will by default recode questions that contain alpha responses to sequential numeric coding. However, at this time this has not been implemented. In order for the output to be triple-s compliant, the original questionnaire must be written using triple-s compliant response lists (i.e. use only positive numbers for responses, not including zero). Whenever a non-compliant spec is output, a comment will appear in the triple-s output that contains the string “CfMC MESSAGE”. A CfMC MESSAGE will also appear for each text question that is truncated by the setting used for var_as_text=.

The triple-s specs are in xml format. In order to cause the .def file to have the extension .xml, use >cfmcextension def=xml.

Note that at this time, the triple-s specs created here are non-compliant and that the ~REFORMAT run ends in error because of this.

import_triple_s_

The shell script import_triple_s takes a triple-s xml document as input and translates it to MENTOR table specs that are sent to the standard output. Usually you will want to redirect this output to a file, as in: import_triple_s myjob.xml > myjob.spx. Using vi, you can read the triple-s translation directly into the document being edited via ”:r !import_triple_s myjob.xml”.

The MENTOR specs output by triple-s are suitable for running a top line report and are roughly similar to the tables that the SCAN utility outputs. These specs will also serve as a good starting point for a set of more detailed and complex tables.

Triple-s is a work in progress that is intended to serve as a standard method of transporting surveys and survey data across platforms and software packages. Nevertheless, some triple-s exports may happen to fool import_triple_s. This may also be a sign of non-compliance by the exporting package. This shell script has been tested using the Linux version of csh. It should work on most other Unixs; however, csh is notoriously variable across platforms. If triple-s becomes popular, this shell script should be replaced by either a “C” program or perl script in order to make it available to all of CfMC’s customers.

Note: import_triple_s calls a shell script named crack_triple_s. Both of these must be in your path for importing to be successful.

~WRITE_SPECS SSS_XML_SPECS

Causes REFORMAT to export a fixed ASCII file with data definitions in triple-s XML format.

Files created in this way can be imported into any program that supports this format. Varname must reference either a simple variable (not an expression or axis such as [5^1] WITH [6^2]) or a variable generated out of a Survent question (i.e., only a type=1 db item from >LIST_DB_CONTENTS). This also means you cannot reference a row varname generated from a ~DEFINE TABLE_SET= ROW= statement since Mentor considers it an expression. If your variable was not generated from a Survent question specification then you will not get any title text and only default stub labels for each data category defined in the variable. You could write out the text variables with the TEXT= keyword and then merge the two files. (CMentor)

EX:
~DEFINE a[6^1//5]
~SPEC_FILES sample
~WRITESPEC CMentor=a
Specification written to SAMPLE.DEF:

tabset= { a_z:
title=:
}
stub=:
6^1
6^2
6^3
6^4
6^5}
row=: [1/6.1^1/2/3/4/5]
}

You could define a title and stub labels as follows:

~DEFINE
a[$T="This is the title"6^Poor:1/OK:2/Average:3/Good:4/"Really Good":5]
Specification written to the DEF file:

tabset= { a_z:
title=: This is the title
}
stub=:
Poor
OK
Average
Good
Really good }
row=: [1/6.1^1/2/3/4/5]
}

Specifications can produce up to four separate files:

Extension:    Type of item:             Used by:
DEF           Data definitions          CMentor,PERSEE,QUANTUM,SPLM,SPSS
TAB           Table creating commands   CMentor,QUANTUM, SPLM,SPSS
LAB           Table stub labels         SPLM,SPSS
LPR           Table printing commands   SPLM,SPSS