DATA Step, Macro, Functions and more

Why there is NO group=xx in the output window?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 86
Accepted Solution

Why there is NO group=xx in the output window?

[ Edited ]

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.


Accepted Solutions
Solution
‎08-16-2016 07:40 AM
Super User
Posts: 10,487

Re: Why there is NO group=xx in the output window?

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.

View solution in original post


All Replies
Super User
Super User
Posts: 7,401

Re: Why there is NO group=xx in the output window?

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;
Frequent Contributor
Posts: 86

Re: Why there is NO group=xx in the output window?

Thanks for your advice. I will attached the shot in future. Not resolved.

SAS Super FREQ
Posts: 3,475

Re: Why there is NO group=xx in the output window?

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;

 

 

Frequent Contributor
Posts: 86

Re: Why there is NO group=xx in the output window?

Hi Rick,

 

I think it is due to the BYLINE options.

Now resolved.

 

Thanks.

Jack.

Solution
‎08-16-2016 07:40 AM
Super User
Posts: 10,487

Re: Why there is NO group=xx in the output window?

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.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 328 views
  • 4 likes
  • 4 in conversation