The SAS Output Delivery System and reporting techniques

I don't want to print column header

Reply
Frequent Contributor
Frequent Contributor
Posts: 81

I don't want to print column header

Hi Dear,
Here is my sample coding

FILENAME PDFFILE 'C:\TEMP.PDF';
ODS LISTING CLOSE;
ODS PDF FILE=PDFFILE STYLE=STYLES.PRINTER;
DATA _NULL_;
FILE PRINT ODS;
TEST ='TESTING MY RECORD';
PUT TEST $20. _ODS_;
RUN;
ODS LISTING;

When I run . I see the following output in the PDF output.

-------------------------
| TEST |
------------------------

TESTING MY RECORD.

My problem is , I don't want to print the column header 'TEST'. I just want to print only
TESTING MY RECORD only. How can I do this.

Thanks so much for your help in advance.

Please note that
thanks again
Inpu
Super Contributor
Super Contributor
Posts: 3,174

Re: I don't want to print column header

Remove the ODS keyword on the FILE statement. Also, if you do not want the title line date and page number, consider adding these statements;

OPTIONS NODATE NONUMBER;
TITLE;

Scott Barry
SBBWorks, Inc.
SAS Super FREQ
Posts: 8,868

Re: I don't want to print column header

Hi:
This is a good introduction to using the DATA step with FILE PRINT ODS. Generally, it is NOT recommended to bypass ODS when writing output to an ODS destination file (although the output may look OK for some simple datasets, for complex or "free-format" reports, the output will never look the way it looked in the LISTING destination):
http://support.sas.com/techsup/technote/ts664.pdf

Another alternative is to use PROC REPORT with the NOHEADER option
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473620.htm#a003071998

The program below illustrates using NOHEADER in a few different ways.

cynthia

[pre]
data textline;
length test $400;
test='Twas brillig and the slithy toves '||
'Did gyre and gimble in the wabe. '||
'All mimsy were the borogroves. '||
'And the mome raths outgrabe.';
run;

ods listing close;
options nodate nonumber orientation=portrait;

ods pdf file='c:\temp\examp1.pdf' style=styles.printer;

proc report data=textline nowd noheader;
title 'Example 1';
column test;
run;

ods pdf close;

ods pdf file='c:\temp\examp2.pdf' style=styles.journal;

proc report data=textline nowd noheader;
title 'Example 2';
column test;
run;

ods pdf close;

ods pdf file='c:\temp\examp3.pdf' style=styles.printer;

proc report data=textline nowd noheader
style(report)={rules=none frame=void cellspacing=0 cellwidth=3in};
title 'Example 3';
column test;
run;

ods pdf close;

ods pdf file='c:\temp\examp4.pdf' style=styles.printer;

proc report data=textline nowd noheader
style(report)={rules=none frame=void cellspacing=0 cellwidth=5in just=l};
title 'Example 4';
column test;
run;

ods pdf close;
[/pre]
Frequent Contributor
Frequent Contributor
Posts: 81

Re: I don't want to print column header

Hi Cynthia,
Thanks a lot.Amazing .It perfectly works to me.


Thanks again Cynthia,


regards Inp
Ask a Question
Discussion stats
  • 3 replies
  • 151 views
  • 0 likes
  • 3 in conversation