1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
* Examples of conversion from string to numbers.
* rlevesque@videotron.ca.

* Convert. 
DATA LIST FIXED /mydata 1-10 (A).
BEGIN DATA
6,188
400
12,125.25 
END DATA.
LIST.
COMPUTE nb=NUMBER(mydata,COMMA10).
LIST.

* Convert. 
DATA LIST FIXED /mydata 1-10 (A).
BEGIN DATA
6188
400
12125.25 
END DATA.
LIST.
COMPUTE nb=NUMBER(mydata,F10).
LIST.

* Convert. 
DATA LIST FIXED /mydata 1-10 (A).
BEGIN DATA
6.188
400
12.125,25 
END DATA.
LIST.
COMPUTE nb=NUMBER(mydata,DOT10).
LIST.

* Convert. 
DATA LIST FIXED /mydata 1-10 (A).
BEGIN DATA
$6,188
$400
$12,125.25 
END DATA.
LIST.
COMPUTE nb=NUMBER(mydata,DOLLAR10).
LIST.

* Convert. 
DATA LIST FIXED /mydata 1-10 (A).
BEGIN DATA
6.188%
400%
12.12525% 
END DATA.
LIST.
COMPUTE nb=NUMBER(mydata,PCT10).
LIST.
FORMATS nb(PCT10.5).
LIST.