OBJECTLABEL="" option did work. However couldn't get desired results with SPLITCHAR, which I assume due to misuse of the option. Instead, I went the easiest way for me, that is inserting a special character "#" into item labels and use %scan function for line breaks. It did give me the output I need. I leave the discussion open for a day or so to see if any new suggestions come up. In general, the question has been resolved with Community memebers help. Below is my final code.
%let PFA0101 = PROMIS SF 8c - 'Are you able to bend down and #pick up clothing from the floor?' item;
%let PFA0102 = PROMIS SF 8c - 'Are you able to stand up from an armless straight chair?' item#;
%let PFA0103 = PROMIS SF 8c - 'Are you able to dress yourself, #including tying shoelaces and buttoning your clothes?' item;
%let PFA0104 = PROMIS SF 8c - 'Are you able to go up and down stairs at a normal pace?' item#;
%let PFA0105 = PROMIS SF 8c - 'Are you able to wash and dry your body?' item#;
%let PFA0106 = PROMIS SF 8c - 'Are you able to go for a walk of at least 15 minutes?' item#;
%let PFA0107 = PROMIS SF 8c - 'Does your health now limit you in doing vigorous activities, #such as running, lifting heavy objects, participating in strenuous sports?' item;
%let PFA0108 = PROMIS SF 8c - 'How much difficulty do you have doing your daily physical activities #because of your health?' item;
options nodate nonumber ;
ODS rtf FILE = "&mypath\InterItem corr_Test.rtf" contents=yes toc_data ;
%macro items1(xitems=, yitems=)/minoperator;
%do x=1 %to 8;
%do y=1 %to 8;
%let xitem= %scan(&xitems, &x);
%let yitem= %scan(&yitems, &y);
%if &xitem ne &yitem %then %do;
ods proclabel="Figure 1.&x..&y: Inter-Item correlation of %sysfunc(tranwrd(&&&xitem, #, %str())) and %sysfunc(tranwrd(&&&yitem, #, %str())) at Baseline";
proc template;
define statgraph label;
begingraph;
entrytitle halign=center "Figure 1.&x..&y: Inter-Item correlation of %sysfunc(tranwrd(&&&xitem, #, %str())) and %sysfunc(tranwrd(&&&yitem, #, %str())) at Baseline"/ textattrs=( family="Arial" size=9pt weight=bold) halignCenter=Graph;
layout gridded;
layout overlay / xaxisopts=( type=linear linearopts=( tickvaluelist=( 1 2 3 4 5 ) viewmin=1 viewmax=5 Integer=true ) display=(line ticks tickvalues) )
y2axisopts=(labelfitpolicy=split labelattrs=( family="arial" size=9pt weight=normal))
yaxisopts=( labelposition=datacenter label="%sysfunc(tranwrd(&&&yitem, #, %str()))" labelattrs=( family="arial" size=9pt weight=normal) labelfitpolicy=split type=linear linearopts=( tickvaluelist=( 1 2 3 4 5 ) viewmin=1 viewmax=5 integer=true ) )
y2axisopts=(labelfitpolicy=split labelattrs=( family="arial" size=9pt weight=normal));
scatterplot x=&xitem y=&yitem / subpixel=off jitter=auto primary=true name="scatter";
scatterplot x=&xitem y=&yitem / primary=true;
regressionplot x=&xitem y=&yitem / lineattrs=( color=cx000000 thickness=2) maxpoints=2;
endlayout;
entry " %scan(&&&xitem, 1, %str(#))";
entry " %scan(&&&xitem, 2, %str(#))";
endlayout;
endgraph;
end;
run;
ods noptitle;
proc sgrender data=items OBJECTLABEL="" template=label;
run;
title;footnote;
%end;
%end;
%end;
%mend;
%items1(xitems=PFA0101 PFA0102 PFA0103 PFA0104 PFA0105 PFA0106 PFA0107 PFA0108, yitems= PFA0101 PFA0102 PFA0103 PFA0104 PFA0105 PFA0106 PFA0107 PFA0108);
ods _all_ close;
ods html;
... View more