From: Tom White on 18 Feb 2010 10:51 Hello SAS-L, I am strugling with converting an ACCOUNT_NUMBER variable with format and= informat $9. Wjen I count the length of this variable it varies from 4 digits to 9 digi= ts. Yet, when I look at a 4-digit account_number [L=3Dlength(account_number);= L=3D4] the actual account_number has only 3 digits. Similarly for the 9-digit. Th= e actual account_number has only 8 digits. This leads me to believe that maybe we have a trailing zero in account_num= ber. I try to conver the account_number (say, account_number=3D12345678 which= has length=3D9 and not 8 according to above remark). ACCT_NBR=3Dinput(account_number, best.) This doesn't convert the account numbers. Instead, I get . for all of them except for the last observation in the ac= count_umber (wired ???) when I try=20 ACCT_NBR=3Dinput(account_number, 9.) [The maximum lenght L=3D9 per note ab= ove] I get missing account numbers again (.) except for the last obs in account= _number variable (wired ???) when I try=20 =20 ACCT_NBR=3Dinput(account_number, 8.) the accounts are converted but not al= l. SAS picks and chooses which ones to convert ! It appears though that the 8-digit acount numbers (L=3D9) are being conver= ted. Those account numbers with fewer than 8-digits, some are convertd, som are= not convertd. What's going on? tom =3D
|
Pages: 1 Prev: Datetime prob in DI sudio Next: Convert Character into numeric |