Help with SAS Programming questions. Write an INPUT statement to read the data t
ID: 3731739 • Letter: H
Question
Help with SAS Programming questions.
Write an INPUT statement to read the data that is shown below into a SAS data set. Data consist of Name (16 characters), Class Code (2 characters), Return Date (10 characters), Candy Type (2 characters), and Quantity (2 characters) in the order listed.
----+----1----+----2----+----3----+
Adriana Jackson 2103/21/2000MP07
Nathan Henderson1403/21/2000CD19
Jason Smith 2104/01/2000MP12
Matthew Taylor 1403/21/2000CD14
Claire Williams 1403/22/2000CD11
Caitlin Day 2103/24/2000CD09
Explanation / Answer
The SAS code for reading the input statement. The data set is given name candy.
Code-
DATA candy;
input Name 1-16 ClassCode 17-18 ReturnDate 19-28 CandyType 29-30 Quantity 31-32
DATALINES;
Adriana Jackson 2103/21/2000MP07
Nathan Henderson1403/21/2000CD19
Jason Smith 2104/01/2000MP12
Matthew Taylor 1403/21/2000CD14
Claire Williams 1403/22/2000CD11
Caitlin Day 2103/24/2000CD09 ;
RUN;
PROC PRINT data = candy;
title 'SAS data set'
RUN;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.