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 -12345Here 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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.