The SAS Output Delivery System and reporting techniques

Proc Print

Reply
SAS Employee
Posts: 105

Proc Print

Hi,
Im using Proc Print to create a report.

The Output is in text format:

options ps=45 ls=250 nodate nocenter ;
proc printto file="&tmpdir.Patient Summary - &label..txt" new;
run;
proc print data=all_pat noobs ;
var text;
by pat;
where hospno>=3067 and hospno<=3072;
pageby pat;
run;
proc printto;
run;

At the begining of each page im getting the string "txt".
I dont know how to get rid of it...
Any ideas?
Super Contributor
Super Contributor
Posts: 3,174

Re: Proc Print

Suggest you review this item and then re-post your code, which was truncated:

http://support.sas.com/forums/thread.jspa?messageID=27609

And remember to include your macro variable definition. Better to paste your SAS-generated log instead of just the code for a better response from the forum.

Scott Barry
SBBWorks, Inc. Message was edited by: sbb
SAS Employee
Posts: 105

Re: Proc Print

Hi Scott,
Thanks for the reference,
here is my code:
options ps=45 ls=250 nodate nocenter ;
proc printto file="&tmpdir.Patient Summary - &label..txt" new;run;
proc print data=all_pat noobs ;
var text;
by pat;
where hospno>=3067 and hospno=4;
proc print;run;

The macro definitions are not releavent for my question.
My problem is my output generate the string 'text' in each page (for each pat).
Is there a way to get rid of it ?

Thanks in advance
SAS Super FREQ
Posts: 8,743

Re: Proc Print

Hi:
the string 'text' is on PROC PRINT output because it is the variable NAME of the variable TEXT in your VAR statement. Either the variable NAME or the variable LABEL is used by PROC PRINT as a column HEADER. I believe this is what you are seeing from this statement:
[pre]
var text;
[/pre]

There have been previous forums postings on how to suppress column headers. Refer to these postings:
http://support.sas.com/forums/thread.jspa?messageID=10254⠎
http://support.sas.com/forums/thread.jspa?messageID=27852泌

cynthia
SAS Employee
Posts: 105

Re: Proc Print

Hi Cynthia,
Got it, Thanks for your help !
Ask a Question
Discussion stats
  • 4 replies
  • 168 views
  • 0 likes
  • 3 in conversation