Help using Base SAS procedures

Problem with proc report - NOTE: Groups are not created because (...)

Reply
N/A
Posts: 0

Problem with proc report - NOTE: Groups are not created because (...)

When I run the proc report detailed below, I have the following message:

NOTE: Groups are not created because the usage of SPACE_LISTING is DISPLAY.
How can I update my SAS code in order to avoid such messages?
Moreover, when I put a 'GROUP' option in the define statement of the variable SPACE_LISTING then the new note message become:
NOTE: Groups are not created because the usage of B is DISPLAY.
So, I don't understand what can I do?? *** Please help ***!
Thank you very much

Data TEST;
A=1; B=2; C=3; SPACE_LISTING=""; Output;
A=1; B=4; C=2; SPACE_LISTING=""; Output;
A=1; B=3; C=3; SPACE_LISTING=""; Output;
A=1; B=2; C=1; SPACE_LISTING=""; Output;
A=2; B=2; C=3; SPACE_LISTING=""; Output;
A=2; B=4; C=2; SPACE_LISTING=""; Output;
A=2; B=3; C=3; SPACE_LISTING=""; Output;
A=2; B=2; C=1; SPACE_LISTING=""; Output;
Run;
Ods rtf file="C:\MyData\essai.rtf" headery=720 footery=720 NoToc_Data;
PROC REPORT DATA=TEST SPLIT="¤" NOCENTER NOWD MISSING SPACING=0 Style(report)=[just=center] Style(header)=[protectspecialchars=off posttext='\brdrb\brdrs\brdrtnthsg\brdrw10' font_weight=bold just=left];
COLUMN A SPACE_LISTING B SPACE_LISTING C;
COMPUTE BEFORE A;
LINE '\brdrt\brdrs\brdrhair\brdrw10 \brdrb\brdrs\brdrdash\brdrw10 \b Treatment group=' A;
ENDCOMP;
DEFINE A / WIDTH=55 LEFT FLOW GROUP NOPRINT Style(column)={CELLWIDTH=72mm};
DEFINE B / WIDTH=9 LEFT FLOW Style(column)={CELLWIDTH=12mm};
DEFINE C / WIDTH=10 LEFT FLOW Style(column)={CELLWIDTH=14mm};
DEFINE SPACE_LISTING / " " Style(column)={CELLWIDTH=1mm};
RUN;
Ods Rtf close;
SAS Super FREQ
Posts: 8,864

Re: Problem with proc report - NOTE: Groups are not created because (...)

Posted in reply to deleted_user
Hi:
You might try using ORDER (which will allow you to do the COMPUTE BEFORE A) instead of GROUP. And then, put your PROTECTSPECIALCHARS=OFF on a STYLE= override for LINES. Although that area (with the treatment group) is like a HEADER, the style is coming from the STYLE(LINE) or on the COMPUTE statment where the LINE is placed.
[pre]
Ods rtf file="C:\temp\essai.rtf"
headery=720 footery=720 NoToc_Data;
PROC REPORT DATA=TEST SPLIT="¤"
NOCENTER NOWD MISSING SPACING=0
Style(report)=[just=center]
Style(header)=[protectspecialchars=off posttext='\brdrb\brdrs\brdrtnthsg\brdrw10' font_weight=bold just=left];
COLUMN A SPACE_LISTING B SPACE_LISTING C;
COMPUTE BEFORE A /
style={protectspecialchars=off};
LINE '\brdrt\brdrs\brdrhair\brdrw10 \brdrb\brdrs\brdrdash\brdrw10 \b Treatment group=' A;
ENDCOMP;
DEFINE A / LEFT order noprint
Style(column)={CELLWIDTH=72mm};
DEFINE B / LEFT order
Style(column)={CELLWIDTH=12mm};
DEFINE C / LEFT order
Style(column)={CELLWIDTH=14mm};
DEFINE SPACE_LISTING / " "
Style(column)={CELLWIDTH=1mm};
RUN;
Ods Rtf close;
[/pre]

I made A, B, and C all ORDER variables, but if you don't want C to be ORDER, then change the usage to DISPLAY. GROUP usage tells PROC REPORT to "collapse" or summarize the rows, using the analysis variables on the report. For an example of what I mean, submit this code one time with the usage of "Group" and then submit it a second time with a usage of "Order" and compare the results.
[pre]
ods listing;
proc report data=sashelp.class nowd;
column sex height;
define sex / group;
define height / sum;
run;

[/pre]

cynthia
N/A
Posts: 0

Re: Problem with proc report - NOTE: Groups are not created because (...)

Posted in reply to Cynthia_sas
thanks a lot, it works well!
BR,
Violaine
Ask a Question
Discussion stats
  • 2 replies
  • 797 views
  • 0 likes
  • 2 in conversation