ODS Tagsets RTF - sas

I am trying to make underscores (_) appear in my output while using ODS Tagsets but for some unknown reasons it's not appearing as expected. I'm using SAS 9.4.
It appears with Bodytitle and Bodytitle_aux but the pagebreaking is much better with Tagsets.
Unfortunately using unicode doesn't work either.
Here is a sample code:
options nonumber;
%let path=;
ods path(prepend) work.templat(update);
proc template ;
define style newstyle ;
parent = styles.journal ;
class Parskip /
font = fonts("headingFont")
cellpadding = 0 cellspacing = 0 /* Only for Measured */
frame= void
Rules = NONE
BorderWidth = 0
Color = _undef_
BackGroundColor = _undef_;
style byline / font_face="Courier New" font_style=Roman background = white;
style Body from Document / font_face="Courier New" font_style=Roman background = white;
style data / font_face="Courier New" font_style=Roman ;
style table / font_face="Courier New" font_style=Roman
bordercolor=black background = white borderwidth=1 ;
style cellcontents / font_face="Courier New" font_style=Roman ;
style TitleAndNoteContainer / font_face="Courier New" font_style=Roman background = white;
style ProcTitle / font_face="Courier New" font_style=Roman ;
style systemtitle / font_face="Courier New" font_style=Roman ;
style rowheader from headersandfooters / font_face="Courier New" font_style=Roman ;
style BodyDate / font_face="Courier New" font_style=Roman ;
style PageNo / font_face="Courier New" font_style=Roman ;
style SysTitleAndFooterContainer / font_face="Courier New" font_style=Roman ;
style header from headersandfooters / font_face="Courier New" font_style=Roman background = white;
style SystemFooter / font_face="Courier New" font_style=Roman bordercolor=black background = white borderwidth=1 ;
style NoteContent / font_face="Courier New" font_style=Roman font_size=8pt;
end;
run ;
options papersize=letter leftmargin=3.65cm rightmargin=2.11cm topmargin=3.36cm bottommargin=3.3cm orientation=landscape;
ods escapechar="^";
ods tagsets.rtf file="&path.\shoes2file.rtf" options(vspace='no') options(continue_tag="no");
ods tagsets.rtf style=newstyle ;
title1 'Title: Shoes';
proc report data=sashelp.shoes(obs=10) nowd style(header)=[rules=group frame=above background=white font_size=8pt]
style(report)=[outputwidth=100% rules=group frame=hsides background=white font_size=8pt ]
style(column)=[rules=group font_size=8pt] spanrows;
column region product;
define region / '___Region___' display style(column)=[width=1.5cm asis=on just=l] style(hdr)=[asis=on just=l];
define product / '___Product___' display style(column)=[width=1.5cm asis=on just=l] style(hdr)=[asis=on just=l];
footnote 'Footnote Page L____4';
run;
ods tagsets.rtf close;
options nonumber
nocenter nobyline nodate formdlim=''
formchar="|_---|+|---+=|-/\<>*" MISSING=" " ;
In the attached photo, the highlighted circles are the places where underscores are supposed to be. Any help is appreciated.

The problem is that in Courier font (really Courier New) the underscore is below even the tail of the normal characters (which makes it really useful for underlining by "overstriking").
I am not sure how to fix the style to do it but I was able to get it to show the underscores by changing the spacing after the "paragraphs" from 0 point to 1 points. Here is data step that replaces all \sa0 commands in your RTF file with \sa20. The resulting file shows the underscores.
data _null_;
infile "&path/shoes2file.rtf";
file "&path/shoes2file_fixed.rtf";
input;
_infile_ = tranwrd(_infile_,'\sa0','\sa20');
put _infile_;
run;

Related

How to change the line (______) under the table to dotted line under the heading in the table (---) in SAS?

