27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

VALUE LABELS<br />

Overview<br />

VALUE LABELS varlist value ’label’ value ’label’... [/varlist...]<br />

[/datevarlist ’value’ ’label’...]<br />

Example<br />

VALUE LABELS JOBGRADE ’P’ ’Parttime Employee’ ’C’ ’Customer Support’.<br />

VALUE LABELS deletes all existing value labels for the specified variable(s) and assigns new<br />

value labels. ADD VALUE LABELS can be used to add new labels or alter labels for specified<br />

values without deleting other existing labels.<br />

Basic Specification<br />

The basic specification is a variable name and the individual values with their assigned labels.<br />

<strong>Syntax</strong> Rules<br />

• Labels can be assigned to any previously defined variables except long string variables.<br />

• It is not necessary to enter value labels for all values for a variable.<br />

• Each value label must be enclosed in apostrophes or quotation marks. For short string<br />

variables, the values themselves must also be enclosed in apostrophes or quotation<br />

marks.<br />

• For date format variables (for example, DATE, ADATE), values expressed in date formats<br />

must be enclosed in apostrophes or quotation marks, and values must be expressed in the<br />

same date format as the defined date format for the variable.<br />

• Value labels can contain any characters, including blanks. To enter an apostrophe as part<br />

of a label, enclose the label in quotation marks or enter a double apostrophe.<br />

• Each value label can be up to 60 characters long.<br />

• The same labels can be assigned to the values of different variables by specifying a list<br />

of variable names. For string variables, the variables specified must be of equal length.<br />

• Multiple sets of variable names and value labels can be specified on one VALUE LABELS<br />

command as long as the sets are separated by slashes.<br />

• To continue a label from one command line to the next, specify a plus (+ ) sign before<br />

the continuation of the label. Each string segment of the label must be enclosed in apostrophes<br />

or quotation marks. To insert a blank between the strings, the blank must be included<br />

in the label specification.<br />

1633

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!