BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
paddyb
Quartz | Level 8
58         %macro contstats(ds=,var=,mtf=,stf= ,maxtf= ,mintf= ,medf=);
59         
60         proc means data = &ds.  completetypes nway chartype missing noprint  ;
61         class trt02p/missing mlf;
62           var &var;
63         /*  ods output summary=stats&var (drop=_type_ _freq_);*/
64         
65         output out = stats&var (drop=_type_ _freq_) n=nt mean=mt stddev=st median=mediant min=mint max=maxt  ;
66         run;
67         
68         data st_&var(drop=mt st nt mediant mint maxt trt02p);
69         set stats&var;
70         n=strip(nt);
71         Mean = strip(put(mt,&mtf))||' ('||strip(put(st,&stf))||')';
72         Min=strip(put(mint,&mintf))||' - '||strip(put(maxt,&maxtf));
73         Median=strip(put(Mediant,&medf));
74         trt02p_=strip(put(trt02p,$trt.));
5                                                                   The SAS System                                           16:03 Monday, May 7, 2018

75         run;
76         
77         proc transpose data = st_&var /*stats&var*/ out = stat_&var ;
78         id trt02p_ ;
79         var n Mean median Min;
80         run;
81         %mend contstats;
82         
83         /********get continuous variable statistic******/
84         %contstats(ds=adsl_,var=aage,mtf=8.2,stf=8.2 ,maxtf=5.1 ,mintf=5.1 ,medf=8.2);


NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).
84:52

how to get rid of this note?Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

This statement would definitely generate such a note:

 

 n=strip(nt);

 

Try switching to:

 

n = strip(put(nt, 8.));

 

View solution in original post

4 REPLIES 4
novinosrin
Tourmaline | Level 20

options nonotes;

 

And you are better of using catx to concatenate than || operator

 

a quick look at your code makes me think 

n=strip(nt);

this causes the note to be written to the log 

paddyb
Quartz | Level 8

catx also dont work.getting same note

Astounding
PROC Star

This statement would definitely generate such a note:

 

 n=strip(nt);

 

Try switching to:

 

n = strip(put(nt, 8.));

 

paddyb
Quartz | Level 8

Thanks a lot.You are right :).It worked

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 830 views
  • 1 like
  • 3 in conversation