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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.