1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
* How to remove letter at end of string and convert remaining portion to a number.
* Ray Jan 2002.

DATA LIST LIST /str1(A10).
BEGIN DATA
7T
74T
623E
4663T
56707T
62F
62548T
4138T
350D
END DATA.
LIST.

COMPUTE nb=NUMBER(SUBSTR(str1,1,LEN(RTRIM(str1))-1),F8.0).
EXECUTE.