BookmarkSubscribeRSS Feed
Inp
Obsidian | Level 7 Inp
Obsidian | Level 7
Hi Dear,
I am trying create a pdf file from the mainfram(SAS 8.2) and I am successfull to create a pdf file too, but I trying to print only 35 records per sheet(one letter size paper)
when I put following codes, it print 35 records per page and it print 2 or more pages in a sheet, but I want to print only 35 records per sheet. How do I do that.

Thanks for your help in advance.

regards

Inp

OPTIONS ORIENTATION=LANDSCAPE;
OPTIONS PAPERSIZE=LEGAL;
OPTIONS LS=132 PS=35;
OPTIONS NODATE NONUMBER ;
OPTIONS ORIENTATION=LANDSCAPE PAPERSIZE=LETTER;
OPTIONS TOPMARGIN = '1IN'
BOTTOMMARGIN='1IN'
LEFTMARGIN='0.5IN'
RIGHTMARGIN='0.5IN';
TITLE ;
ODS PDF FILE=PRT NOTOC STYLE=NORMALPRINTER;
DATA _NULL_;
SET ALLDATA END=EOF;
FILE PRINT HEADER=H NOTITLES LL=LNSLEFT;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
Options LS and PS are essentially ignored for ODS destinations. They are LISTING destination or LISTING window options. So, for ODS PDF (and RTF and HTML) the concept of FILE PRINT is not one that works for ODS in the same way that worked for LISTING window output.

There is no concept of "LINESLEFT" anywhere but the LISTING window and you may find that PUT _PAGE_ does not work with ODS PDF (or RTF or HTML) the way you expect.

Your PAPERSIZE options and ORIENTATION would have an impact on PDF, as would the MARGIN options. Since you ask for both PAPERSIZE=LEGAL, followed by PAPERSIZE=LETTER, it is the last setting that "wins".

The LISTING destination and FILE PRINT, give you a way to address the whole output area as though it were a piece of graph paper. However, techniques (such as LINESLEFT, PUT @15, PUT @32, etc) that work with the LISTING destination do not work with ODS or if they do work, will generally produce undesirable results.

These Tech Support Notes may cast some light on the issues involved.
http://support.sas.com/kb/14/766.html
http://support.sas.com/kb/5/486.html
http://support.sas.com/kb/24/256.html
http://support.sas.com/kb/24/606.html
http://support.sas.com/kb/25/414.html
http://support.sas.com/kb/23/661.html

If your report is basically tabular in structure, you may want to use other techniques to force only 35 observations/records per sheet (such as PROC PRINT or PROC REPORT or FILE PRINT ODS and PUT _ODS_). I don't know what you mean by "when I put following codes, it print 35 records per page and it print 2 or more pages in a sheet" however, that sounds like undesirable results to me. You may want to work with Tech Support on this issue.

cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1174 views
  • 0 likes
  • 2 in conversation