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;
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
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.
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.
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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.