data Icecream_Sales;
Infile "/folders/myshortcuts/Myfolders/Imports/Sales.dat";
Firstobs= 2 obs= 2;
Input Flavours :$9. Prd_cd Price;
run;
proc print data=icecream_sales;
run;
data Stud_scores;
infile "/folders/myshortcuts/Myfolders/Imports/Scores.dat";
Missover;
input Names $ L M P C B;
run;
proc print data=stud_scores;
run;
data Stud_address;
infile "/folders/myshortcuts/Myfolders/Imports/Address.dat";
Truncover;
input Names $15. Suite Street $16.;
run;
proc print data=stud_address;
run;
data Icecream_Sales;
Infile "/folders/myshortcuts/Myfolders/Imports/Sales.dat";
Firstobs= 2 obs= 2;
Input Flavours :$9. Prd_cd Price;
run;
proc print data=icecream_sales;
run;
data Stud_scores;
infile "/folders/myshortcuts/Myfolders/Imports/Scores.dat";
Missover;
input Names $ L M P C B;
run;
proc print data=stud_scores;
run;
data Stud_address;
infile "/folders/myshortcuts/Myfolders/Imports/Address.dat";
Truncover;
input Names $15. Suite Street $15.;
run;
proc print data=stud_address;
run;
Hi, when i tried running this above 3 programs in university edition, unable to generate desired results.
NOTE: when i entered missover, truncover and firstobs function no change of colour occured.
I have attached the raw data sets.
Many thanks.
Can you explain what you are trying to achieve?
From the code, I can see you have some syntax errors. You have semicolons at the end of the infile statement lines followed by infile options which should be part of the infile statement. e.g.
data Icecream_Sales;
Infile "/folders/myshortcuts/Myfolders/Imports/Sales.dat" /* You have a semicolon here that needs deleting*/ Firstobs= 2 obs= 2;
Input Flavours :$9. Prd_cd Price;
run;
proc print data=icecream_sales;
run;
Can you explain what you are trying to achieve?
From the code, I can see you have some syntax errors. You have semicolons at the end of the infile statement lines followed by infile options which should be part of the infile statement. e.g.
data Icecream_Sales;
Infile "/folders/myshortcuts/Myfolders/Imports/Sales.dat" /* You have a semicolon here that needs deleting*/ Firstobs= 2 obs= 2;
Input Flavours :$9. Prd_cd Price;
run;
proc print data=icecream_sales;
run;
Hi,
Many thanks for your support!
Issue got resolved, It is due to the semicolon I didnt get results properly.
Always examine the log after running code.
Go to the log after running the code, copy the log with the (I expect) error messages, and paste here into a code box opened using the forum's {I} or "running man" icons.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.