Hi, I'm trying to add a contents table in a rtf file. As I saw in other discussions and examples, the code is something like: "ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;" Everything fine, and in the rtf output, the table of contents is created and when I update the field, the contents appear. The problem is about the headers and footnotes. I have defined this headers and footnotes for the entire document, and I change it in each report, but, the TOC seems to be in a separated section of the document, and these titles are not populated. How can I add them? Also, and this is minnor at this time, I would like to know how to change the font size of the TOC elements, I tryied with proc template, but with any change.. The code: options orientation=landscape replace center nodate nonumber ;
ODS LISTING CLOSE;
ods ESCAPECHAR='^';
Title1 J=l "Study 1" J=R "Page ^{thispage} of ^{lastpage}";
Footnote1 J=L " myself";
ods rtf file="myfolder\Table_X.rtf" style=Journalvs CONTENTS toc_data;
title2 J=l "Table 1. Baseline and disease categorical characteristics.";
Footnote1 j=l "P-values obtained from Fisher exact test(*) or simulated MC Fisher test (#).; NA: Not apply.";
Footnote2 J=L " myself";
ODS PROCLABEL=' ';
proc report data=tmp.cats contents='Table 1' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;
column order_1 order_2 order_3 col1 col2;
define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];
compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;
compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;
break after order_1 / page contents=' ';
break before order_1 / page contents=' ';
run;
title2 J=l "Table 2.";
Footnote1 j=l "P-values obtained from t-test of equal or unequal (**) variances.; NA: Not apply.";
Footnote2 J=L "myself";
ODS PROCLABEL=' ';
proc report data=tmp.conts contents='Table 2' center style(report)={just=center} style(header)=[background=white bordercolor=black borderbottomwidth=0.1pt vjust=center] nowd split="@" style(column)=[bordercolor=white];
column order_1 order_2 order_3 col1 col2;
define order_1 / order noprint;
define order_2 / order noprint;
define order_3 / order noprint;
define col1 / display "Group" left style(column)=[cellwidth=10% asis=on];
define col2 / display "Parameter" left style(column)=[cellwidth=15% asis=on] style(header)=[bordertopwidth=0pt];
compute before order_2 / style=[just=l font_face=Courier font_size=8pt font_weight=bold foreground=black background=white];
line j=l " ";
endcomp;
break after order_1 / page contents=' ';
break before order_1 / page contents=' ';
run;
ods rtf close;
ods html close;
ods listing;
... View more
Hi, I wish to send email to multiple people from the dataset. Dataset contains Name and email address. I should send each of them with Hi Name, with message body. In actual data around 100 email is present and sample data sharing below I have tried below method but getting an error data Employee;
input Name $ Email :$30.;
datalines;
John John@xyz.com
david david@xyz.com
Joe joe@xyz.com
;
%macro sendreports(name,email);
filename outbox email;
data _null_;
file outbox
to= ("&email")
subject="Test subject"
file outbox;
put "Dear &name.,";
put "Thank you";
run;
%mend Sendreports;
data _null_;
Set Employee;
call execute(cats('%sendreports(',email,',',name,')'));
run; Please guide me to do it. @Kurt_Bremser @Ksharp @Tom @yabwon @PaigeMiller
... View more
I have got the SAS re-installed in my personal laptop. Earlier when I used to open a new file whether it is a SAS data file or a SAS code, they used to open in separate windows. However, now when I open any kind of SAS files, all the files get clubbed under one window and within the process flow as shown in the attached screenshot. This makes it quite difficult to see these different files separately or at the same time. Could anyone please help me resolve this issue? Thanks
... View more
Hi guys:
I have many ANOVAs to be run and each of them has its respective p value and R squares.
All ANOVAs have the same amount of observations, this means thar ERROR I and III could be taken to make part of the table i need to get
There we go, we have 3 ANOVA, everyone is a different answer on each environment:
data have;
input order environment country$ observation;
cards; 1 1 a 11.7062885827733 2 1 a 12.5326186073177 3 1 a 12.1121866473611 4 1 a 10.6770770786762 5 1 b 12.7272303160372 6 1 b 12.5069020572854 7 1 b 10.3801953337563 8 1 b 11.3699075949466 9 1 b 14.7913170706891 10 2 c 11.7957215280586 11 2 c 12.7967928055036 12 2 c 12.3156597291194 13 2 c 11.4903775240095 14 2 c 12.2868489869184 15 2 d 12.0244581514243 16 2 d 11.2738963155379 17 2 d 11.2017213686765 18 2 d 12.6084387827896 19 2 d 13.2818434423956 20 3 e 12.7756560519949 21 3 e 11.0392289428102 22 3 e 12.0000826320338 23 3 e 11.139270842614 24 3 e 13.5663343765743 25 3 f 11.7650627921355 26 3 f 12.6102709811389 27 3 f 11.5515913330262 28 3 f 14.0639297127507 29 3 f 12.3158309468017
proc glm data = have;
where environment = 1; class country order; model observation = country order; random order; means country / duncan tukey lines; run; quit;
proc glm data = have;
where environment = 2; class country order; model observation = country order; random order; means country / duncan tukey lines; run; quit;
proc glm data = have;
where environment = 3; class country order; model observation = country order; random order; means country / duncan tukey lines; run; quit;
now, we have to mount a new table containing:
Environment
rsquared
P value Model
P value Error I
p value ERROR III
1
2
3
IMPORTANT INFORMATION IN BIG CAPS
DATA PRESENTED HERE IS ENOUGH TO ACCOMPLISH THE PUZZLE, NO NEED TO GET MORE DETAILS.
Thanks for the help
Bets regards, always
... View more
Hello SAS community! I have a dataset where each entry has a date and timestamp in "DATETIME20." format. Examples of data entry dates (there are tens of thousands in each month, going back many years): 16FEB2021:07:02:19 28MAR2023:11:52:22 06JAN2024:17:23.51 21APR2024:23:02:38 I am trying to run a proc freq where I get the count of the events by month and year. Ideally the output would look something like this: NOV23 37248 DEC23 41836 JAN24 39234 FEB24 52868 or even better NOV2023 37248 DEC2023 41836 JAN2024 39234 FEB2024 52868 My code is presently: PROC FREQ DATA=FLAGSDAT; TABLE ENTRY_DATE*FLAG_VALUE / NOPERCENT NOCUM NOROW NOCOL; RUN; The current code's output looks like this (using a dummy dataset for speed of testing where all the timestamps are at midnight): 31DEC2023:00:00:00 ‚ 9 01JAN2024:00:00:00 ‚ 11 22JAN2024:00:00:00 ‚ 13 13FEB024:00:00:00 ‚ 12 I tried using this code: PROC FREQ DATA=FLAGSDAT; TABLE ENTRY_DATE*FLAG_VALUE / NOPERCENT NOCUM NOROW NOCOL; FORMAT ENTRY_DATE MONYY.; RUN; But that did not work. Any advice for a simple fix to get the dates in the PROC FREQ output to just be MONYY or MONYYYY? For my dummy data, I would like the output to look like: DEC2023 9 JAN2024 24 FEB2024 12 Thank you in advance!
... View more