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 35<br />

is read as two separate values (Ed and Mr.). To include blanks and/or commas in a string<br />

value, enclose the value in apostrophes or quotation marks. For example, the following<br />

command file will generate a list of values as shown in Figure 13:<br />

DATA LIST FREE /ALPHAVAR (A10).<br />

BEGIN DATA<br />

Mr. Ed<br />

Ed,Mr.<br />

’Mr. Ed’<br />

’Ed, Mr.’<br />

END DATA.<br />

LIST.<br />

Figure 13 Blanks and commas in freefield string input<br />

ALPHAVAR<br />

Mr.<br />

Ed<br />

Ed<br />

Mr.<br />

Mr. Ed<br />

Ed, Mr.<br />

AHEXw (Hexadecimal Characters)<br />

The AHEX format is used to read the hexadecimal representation of standard characters. Each<br />

set of two hexadecimal characters represents one standard character. For codes used on<br />

different operating systems, see Appendix B.<br />

• The w specification refers to columns of the hexadecimal representation and must be an<br />

even number. Leading, trailing, and embedded blanks are not allowed, and only valid<br />

hexadecimal characters can be used in input values.<br />

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

be upper case.<br />

• The default output format for variables read with the AHEX input format is the A format.<br />

The default width is half the specified input width. For example, an input format of<br />

AHEX14 generates an output format of A7.<br />

• Used as an output format, the AHEX format displays the printable characters in the<br />

hexadecimal characters specific to your system. The following commands run on a UNIX<br />

system (where A=41 (decimal 65), a=61 (decimal 97), and so on) produce the output<br />

shown in Figure 14:<br />

DATA LIST FIXED<br />

/A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z 1-26 (A).<br />

FORMATS ALL (AHEX2).<br />

BEGIN DATA<br />

ABCDEFGHIJKLMNOPQRSTUVWXYZ<br />

abcdefghijklmnopqrstuvwxyz<br />

END DATA.<br />

LIST.

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

Saved successfully!

Ooh no, something went wrong!