BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
NJGIRL
Obsidian | Level 7

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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

4 REPLIES 4
Reeza
Super User

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.

ballardw
Super User

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.

Cynthia_sas
SAS Super FREQ

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

NJGIRL
Obsidian | Level 7
thank you!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1167 views
  • 3 likes
  • 4 in conversation