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.

Variables 33<br />

RBw (real binary):<br />

The RB format is used to read data values that contain internal format floating-point<br />

numbers. Such numbers are generated by COBOL using COMPUTATIONAL–1 or<br />

COMPUTATIONAL–2 data items, by PL/I using FLOATING DECIMAL data items, by<br />

FORTRAN using REAL or REAL*8 data items, or by Assembler using floating-point<br />

data items.<br />

The general syntax of the RB format is RBw, where w is the total number of bytes. The width<br />

specification must be an even number between 2 and 8. Normally, a width specification of 8 is<br />

used to read double-precision values, and a width of 4 is used to read single-precision values.<br />

RBHEXw (hexadecimal of RB):<br />

The RBHEX format interprets a series of hexadecimal characters as a number that represents<br />

a floating-point number. This representation is system-specific. If the field width is less than<br />

twice the width of a floating-point number, the value is right-padded with binary zeros. For<br />

some operating systems (for example, IBM CMS), letters in hexadecimal values must be<br />

upper case.<br />

The general syntax of the RBHEX format is RBHEXw, where w indicates the total number<br />

of columns. The width must be an even number. The values are real (floating-point) numbers.<br />

Leading and trailing blanks are not allowed. Any data values shorter than the specified<br />

input width must be padded with leading zeros.<br />

String Variable Formats<br />

• The values of string variables can contain numbers, letters, and special characters and can<br />

be up to 255 characters long.<br />

• SPSS differentiates between long strings and short strings. Long strings can be displayed<br />

by some procedures and by the PRINT command, and they can be used as break variables<br />

to define subgroups in REPORT. They cannot, however, be tabulated in procedures such<br />

as CROSSTABS, and they cannot have user-missing values. Short strings, on the other<br />

hand, can be tabulated and can have user-missing values. The maximum length of a short<br />

string depends on the computer and operating system; it is typically 8 characters.<br />

• System-missing values cannot be generated for string variables, since any character is a<br />

legal string value.<br />

• When a transformation command that creates or modifies a string variable yields a missing<br />

or undefined result, a null string is assigned. The variable displays as blanks and is not<br />

treated as missing.<br />

• String formats are used to read and write string variables. The input values can be<br />

alphanumeric characters (A format) or the hexadecimal representation of alphanumeric<br />

characters (AHEX format).<br />

• For fixed data, the width can be explicitly specified on DATA LIST or KEYED DATA LIST or<br />

implied if column-style specifications are used. For freefield data, the default width is 1;<br />

if the input string may be longer, w must be explicitly specified. Input strings shorter than<br />

the specified width are right-padded with blanks.

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

Saved successfully!

Ooh no, something went wrong!