DATA Step, Macro, Functions and more

expanding linesize

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

expanding linesize

PATIENT

SKREAD

CURRENT VISIT REMOVED

PRIOR VISIT APPLIED

OOW

0101

16

16APR2017:09:00

15APR2017:10:30:00

22

0101

20

20APR2017:09:00

19APR2017:10:30:00

22

 

 HELLO, I am trying to expand the above output across the page. I would like it to 'spread out' more. here is my code:  (thank you)

 

 

ODS RTF FILE="&OUTFILE" STYLE=STYLES.TEST HEADERY=720 FOOTERY=720;

ODS LISTING CLOSE;

options linesize = 200 pagesize = 200;

TITLE1 "&CLIENT";

TITLE2 "&PROJECT";

TITLE3 "Generated on &sysdate. for OOW Listing";

PROC PRINT DATA=OOW_1 NOOBS label;

var pat skread removed lagapplied hours ;

format lagapplied datetime20.;

label pat = "PATIENT"

skread = "SKREAD"

lagapplied = "PRIOR VISIT APPLIED"

removed = "CURRENT VISIT REMOVED"

hours = "OOW" ;

RUN;

ODS RTF CLOSE;

ODS LISTING;

 


Accepted Solutions
Solution
3 weeks ago
SAS Super FREQ
Posts: 8,742

Re: expanding linesize

[ Edited ]

Hi:
For completeness an alternate solution would be to let ODS do the spread by doing something like this:
PROC PRINT DATA=OOW_1 NOOBS label
     style(table)={width=6.5in};
var pat skread removed lagapplied hours ;

... more code...

You can apply the width= option to the whole table and then ODS does the "stretching".

cynthia

View solution in original post


All Replies
Super User
Posts: 17,784

Re: expanding linesize

Linesize only affects the ODS LISTING output as far as I know. 

You can use PROC REPORT and the width option to specify how wide the columns are, I'm not sure there's an easy way in PROC PRINT.

Super User
Posts: 10,483

Re: expanding linesize

You can set the desired width for each variable, here is an example:

PROC PRINT DATA=OOW_1 NOOBS label;

var pat          /Style=[cellwidth= 1.2in] ;
var skread       /Style=[cellwidth= 1.2in] ;
var removed      /Style=[cellwidth= 1.2in] ;
var lagapplied   /Style=[cellwidth= 1.2in] ;
var hours        /Style=[cellwidth= 1.2in] ;

format lagapplied datetime20.;
run;

replace the value following cellwidth= with the value you would like. You can us cm as well for easy understanding of the desired widths. There are other measures allowed but printer points are familiar to most of us and pixels really aren't a good idea for document files.

 

 

I left out the labels and such to emphasize the part that answers your question.

Solution
3 weeks ago
SAS Super FREQ
Posts: 8,742

Re: expanding linesize

[ Edited ]

Hi:
For completeness an alternate solution would be to let ODS do the spread by doing something like this:
PROC PRINT DATA=OOW_1 NOOBS label
     style(table)={width=6.5in};
var pat skread removed lagapplied hours ;

... more code...

You can apply the width= option to the whole table and then ODS does the "stretching".

cynthia

Contributor
Posts: 24

Re: expanding linesize

thank you!
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 152 views
  • 3 likes
  • 4 in conversation