I want to change the line (_____________) under the heading of the table to dotted line (---------) under the heading of the table in proc report step.
I tried using options formchar still its not working for me.
Can you please help me ? If data is required, i can send you in chat since the data is confidential
proc template;
%** Courier 9pt **;
define style Styles.ods_9pt;
parent=styles.rtf;
replace fonts/
'TitleFont2' = ("Courier New",9pt,Bold )
'TitleFont' = ("Courier New",9pt,Bold )
'FootnoteFont' = ("Courier New",9pt )
'StrongFont' = ("Courier New",9pt )
'EmphasisFont' = ("Courier New",9pt )
'FixedEmphasisFont' = ("Courier New",9pt )
'FixedStrongFont' = ("Courier New",9pt)
'FixedHeadingFont' = ("Courier New",9pt, Bold)
'BatchFixedFont' = ("Courier New",9pt,Bold )
'FixedFont' = ("Courier New",9pt )
'headingEmphasisFont' = ("Courier New",9pt,Bold )
'headingFont' = ("Courier New",9pt,Bold )
'docFont' = ("Courier New",9pt );
replace document from container /
asis = on
protectspecialchars=off;
replace SystemFooter from TitlesAndFooters /
asis = on
protectspecialchars = on
font= Fonts('FootnoteFont');
replace systemtitle from titlesandfooters/
asis = on
protectspecialchars=off;
replace body from document /
asis = on;
replace color_list
"Colors used in the default style" /
'link'= blue
'bgH'= white
'fg' = black
'bg' = white;
replace Table from output /
Background=_UNDEF_
cellpadding = 0pt
Rules=groups
Frame=void;
style Header from Header /
Background=_undef_;
style Rowheader from Rowheader /
Background=_undef_;
replace pageno from titlesandfooters/
Foreground=white;
end;
ods listing;
options papersize='LETTER' orientation=landscape topmargin = '3.61cm' bottommargin = '3.61cm'
leftmargin = '2.54cm' rightmargin = '2.54cm' nodate nonumber missing=.;
ods rtf file="/home/u000000/sasuser.v94/Listings/listing_Demo.rtf" style=styles.ods_9pt nogtitle nogfootnote;
ods escapechar = '~';
options formchar='|_---|+|---+=|-/\<>*'
options validvarname=any;
options pageno=1;
proc report data=newb nowd headline headskip split='*';
column num mypage TRT01A SITE BRTHDTC AGE SEX ETHNIC HEIGHTBL WEIGHTBL;
define num/ noprint;
*break after num/skip;
define mypage /order noprint;
break after mypage / page;
define TRT01A/'Treatment' order descending center style(column)={width=1in};
define SITE/'Site Id.*Unique Subject Id.' center style(column)={width=1in};
define BRTHDTC/'Date of*Birth' center style(column)={width=1in};
define AGE/'Age (YEARS)*[1]' center style(column)={width=1in};
define SEX/'Sex' center style(column)={width=1in};
define ETHNIC/'Ethnicity' center style(column)={width=1in};
define HEIGHTBL/'Height*(cm)' center style(column)={width=1in};
define WEIGHTBL/'Weight*(kg)'center style(column)={width=1in};
*compute after TRT01A;
*line '';
*endcomp;
title1 j=l height=10pt font="Courier New" "Protocol: XXX" ;
title3 j=l height=10pt font="Courier New" "Population :XXX" j=r 'Page ^{​​​​​​​thispage}​​​​​​​ of ^{​​​​​​​lastpage}​​​​​​​';
title4;
title5 j=c height=10pt font="Courier New" "Listing";
title6 j=c height=10pt font="Courier New" "Listing of Demographic Characteristics";
title7;
footnote1 j = l height=10pt font="Courier New" "20NOV2020 10:42";
run;
ods rtf close;
ods listing;
#Reeza: can you help me with this?
Way 1
Add a line to the report.
ods rtf file='report.rtf' style=ods_9pt;
data class;
set sashelp.class;
page = 1;
run;
proc report data=class
style(header) = [BorderBottomStyle=hidden]
;
title;
where name < 'H';
columns page name age sex height weight;
define page / order noprint;
compute before page;
line '-----------------------------------------------------------';
endcomp;
run;
ods _all_ close;
Way 2
You can manipulate the report column headers by injecting destination specific characters.
You will also need to hide the header bottom border.
Example:
Change your style definition, replace
style Header from Header / Background=_undef_;
to
style Header from Header / Background=_undef_ borderbottomstyle=hidden;
and in the Proc REPORT, change the column headers to contain additional raw characters to be injected into the rtf table cell.
define TRT01A /
'Treatment*~{dest [RTF] ~{raw -------}}'
order descending center style(column)={width=1in};
Trick (LISTING)
There is an ODS LISTING trick for REPORT:
If a split line is two of the same formchar characters, they will be repeated across the column width.
* ODS listing only;
Proc REPORT ...;
...
define TRT01A /
'Treatment*--`
order descending center;
...

