I haven't used SAS since March of last year in my graduate studies, so I was re-familiarizing myself with it. I feel mucho embarrassed, but I cannot understand why this code is not bringing in the balance. It is from Ron Cody's Learning SAS by Example book.
data financial;
infile '/folders/myfolders/SAS/Learning/bank.txt';
input Subj $ 1-3
DOB $ 4-13
Gender $ 14
Balance 5-21;
run;
Here is the text file, again from Ron's book.
00110/21/1955M 1145
00211/18/2001F 18722
00305/07/1944M 123.45
00407/25/1945F -12345
Here is my result:
Edited: Is it the space in the text file? I shouldn't think so given that I've reserved the columns.
Should it say 15 instead of 5?
Balance 15-21;
Oh dear... yes.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: