Dear All,
I have one wired question noticed recent days.
Suppose I have a group variable with 3 levels(like 1, 2 and 3), when I do an analysis by use BY Group statement, in the past, I can get the information in the output with header : Group=1 xxx; Group=2 xxx; Group=3 xxx; But recent days I can't see this. I can all these results in the output are stacked. It is not convenient to decide which page to which page is the result for group 1, 2 and 3, respecitvely, easily, do you know if there is an option that can control this ?
I use SAS 9.4 .
Thanks,
Jack.
You might get this behavior if the BYLINE system option has been set to NOBYLINE.
It would be very simple to try:
options byline;
before the program and see if that fixes this.
Hi,
Sorry, you will need to clarify your question, show example test data in a datastep, and what the output should look like and what code you are running. You can get group information in a title or such like by:
ods rtf file="....rtf"; proc print data=sashelp.class; by sex; title "Gender=#byval1"; run; ods rtf close;
Thanks for your advice. I will attached the shot in future. Not resolved.
What has recently changed about the data or the program? We might need a screenshot of the output or the program that gerneates the output.
Could there have been a change to the label of the BY variable? Compare the following analyses. If the BY variable does not have a label, then the header is
BYVAR_NAME=Level
but if a label exists you will get
BYVAR_LABEL=Level
proc sort data=sashelp.cars out=cars;
by origin;
run;
title "Output when BY variable does not have a label";
proc means data=cars;
by origin;
var mpg:;
run;
title "Output when BY variable has a label";
proc means data=cars;
label origin="My Group";
by origin;
var mpg:;
run;
Hi Rick,
I think it is due to the BYLINE options.
Now resolved.
Thanks.
Jack.
You might get this behavior if the BYLINE system option has been set to NOBYLINE.
It would be very simple to try:
options byline;
before the program and see if that fixes this.
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.