Proc Report-Assigning a different format for different rows

I have a table that is current laid out in the way I want. The only issue is that when I went to assign the format, it carried over the format for all values. I have a row that should be total, but I'm unsure how to strip the formatting on this row only in proc report:
Output
Want: total line to show no decimals as they are count but the rest of the table to keep same format.
%let gray=CXBFBFBF;
%let blue=CX13478C;
%let purple=CXDEDDED;
title j=c h=10pt f='Calibri' color=black "Table 1-Distribution, CY2016-CY2018";
options orientation = landscape nonumber nodate leftmargin=0.05in rightmargin=0.05in;
ods noproctitle noresults escapechar='^';
ods rtf file = "path.rtf";
proc report data= work.temp nowd spanrows style(report)={width=100%}
style(header)=[vjust=b font_face = Calibri fontsize=9pt font_weight=bold background=&blue. foreground=white borderrightcolor=black];
/*List variables in order to select order of columns in table*/
col ( m_type
('^S={borderbottomcolor=&blue. vjust=b borderbottomwidth=0.02 }'('^S={borderbottomcolor=&blue. vjust=b borderbottomwidth=0.01 cellheight=0.20in}Age in Years' d_char_desc))
('^S={cellheight=0.20in}Missing Information'
('^S={borderbottomcolor=&blue. borderbottomwidth=0.02 cellheight=0.18in}' percentage16_1)
('^S={borderbottomcolor=&blue. borderbottomwidth=0.02 cellheight=0.18in}' percentage17_1)
('^S={borderbottomcolor=&blue. borderbottomwidth=0.02 cellheight=0.18in}' percentage18_1))
);
define m_type /order=data group noprint style = [vjust=b just=left cellwidth=0.60in font_face='Times New Roman' fontsize=9pt];
define d_char_desc / order=data display style = [vjust=b just=left cellwidth=0.60in font_face='Times New Roman' fontsize=9pt]
'' style(header)=[vjust=b just=left cellheight=0.18in] style(column)=[vjust=b just=left cellheight=0.35in cellwidth=0.60in];
define percentage16_1 /display style = [vjust=b just=center cellwidth=0.60in cellheight=0.05in font_face='Times New Roman' fontsize=9pt]
'CY2016' style(header)=[vjust=b just=center cellheight=0.18in] style(column)=[vjust=b just=center cellheight=0.20in cellwidth=0.40in];
define percentage17_1 /display style = [vjust=b just=center cellwidth=0.45in cellheight=0.05in font_face='Times New Roman' fontsize=9pt]
'CY2017' style(header)=[vjust=b just=center cellheight=0.18in] style(column)=[vjust=b just=center cellheight=0.20in cellwidth=0.40in];
define percentage18_1 /display style = [vjust=b just=center cellwidth=0.45in cellheight=0.05in font_face='Times New Roman' fontsize=9pt]
'CY2018' style(header)=[vjust=b just=center cellheight=0.18in] style(column)=[vjust=b just=center cellheight=0.20in cellwidth=0.40in];
compute m_type;
if m_type = 'm_tot' then
call define (_row_, 'style', 'style=[fontweight=bold background=&gray. font_face=Times]');
endcomp;
run;
ods rtf close;
You will have to explicitly format the numeric values in respective compute blocks. The numeric value referenced will depend on the analysis statistic and the syntax will be variable.statistic.
Your data (not shown) appears to be some form of pre-computed aggregation, based on the m_type = 'm_tot' source code. In that case the reference would be something like percentage16_1.sum (sum is the default analysis for numeric variables when there is a grouping specified)
Example:
Summarize some SASHELP.CARS variables and change the format for the Ford make.
proc report data=sashelp.cars;
column (
make
horsepower mpg_city mpg_highway
horsepower_custom
mpg_city_custom
mpg_highway_custom
);
define make / group ;*noprint;
define horsepower / analysis noprint mean ;
define mpg_city / analysis noprint mean ;
define mpg_highway / analysis noprint mean ;
define horsepower_custom / computed style=[textalign=right];
define mpg_city_custom / computed style=[textalign=right];
define mpg_highway_custom / computed style=[textalign=right];
compute horsepower_custom / character length=10;
if make = 'Ford'
then horsepower_custom = put (horsepower.mean, 10.4);
else horsepower_custom = put (horsepower.mean, 8.1);
endcomp;
compute mpg_city_custom / character length=10;
if make = 'Ford'
then mpg_city_custom = put (mpg_city.mean, 10.5);
else mpg_city_custom = put (mpg_city.mean, 8.2);
endcomp;
compute mpg_highway_custom / character length=10;
if make = 'Ford'
then mpg_highway_custom = put (mpg_highway.mean, 10.6);
else mpg_highway_custom = put (mpg_highway.mean, 8.3);
endcomp;
run;

