| Date: | Fri, 19 Mar 2004 00:31:05 -0800 |
| Reply-To: | Xavier Autret <xav_x@NOOS.FR> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Xavier Autret <xav_x@NOOS.FR> |
| Organization: | http://groups.google.com |
| Subject: | Re: remove "table of" generated by the freq procedure in ods html |
| Content-Type: | text/plain; charset=ISO-8859-1 |
I solved my problem by using a tagset,
I don't write the first ligne in the "head" section.
Xavier Autret
<sasl:code>
proc template;
define tagset my.Phtml;
parent = tagsets.phtml;
notes "This is the plain HTML definition/XA: without table
of...";
define event data;
start:
put "<td";
trigger rowcol;
trigger align;
put ">";
put VALUE / if cmp(SECTION, "head") cmp(ROW, "2");
put VALUE / if cmp(SECTION, "head") cmp(ROW, "3");
put VALUE / if cmp(SECTION, "body");
finish:
put "</td>" NL;
end;
end;
run;
ods markup tagset=my.phtml file="%sysfunc(pathname(WORK,
L))\test1.html";
ods listing close;
ods noptitle;
proc freq data=SASHELP.CLASS;
tables sex*age/nocum nopercent norow nocol;
run;
ods ptitle;
ods listing;
ods markup close;
</sasl:code>
chang_y_chung@HOTMAIL.COM (Chang Y. Chung) wrote in message news:<200403051528.i25FSAd11627@listserv.cc.uga.edu>...
> On Fri, 5 Mar 2004 00:53:19 -0800, Xavier Autret <xav_x@NOOS.FR> wrote:
>
> >Hello,
> >
> >Here's my sample code,
> >ods html file="%sysfunc(pathname(WORK, L))\see.html" style=sasweb;
> >ods noptitle;
> >title1;
> >proc freq data=SASHELP.CLASS;
> > tables (SEX AGE)*weight/nocum nofreq norow nocol;
> >run;
> >ods ptitle;
> >ods html close;
> >
> >That small piece of code generate messages like:
> >"Table of SEX by WEIGHT" and "Table of AGE by WEIGHT"
> >
> >How can I remove/controll the words "table" "of" and "by" in the
> >genereated html output?
> >
> >I already look in the table Base.Freq.OneWayList, but it's seems not
> >be designed for crosstabulation.
> >
> >Thanks!
> >
> Hi, Xavier,
>
> All else fails, then just remember that html file is just a text file. A
> post processing may get handy.
>
> Cheers,
> Chang
>
> <sasl:code>
> %let seeHtml = %sysfunc(pathname(WORK))\see.html;
>
> ods html file="&seeHtml." style=sasweb;
> ods noptitle noresults;
> title1;
> proc freq data=SASHELP.CLASS;
> tables (SEX AGE)*weight/nocum nofreq norow nocol;
> run;
> ods ptitle results;
> ods html close;
>
> /* post-processing */
> data _null_;
> if _n_ = 1 then do;
> change1 = "'Table of Age by Weight' to 'Positively Correlated?'";
> change2 = "'Table of Sex by Weight' to 'Who''s heavier?'";
> rx = rxparse(change1 || "," || change2);
> retain rx;
> end;
> infile "&seeHtml." lrecl=32767;
> file "&seeHtml." lrecl=32767;
> input;
> call rxchange(rx, 1, _infile_);
> put _infile_;
> run;
> x "start &seeHtml.";
> </sasl:code>
|