BookmarkSubscribeRSS Feed
rajredy7172012
Calcite | Level 5

Trying to use proc report to get a proc format to resolved but not working.

proc format;
value grpfmt
1 = "< 6 years "
2 = "6 to < 12 years "
3 = "12 to < 18 years"
4 = ">= 18 years "
;
value aprd1_
/*0 = " "*/
1 = "PK-I Infusion 1"
2 = "PK-I Infusion 2"
3 = "Period 1"
4 = "Period 2"
5 = "PK-II Infusion 3"
6 = "PK-II Infusion 4"
7 = "Period 3"
8 = "PK-III Infusion 5"
99="End of Study"
;

value $regname
'Actual Potency of ADAMTS13 Activity [a]' = 'Actual Potency of ADAMTS13 Activity [a]'
'3FRETS-VWF73 Potency of ADAMTS13 Activity' = 'FRETS-VWF73 Potency of ADAMTS13 Activity';

run;

** produce report ;
%odsstart(output_id=1, useods=0);

ods escapechar = "^";

options FORMCHAR="|_---|+|---+=|-/\<>*";

proc report data=finaldsc split="*" spacing=1 center nowindows wrap /*headskip*/ missing headline /*ps=42*/ /*spanrows*/ out=qctlf.&_progname.(drop=_pg _break_) ;
column ("__" _pg order1 statorder &gByVars. catc paramstat1 c1 c2);

define _pg / order order=internal noprint;
define order1 / order order=internal noprint;
define statorder / order order=internal noprint;

define cohortn / order order=internal noprint;
define cohort / order order=internal noprint;
define &gGrpVarN. / order order=internal noprint;
define &gGrpVar. / order order=internal noprint;
define aperiod / order order=internal noprint;
define aperiodc / order order=internal noprint;
define catc / order order=internal noprint;

define paramstat1 / display "" left width=75;
define c1 / display style(header)= [asis=on] "TAK-755" center width=31 ;
define c2 / display style(header)= [asis=on] "SoC" center width=31;

break after order1 / skip;
break after _pg / page;

compute before _page_;
line @1 "&gPageHeader. " &gGrpVarN. grpfmt. ;
line @1 "Treatment Cohort: " cohortn cofmt. ;
endcomp;

compute before _pg;
line @1 " " aperiod aprd1_.;
endcomp;

compute before order1;
line @1 " " catc $regname./*catn catc.*/;
endcomp;

compute after _page_;
line @1 139* '_';
endcomp;

quit;

%odsstop;

%let list=&_progname..lst;

%odsstart(bundleoptions='toc=no,BookMarkTitleStart=3', metadata=no, outname=&_progname..rtf);
%collate_list(&list);
%odsstop;
3 REPLIES 3
Kurt_Bremser
Super User

PROC REPORT is not an interactive procedure, so QUIT; is the wrong statement to terminate it. Use RUN; instead.

 

NEVER, EVER just say "it's not working" without supplying additional information; post the complete log, especially when ERRORs or WARNINGs occur, and if you get a result, state where it does not meet your expectations

rajredy7172012
Calcite | Level 5

Not getting any error. But, the output doesn't get the formats like below.

 

rajredy7172012_0-1701096082308.png

 

ballardw
Super User

@rajredy7172012 wrote:

Not getting any error. But, the output doesn't get the formats like below.

 

 


What does "doesn't get the formats" mean in this context?

I don't see any relationship between that picture and the format code shown above. Unfortunately  while pictures may be worth a 1000 words the words may not mean anything in relation to solving a problem without details of what the actual problem is.

 

Your "code" is practically meaningless. You have multiple macro variables without showing a definition of where they might come from or the values, much less any example of data that would be used by that Proc Report.

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 564 views
  • 0 likes
  • 3 in conversation