Styling different groups in SAS SGPLOT

I am trying to produce a graph with multiple groupings. The sample data code is:
proc sort data=sashelp.cars out=cars;
by DriveTrain;
where n(Cylinders);
run;
I used dattrmap to add distinct colors to the different groups as follow:
data MyAttrMap;
length MARKERCOLOR CONTRASTCOLOR color $25;
ID='myreg'; value='All' ; MARKERCOLOR='red'; color='red'; MARKERSYMBOL = 'circle'; output;
ID='myreg'; value='Front'; MARKERCOLOR='blue'; color='blue'; MARKERSYMBOL = 'circle'; output;
ID='myreg1'; value='USA'; CONTRASTCOLOR='yellow'; color='yellow'; output;
ID='myreg1'; value='Europe'; CONTRASTCOLOR='black'; color='black'; output;
ID='myreg1'; value='Asia'; CONTRASTCOLOR='green'; color='green'; > > output;
run;
proc sgplot data=work.cars
dattrmap=MyAttrMap;
hbarparm category=enginesize response=horsepower/group=DriveTrain barwidth=.5 attrid=myreg name='dt';
scatter X=MPG_City Y=enginesize /group=origin name='origin' attrid=myreg1;
keylegend 'dt' / title='Drive Train' location=outside position=bottom;
keylegend 'origin' / title='Origin' location=outside position=bottom;
where DriveTrain in ('All' 'Front');
run;
The Attrmap was created with the intention of having different colors for Origin and DriveTrain however, when the output is created the same colors applied to Origin are applied to DriveTrain.
I also tried using Proc template to change the style as follow:
/*Different colors from the ones used above*/
proc template;
define style MyStyle;
parent = Styles.Listing;
STYLE graphdata1 /
MARKERSYMBOL = 'circle'
LINESTYLE = 1
CONTRASTCOLOR = liypk
COLOR = red
;
STYLE graphdata2 /
MARKERSYMBOL = 'circle'
LINESTYLE = 1
CONTRASTCOLOR = stybr
COLOR = yellow
;
STYLE graphdata3 /
MARKERSYMBOL = 'circle'
LINESTYLE = 1
CONTRASTCOLOR = mog
COLOR = green
;
STYLE graphdata4 /
MARKERSYMBOL = 'circle'
LINESTYLE = 1
CONTRASTCOLOR = brown
COLOR = pink
;
STYLE graphdata5 /
MARKERSYMBOL = 'circle'
LINESTYLE = 1
CONTRASTCOLOR = black
COLOR = grey
;
end;
run;
But still the same results were obtained. Could anyone please tell me what I'm doing wrong or how to get this to work? I'm using SAS 9.3.
Another issue I'm encountering is the sorting. I want to sort the bars so that the same origins appear together and by the horsepower. I sorted using sortkey=national and used grouporder=data as recommended by SAS but this didn't change the ordering in the output. Any help is appreciated.
.
Thanks.
You might find SGPANEL a better option for visually presenting the distributions of different groups.
ods html style=normal;
ods graphics / height=900px;
proc sgpanel data=sashelp.cars;
panelby origin
/ columns=3
;
hbar enginesize
/ group=drivetrain
groupdisplay=cluster
;
where
DriveTrain in ('Front', 'All')
and not missing(cylinders)
;
run;
Check your attribute map data set. Because you haven't specified the lengths for the Value and ID column they're truncated and don't match your data so they don't get assigned correctly.
Simplifying your problem, I assigned all the elements for testing:
I also assumed this was mocked up because of the errors in the log.
proc sort data=sashelp.cars out=cars;
by DriveTrain;
where n(Cylinders);
run;
data MyAttrMap;
length ID $10. linecolor MARKERCOLOR CONTRASTCOLOR fillcolor color value $25;
ID='myreg1';
value='USA';
contrastcolor='cxaf8dc3';
LINECOLOR='cxaf8dc3';
MARKERCOLOR='cxaf8dc3';
fillcolor='cxaf8dc3';
output;
ID='myreg1';
value='Europe';
contrastcolor='cx7fbf7b';
LINECOLOR='cx7fbf7b';
MARKERCOLOR='cx7fbf7b';
fillcolor='cx7fbf7b';
output;
ID='myreg1';
value='Asia';
contrastcolor='cx91bfdb';
LINECOLOR='cxfc8d59';
MARKERCOLOR='cxfc8d59';
fillcolor='cxfc8d59';
output;
run;
ods graphics / attrpriority=none;
proc sgplot data=work.cars dattrmap=MyAttrMap;
scatter X=MPG_City Y=enginesize /group=origin name='origin' attrid=myreg1;
where DriveTrain in ('All' 'Front');
run;

Placing a footnote in a particular alignment with proc report

I would like to to have my footnote just under the bottom of my table and perfectly left aligned with the left hand side data of the table. Can someone help me to achieve that ?
Currently
___________bottom line of table___________
Note: Is my footnote just under the line and aligned ?
But would like this :
______________bottom line of table here________
Note: Is my footnote just under the line and aligned ?
Here is the code :
data test;
input alpha $1-16 beta $18-41;
cards;
abc+def+ghi+jkl (zmc*[100]/1000-200)+23)
cab+ddd+ggg+jjj (zab*[100]/1000-200)+21)
;
run;
%let path=C:\;
ODS LISTING CLOSE;
ODS RTF PATH="&path." FILE='test.rtf '
BODYTITLE;
ODS TRACE ON;
ODS ESCAPECHAR='^';
ODS PATH SHOW;
proc report data=TEST nowd
style(report)=[background=white fontstyle=roman fontsize=2.5 fontweight=medium width=85% fontfamily='courier new']
style(header)=[background=white foreground=blue fontstyle=roman fontsize=2.5 fontweight=medium just=left fontfamily='courier new']
style(column)=[background=white fontstyle=roman fontsize=2.5 fontweight=medium fontfamily='courier new' ]
;
title "^S={ fontstyle=roman fontsize=2.5 fontweight=medium fontfamily='courier new'} testsing my footnote";
footnote"^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";
column alpha beta;
define alpha/order ;
define beta/order;
compute before;
line #1 '';
endcomp;
run;
ODS RTF CLOSE;
ODS LISTING;
Not a great solution, but replace just=l with j=l outside of the escapes, then add some spaces to align it to the table.
footnote j=l "^S={fontstyle=roman just=l fontfamily='courier new'fontsize=2.5 fontweight=medium } Note: Is my footnote just under the line and aligned ?";
Otherwise to get it perfectly aligned underneath the table and by default and left aligned use a spanned row as part of your proc report, see the example below.
options nodate nonumber;
title 'Notes After Every Table';
ods rtf file='c:\temp\tablenote.rtf' startpage=no;
ods escapechar='^';
proc report data=sashelp.class nowd;
column sex height,(Min Mean Max N);
define sex / group 'Sex ^{super 1}';
define height /analysis 'Height';
compute after / style={just=l};
line '^{super 1} Age span for students 11-16 years';
endcomp;
run;
proc report data=sashelp.class nowd;
column sex weight,(Min Mean Max N);
define sex / group 'Sex ^{super 2}';
define weight /analysis 'Weight';
compute after / style={just=l};
line '^{super 2} Note there are more boys than girls';
endcomp;
run;
ods _all_ close;
Courtesy of Cynthia Zender#SAS: https://communities.sas.com/message/231503#231503
If you want everything justified left, you could just use options nocenter;.
If you just want the report left justified, you could just use the nocenter option in the proc report statement.
Ok I see...When I use this template procedure It doesn't work :
proc template;
define style styles.testme;
parent=styles.rtf;
replace color_list/
'bgH'=white;
replace body from document / bottommargin = .2in
topmargin = .2in
rightmargin = .2in
leftmargin = .2in;
replace table from output / outputwidth = 50%
frame = hsides
rules = groups
cellpadding = 1.0pt
cellspacing = 0.1pt
borderwidth = 1.0pt;
end;
run;

Why does SGPLOT ignore my `MarkerSymbol` choices?

