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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

88 ADD VALUE LABELS<br />

• The added value labels are stored in the working file dictionary.<br />

• ADD VALUE LABELS can be used for variables that have no previously assigned value labels.<br />

• Adding labels to some values does not affect labels previously assigned to other values.<br />

Limitations<br />

Example<br />

Example<br />

• Value labels cannot exceed 60 characters.<br />

• Value labels cannot be assigned to long string variables.<br />

ADD VALUE LABELS V1 TO V3 1 ’Officials & Managers’<br />

6 ’Service Workers’<br />

/V4 ’N’ ’New Employee’.<br />

• Labels are assigned to the values 1 and 6 of the variables between and including V1 and<br />

V3 in the working data file.<br />

• Following the required slash, a label for value N for variable V4 is specified. N is a string<br />

value and must be enclosed in apostrophes or quotation marks.<br />

• If labels already exist for these values, they are changed in the dictionary. If labels do not<br />

exist for these values, new labels are added to the dictionary.<br />

• Existing labels for other values for these variables are not affected.<br />

ADD VALUE LABELS OFFICE88 1 "EMPLOYEE’S OFFICE ASSIGNMENT PRIOR"<br />

+ " TO 1988".<br />

• The label for value 1 for OFFICE88 is specified on two command lines. The plus sign concatenates<br />

the two string segments and a blank is included at the beginning of the second<br />

string in order to maintain correct spacing in the label.<br />

Value Labels for String Variables<br />

• For short string variables, the values and the labels must be enclosed in apostrophes or<br />

quotation marks.<br />

• If a specified value is longer than the defined width of the variable, the program displays a<br />

warning and truncates the value. The added label will be associated with the truncated value.<br />

• If a specified value is shorter than the defined width of the variable, the program adds<br />

blanks to right-pad the value without warning. The added label will be associated with the<br />

padded value.<br />

• If a single set of labels is to be assigned to a list of string variables, the variables must<br />

have the same defined width (for example, A8).

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

Saved successfully!

Ooh no, something went wrong!