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
SAS Super FREQ
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 !

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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