VAREXT: Create Text File from a Case Data File

Last updated 19 Nov 97

VAREXT will extract variables from a Case Data file and write them to a standard file compatible with non-CODAP software. When the output file is created, a layout is generated describing the format of the generated records. A maximum of 2000 variables and 30 membership masks may be extracted.

Program Invocation

The specific syntax for program invocation varies between operating systems. This document diplays the code for the AIX version.


@codap varext <opt> <ssss> <CDf> [<TFf>] [<TT>] [<VTf>] <VEf> [<LAY>]

opt:   B  Convert task variables to raw with leading spaces
       Z  Convert task variables to raw with leading zeros
ssss:     The study number
CDf:      Input Case Data file
TFf:      Input Task Factor file, required if membership masks
	  are extracted.
TT:       Input Task Title file, required if task variable are
	  extracted.
VTf:      Input Variables Title file, required if computed or
	  background variables will be extracted.
VEf:      Output text data file
LAY:      Output layout file

VAREXT Control Card


VAREXT <stdy> <title>

VAREXT:   cc 01-06   The literal 'VAREXT'
stdy:     cc 08-11   The study number for this run
title:    cc 13-72   The title for the output layout.  If
		     blank, the Case Data file title is used.

Report Note Cards (optional)

The cards in this section are textual notes that are to be printed on the report. There is no limit on the number of note cards which may be used. All cards found between the 'NOTE' card and the '@EOF' card will be treated as notes.


NOTE

...notes...

@EOF


Group Membership Selection Cards (optional)

The requests in this section are used to generate variables in the output file which determine whether the record is a part of a group or not. Each request causes another field to be added to the file. The value assigned to the field for a given case is one if the case is a part of the group, or a zero otherwise. Codes elements are created for each of these fields which reflect this information.

MEMBERS Card


MEMBERS

MEMBERS:  cc 01-07   The literal 'MEMBERS'

Membership Selection Cards


<name> = <group> [<title>]

name:    cc 01-04   Any four character name desired for
		    referencing the specified group
=:       cc 05-05   The literal '=' (required)
group:   cc 06-11   The membership mask to be selected
title:   cc 13-72   The title for the group to be used in the
		    layout field description.  If blank, the
		    task factor group title will be used.

These cards are terminated by an '@eof' image.

Variable Selection Cards

These cards are used to identify the variables to be extracted from the case data file and any operations to be performed on the data in a follow on runstream. These operations include recoding of data values, dividing computed variable values into coded intervals, dichotomization of variables, and single and multiple dimension distributions.

VALUES Card


VALUES

VALUE:  cc 01-05   The literal 'VALUE', indicates variable
		   selections follow.

Variable Specifications Card

This card is used to specify the variable which will be operated on by the control cards that follow.


<name> = <var> [<descr>]

name:  cc 01-04      Any four character name desired for          
                     referencing the specified variable
=:     cc 05-05      The literal '=' (required)
var:   cc 06-10      The five character variable name 
descr: cc 12-71      Optional description for the specified       
                     variable (used in the layout)

These cards are terminated by an end-of-file or an '@eof' image.

Example

@codap varext - ssss cd100 tf100 - vt100 ve100 varext.layout
VAREXT ssss Example of VAREXT using all generated programs
MEM
GP01=GP0001
GP02=GP0004
@EOF
VALUES
A001=V0004  V0004 Grade
A002=V0017
A003=V0005
A004=V0007
A005=V0019
A006=V0009
@eof

This run will extract the requested variables onto ve100.

Back to document index