SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating List Reports
Selecting Variables


In addition to selecting variables, you can control the default Obs column that PROC PRINT displays to list observation numbers. You can specify text to replace the Obs heading in your PROC PRINT output, or you can choose not to display observation numbers.


Obs Age Height Weight Fee
1 27 72 168 85.20
2 34 66 152 124.80
3 31 61 123 149.75
4 43 63 137 149.75
5 51 71 158 124.80


Specifying the Obs Column Header

To change the text for the Obs heading, you can specify the OBS= option in the PROC PRINT statement. Be sure to enclose the heading text in matched quotes.

     proc print data=work.example obs='Patient';
        var age height weight fee;
     run;

Patient Age Height Weight Fee
1 27 72 168 85.20
2 34 66 152 124.80
3 31 61 123 149.75
4 43 63 137 149.75
5 51 71 158 124.80


Removing the Obs Column

To remove the Obs column, you can specify the NOOBS option in the PROC PRINT statement.

     proc print data=work.example noobs;
        var age height weight fee;
     run;

Age Height Weight Fee
27 72 168 85.20
34 66 152 124.80
31 61 123 149.75
43 63 137 149.75
51 71 158 124.80



back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement