Help using Base SAS procedures

Can anyone help why the error is coming while Generating text at bottom of table in Proc Report?

Reply
Contributor
Posts: 49

Can anyone help why the error is coming while Generating text at bottom of table in Proc Report?

ods escapechar='^';

ods rtf

file='D:\Clin-Dem\HCC\New Folder\3.rtf'

style=styles.journal;

title justify=left font=Arial bold 'Table - 14.1 Summary of Adverse Events';

proc report data=sasuser.total1 nofs

style(header)=[vjust=m font_size=10 pt font_weight=bold]

/*style(column)=[just=l vjust=m font_size=9.5 pt]*/

style=[rules=groups frame=above cellpadding=4 pt]

;

column page type hlt_indx ('^R"\ql" High Level Term' variable) fpt1 fpt2 fpt3 ;

define page / order noprint;

define type / display noprint;

define hlt_indx / display noprint;

define variable / order=data

/*'^R"\ql\li600"Low Level Term' style(column)=[cellwidth= 6.25 cm] flow*/;

define fpt1 / 'Placebo/(n=40)' style(column)=[just=c cellwidth=2.65cm];

define fpt2 / 'Sorafenib/(n=65)' style(column)=[just=c cellwidth=2.65cm];

define fpt3 / 'Total/(n=105)' style(column)=[just=c cellwidth=2.65cm];

/*define last / computed noprint;*/

break after page /page ;

compute after page / style=[just=l protectspecialchars=off font_face='Arial'];

text1='\brdrt\brdrth ';

text2="^S={font_size=8 pt} Data are number of subjects experiencing event and percent per treatment

^R" "group in parentheses. ^{dagger} Low Level Term is taken from the verbatim variable

^R" "'aedesc' for uncoded (^S={foreground=red} red ^S={foreground=black font_size=8pt}) terms";

line text1 $char300.;

line text2 $char500.;

endcomp;

run;

ods rtf close;

Error is coming like this:

text2="^S={font_size=8 pt} Data are number of subjects experiencing event and percent per

2   ! treatment^R"

2   ! "group in parentheses. ^{dagger} Low Level Term is taken from the verbatim variable^R" "'aedesc'

  --------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

  388                                                                                200

2   !  for uncoded (^S={foreground=red} red

ERROR 388-185: Expecting an arithmetic operator.

ERROR 200-322: The symbol is not recognized and will be ignored.

NOTE: The preceding messages refer to the COMPUTE block for BREAK AFTER page.

NOTE: Will not run due to compilation errors.

NOTE: Character values have been converted to numeric values at the places given by: (Line)Smiley SadColumn).

  2:8 2:192
text2="^S={font_size=8 pt} Data are number of subjects experiencing event and percent per

2   ! treatment^R"

2   ! "group in parentheses. ^{dagger} Low Level Term is taken from the verbatim variable^R" "'aedesc'

  --------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------

  388                                                                                200

2   !  for uncoded (^S={foreground=red} red

ERROR 388-185: Expecting an arithmetic operator.

ERROR 200-322: The symbol is not recognized and will be ignored.

NOTE: The preceding messages refer to the COMPUTE block for BREAK AFTER page.

NOTE: Will not run due to compilation errors.

NOTE: Character values have been converted to numeric values at the places given by: (Line)Smiley SadColumn).

  2:8 2:192

NOTE: The SAS System stopped processing this step because of errors.

NOTE: There were 39 observations read from the data set SASUSER.TOTAL1.

NOTE: PROCEDURE REPORT used (Total process time):

  real time       0.07 seconds
  cpu time        0.03 seconds
Trusted Advisor
Posts: 1,137

Re: Can anyone help why the error is coming while Generating text at bottom of table in Proc Report?

Posted in reply to devarayalu

Hi Devarayalu,

I think there is no problem with the code a small change i hope will solve the problem

it should be compute after _page_, you missed the _page_.

Please check and try.

Thanks,

Jag

Thanks,
Jag
Ask a Question
Discussion stats
  • 1 reply
  • 148 views
  • 0 likes
  • 2 in conversation