I'm creating a VLine plot with Proc SgPlot, with 4 groups of data. Here is my code to create the plot. (I've genericized the variable names, of course.) This is wrapped in a macro, but I don't think that makes any difference.
proc sgplot data=mydata;
vline NominalTime / Response=responseVariable Group=MyGroups stat=mean markers;
format MyGroups MyGroups.;
Where scaleNum=&scaleNum;
run;
I'm using Proc Template to customize the line colors, LineStyles, and MarkerSymbols. The Template code is below:
proc template;
define style Styles.MyNewStyle;
parent = styles.HTMLBlue;
style GraphBackground /
backgroundcolor=white;
style GraphData1 from GraphData1 /
markersymbol = "circle"
color = CXFFB44B
contrastcolor = CXFFB44B
;
style GraphData2 from GraphData2 /
markersymbol = "circle"
color = white
contrastcolor=CX000000
;
style GraphData3 from GraphData3 /
markersymbol = "Square"
color = CXD33183
contrastcolor=CXD33183
;
style GraphData4 from GraphData4 /
markersymbol = 'Square'
linestyle = 2
color = white
contrastcolor=CX555555
;
style GraphFonts from GraphFonts /
'GraphDataFont' = ("Arial",11pt)
'GraphValueFont' = ("Arial",11pt)
'GraphLabelFont' = ("Arial",11pt,bold)
'GraphFootnoteFont' = ("Arial",8pt)
'GraphTitleFont' = ("Arial",12pt,bold);
end;
run;
Of course, I've used ods html to change the output style:
ods html style=MyNewStyle;
Here is the crux of the question: the plot is generated with the colors as specified, but with incorrect markersymbol and linestyle assignments for groups 2 to 4. Stated another way, whatever markersymbol and linestyle I specify in GraphData1 is used for all of the lines in the plot, regardless of later assignments. Why is this happening?
The key to understanding this behavior is that starting with SAS 9.3, the HTML destination uses the HTMLBlue style by default. This style is a "Color priority" style, where only the color is rotated first. There are 12 defined colors. So, the first 12 group values get one of these 12 colors, with the first marker symbol and line pattern. After the first 12 groups, the next 12 groups get the second marker symbol and line pattern, with the 12 colors again.
With HTMLBlue, the other markers and line patterns will only show up after the first 12 group values.
Most other styles have attribute priority of "None". This means the all three attributes are rotated at the same time. So first group value gets color 1, symbol 1, and pattern 1. Second group value gets color 2, symbol 2, and pattern 2 and so on.
With SAS 9.4, the option ATTRPRIORITY was introduced in the Style definition and on the ODS GRAPHICS statement to control this behavior. Now, you can use this option to make any style rotate the attributes the way you want. To make HTMLBlue behave like LISTING, use the ODS Graphics option ATTRPRIORITY=none.
This works as expected:
proc template;
define style Styles.MyNewStyle;
parent = styles.HTMLBlue;
style GraphBackground /
backgroundcolor=white;
style GraphData1 from GraphData1 /
markersymbol = "circle"
color = CXFFB44B
contrastcolor = CXFFB44B
;
style GraphData2 from GraphData2 /
markersymbol = "circle"
color = white
contrastcolor=CX000000
;
style GraphData3 from GraphData3 /
markersymbol = "Square"
color = CXD33183
contrastcolor=CXD33183
;
style GraphData4 from GraphData4 /
markersymbol = 'Square'
linestyle = 2
color = white
contrastcolor=CX555555
;
style GraphFonts from GraphFonts /
'GraphDataFont' = ("Arial",11pt)
'GraphValueFont' = ("Arial",11pt)
'GraphLabelFont' = ("Arial",11pt,bold)
'GraphFootnoteFont' = ("Arial",8pt)
'GraphTitleFont' = ("Arial",12pt,bold);
end;
run;
data mydata;
do mygroups = 1 to 4;
do nominaltime=1 to 20;
responsevariable = mygroups*nominaltime;
output;
end;
end;
run;
ods html style=mynewstyle;
proc sgplot data=mydata;
vline NominalTime / Response=responseVariable Group=MyGroups stat=mean markers;
* format MyGroups MyGroups.;
* Where scaleNum=&scaleNum;
run;
ods html close;
If that works on your system, then you have a problem with your MyGroups. format or values, I suspect. What values does MyGroups have natively - 1-4 or something else that MyGroups. format converts to 1-4?
If that doesn't work on your system, give more system details - 9.3, 9.2, etc.?