BookmarkSubscribeRSS Feed
Inp
Obsidian | Level 7 Inp
Obsidian | Level 7
Hi
Iam creating a pdf file from a sas dataset.

Here is my coding, In my output I see The SAS system at the top of the every page. Can any one please help me out how to get rid out of the title The SAS system from the PDF file output.

options orientation = landscape;
options papersize = legal;
options ls = 150 pagesize=72;
options nodate nonumber;
options title='';
proc template;
define style styles.test;
parent = styles.printer;
style batch from output /
outputwidth = 100%
font_size=9.9pt
font_face = courier;
end;
run;
filename ftr "C:\DOWNLOAD\xxxxxx.TXT";

ods listing close;
ods pdf file = 'C:\DOWNLOAD\yyyyyyyy.PDF'
style=styles.test notoc;


data ftr;
infile ftr;
input @1 rec $char149.;
run;

data _null_;
infile ftr;
file print ps=72;
input;
put _infile_;

run;

ods _all_ close;

Thanks

Inpu
1 REPLY 1
Andre
Obsidian | Level 7
Inpu
i don't understand really what's your goal with this kind of program : testing only?

About the question upon The SAS system
change your code into Title;

here a rewriting of your code with some modification mostly reordering what is ods and not
and an addition to show how to write directly to ods
(in my example the text of rec is short, but if it is really 149....)
(you can also avoid a a frame trace if you pursuit some template modification)
HTH
Andre

[pre]


proc template;
define style styles.test;
parent = styles.printer;
style batch from output /outputwidth = 100%
font_size=9.9pt
font_face = courier;
end;
run;
filename ftr "d:\temp\xxxxxx.TXT";
data _null_ ;
file ftr;
do i =1 to 149;put @145 "xxxxx";end;
run;
data ftr;
infile ftr;
input @1 rec $char149.;
run;

options orientation = landscape;
options papersize = legal;
options ls = 150 pagesize=72;
options nodate nonumber;
title ; <*************************************;

ods listing close;
ods pdf file = 'd:\temp\yyyyyyyy.PDF' style=styles.test notoc;

data _null_;
infile ftr;
file print ps=72;
input;
put _infile_;
run;

data _null_;
file print ods=(var=(rec));
set ftr;
put rec;
run;

ods pdf close;
ods listing;

[/pre]

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
  • 1 reply
  • 1790 views
  • 0 likes
  • 2 in conversation