BookmarkSubscribeRSS Feed
gzr2mz39
Quartz | Level 8
The output from proc print moves up or down based upon the value of y= in ODS region.
However, the output from proc gbarline does not seem to be effected by ods region values.
Any suggestions?
Thank you.

goptions reset=all;
GOPTIONS DEVICE=activex;
options nodate nonumber orientation=portrait;
goptions rotate=landscape;
ods pdf file="C:\Documents and Settings\SASCode\YTD_Injury\TDBU_YTD.pdf"
;

*
*other procedures go here;
*

ODS PDF STARTPAGE=NOW;

%macro gbarprint(div);
goptions rotate=landscape;
footnote;title;
axis1 label=('Percentage') length=4 in;
axis2 label=('Injury Count') ;
axis3 length=4.5 in;
symbol1 i=join c=black v=dot;
symbol2 i=join c=green v=dot;
legend1 label=('') value=('YTD %') frame;
legend2 label=none across=1 position=(bottom center outside) repeat=1 cframe=white;
pattern1 v=solid c=orange;
pattern2 v=solid c=lightblue;
title1 h=3 "&div.";
ods layout start;
ODS region x=0.5 in y=2 in height = 3.5 in width = 4 in;
proc gbarline data=div_mo3;
title "&div.";
bar inj_mo/ sumvar=pernw legend=legend1
discrete raxis=axis1 maxis=axis3 midpoints="Jan" "Feb";
plot / sumvar=sum_osha raxis=axis2 legend=legend2;
plot / sumvar=sum_lost raxis=axis2;
plot / sumvar=sum_non raxis=axis2;
plot / sumvar=sum_res raxis=axis2;
where inj_yr in ("2010") and div in ("&div.");
format inj_mo $monthf.;
run;
quit;
ODS region x=3.5 in y=3 in height = 3.5 in width = 5 in;
proc print data=div_mo3 label noobs;
title "&div.";
var inj_mo pernw sum_osha sum_lost;
where inj_yr in ("2010") and div in ("&div.");
format inj_mo $monthf.;
run;
ods layout end;
%mend;
%gbarprint(NW Div);
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
ODS LAYOUT (and ODS REGION) are still experimental or "pre-production" with SAS. You might wish to work with Tech Support on this question.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 807 views
  • 0 likes
  • 2 in conversation