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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.