BookmarkSubscribeRSS Feed
yonib
SAS Employee
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?
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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
yonib
SAS Employee
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
Cynthia_sas
Diamond | Level 26
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
yonib
SAS Employee
Hi Cynthia,
Got it, Thanks for your help !

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1553 views
  • 0 likes
  • 3 in conversation