data inventory;
retain id item price vendor;
input id item$ 11. price vendor$ 20.;
msrp=price*1.5;
label id ='Item Id' msrp='Max Retail price';
cards;
1 apple 2.19 walmart
2 grapes 1.99 shop$stop
;
run;
input id item : $11. price : best12. vendor : $20.;
Normally when you are a having problems, you go ahead and describe the problems to us, and show us the ENTIRE log for this code. Otherwise how would we know what the error is that you are having?
input id item : $11. price : best12. vendor : $20.;
Thank you
You cannot just post some random code, expect someone to run it, find the error and debug it for you.
Please frame your questions as follows if you want help efficiently. This will allow us to help you get your problems solved.
In general, see this post or this post on how to ask good programming questions. You'll save yourself a ton of time and get your answers much faster.
This is my problem (I am trying to read in data that has two parts to a name separated by a space into one variable but it's not working correctly)
What you'ved tried: This is my code so far
What happens with that code:
This is what it generates and this is the log.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.