O'Reilly logo

An Introduction to SAS University Edition by Ron Cody

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required