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 open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.