Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi there, I need help in inputting the following data intoSAS. -----------------

ID: 2953309 • Letter: H

Question

Hi there, I need help in inputting the following data intoSAS.
----------------------
 05/07/2008
Cincinnati 5 Chicago 2
New York 0 Atlanta 3
05/08/2008
Cincinnati 1 Chicago 3
New York 6 Atlanta 2
San Diego 10 Los Angeles 8
05/09/2008
Chicago 13 Cincinnati 2
--------------------------
And this is what I tried;
-------------------

data qn1;
infile 'C:UsersSSSDesktopdata3.txt';
input @1 date mmddyy8. @; retain date;
input @3 H_team $ 3-14 @16 H_score @25 V_team $ 25-35 @38 V_score;

proc print data=qn1;format date mmddyy10.; run;
------------------------

I appreciate your help and will rate nicely.

Thank you,


Explanation / Answer

data qn1;

Input date anydtdte15.
H_team $ 1-13   H_score 14-15 V_team $23-35 V_score 36-37 ;
output;
  
datalines;
05/07/2008
Cincinnati    5      Chicago      2
New York     0      Atlanta      3
05/08/2008
Cincinnati    1      Chicago      3
New York     6      Atlanta      2
San Diego    10      Los Angeles 8
05/09/2008
Chicago     13       Cincinnati  2

;
run;

proc print data=qn1 ;format date mmddyy10.;run;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote