Appendix: Solutions to the Odd-Numbered Problems

Solution 8-1;

data Quick_Survey;

   infile '/folders/myfolders/Quick.txt';

   informat Subj $3.

            Gender $1.

            DOB mmddyy10.

            Income_Group $1.;

    input Subj

         Gender

         DOB

         Height

         Weight

         Income_Group;

   format DOB mmddyy10.;

run;

title "Listing of Data Set QUICK_SURVEY";

proc print data=Quick_Survey;

   id Subj;

run;

*Solution 8-3;

title "Frequencies";

proc freq data=Quick_Survey order=freq;

   tables Gender Income_Group / nocum;

run;

Solution 8-5;

data Quick_Survey;

   infile '/folders/myfolders/Quick.csv' dsd;

      informat Subj $3.

            Gender $1.

            DOB mmddyy10.

            Income_Group $1.;

    input ...

Get An Introduction to SAS University Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.