From: siddharth khanna on
Hi,

I use the code :-

ods html on;
title 'Stepwise Regression method';
proc reg data=review1 outest = est4;
model Z = X Y / SELECTION = rsquare cp aic sbc b best=3;
RUN;
quit;
ods html close;

i want to open the table that i get in the output data set 'est4'
into Word . I get the log as -

98 ods html close;
99 ods html on;
--
22
76
ERROR 22-322: Syntax error, expecting one of the following: EXCLUDE,
SELECT.
ERROR 76-322: Syntax error, statement will be ignored.

Kindly help what I'm mistaken in?

Kindest Regards,
Siddharth
From: Arthur Tabachneck on
Siddharth,

You just have to specify the ods statements correctly. In short, take
a look at the documentation. The following produces both an rtf and
an html version. You can probably use either for Word.

data review1;
set sashelp.class (rename=
(age=z height=x weight=y));
run;

ods rtf file='c:\test.rtf';
title 'Stepwise Regression method';
proc reg data=review1 outest = est4;
model Z = X Y / SELECTION = rsquare cp aic sbc b
best=3;
RUN;
quit;
ods rtf close;

ods html file='c:\test.html';
title 'Stepwise Regression method';
proc reg data=review1 outest = est4;
model Z = X Y / SELECTION = rsquare cp aic sbc b
best=3;
RUN;
quit;
ods html close;

Art
--------------
On Jul 4, 5:27 am, siddharth khanna
<siddharthkhanna...(a)googlemail.com> wrote:
> Hi,
>
> I use the code :-
>
> ods html on;
> title 'Stepwise Regression method';
> proc reg data=review1 outest = est4;
>                 model Z = X Y / SELECTION = rsquare cp aic sbc b best=3;
> RUN;
> quit;
> ods html close;
>
> i want to open the table that i get in the output data set 'est4'
> into Word  . I get the log as -
>
> 98   ods html close;
> 99   ods html on;
>               --
>               22
>               76
> ERROR 22-322: Syntax error, expecting one of the following: EXCLUDE,
> SELECT.
> ERROR 76-322: Syntax error, statement will be ignored.
>
> Kindly help what I'm mistaken in?
>
> Kindest Regards,
> Siddharth

From: siddharth khanna on
On Jul 4, 5:32 pm, Arthur Tabachneck <art...(a)netscape.net> wrote:
> Siddharth,
>
> You just have to specify the ods statements correctly.  In short, take
> a look at the documentation.  The following produces both an rtf and
> an html version.  You can probably use either for Word.
>
> data review1;
>   set sashelp.class (rename=
>    (age=z height=x weight=y));
> run;
>
> ods rtf file='c:\test.rtf';
> title 'Stepwise Regression method';
> proc reg data=review1 outest = est4;
>                 model Z = X Y / SELECTION = rsquare cp aic sbc b
> best=3;
> RUN;
> quit;
> ods rtf close;
>
> ods html file='c:\test.html';
> title 'Stepwise Regression method';
> proc reg data=review1 outest = est4;
>                 model Z = X Y / SELECTION = rsquare cp aic sbc b
> best=3;
> RUN;
> quit;
> ods html close;
>
> Art
> --------------
> On Jul 4, 5:27 am, siddharth khanna
>
> <siddharthkhanna...(a)googlemail.com> wrote:
> > Hi,
>
> > I use the code :-
>
> > ods html on;
> > title 'Stepwise Regression method';
> > proc reg data=review1 outest = est4;
> >                 model Z = X Y / SELECTION = rsquare cp aic sbc b best=3;
> > RUN;
> > quit;
> > ods html close;
>
> > i want to open the table that i get in the output data set 'est4'
> > into Word  . I get the log as -
>
> > 98   ods html close;
> > 99   ods html on;
> >               --
> >               22
> >               76
> > ERROR 22-322: Syntax error, expecting one of the following: EXCLUDE,
> > SELECT.
> > ERROR 76-322: Syntax error, statement will be ignored.
>
> > Kindly help what I'm mistaken in?
>
> > Kindest Regards,
> > Siddharth

Hi, thanks very much. Could you suggest me what actually does the
syntax ods html file='c:\test.rtf'; and ods rtf close; does as a
new .rtf file gets created in my user in disk C

kindest regards,
Sid
From: Arthur Tabachneck on
Siddharth,

Take a look at:
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/titlepage.htm

As long as the two files aren't already open, the code I suggested
creates (or overwrites) the two files (one .rtf and one .html)
specified in the statements.

Art
-------------
On Jul 4, 9:29 am, siddharth khanna
<siddharthkhanna...(a)googlemail.com> wrote:
> On Jul 4, 5:32 pm, Arthur Tabachneck <art...(a)netscape.net> wrote:
>
>
>
>
>
> > Siddharth,
>
> > You just have to specify the ods statements correctly.  In short, take
> > a look at the documentation.  The following produces both an rtf and
> > an html version.  You can probably use either for Word.
>
> > data review1;
> >   set sashelp.class (rename=
> >    (age=z height=x weight=y));
> > run;
>
> > ods rtf file='c:\test.rtf';
> > title 'Stepwise Regression method';
> > proc reg data=review1 outest = est4;
> >                 model Z = X Y / SELECTION = rsquare cp aic sbc b
> > best=3;
> > RUN;
> > quit;
> > ods rtf close;
>
> > ods html file='c:\test.html';
> > title 'Stepwise Regression method';
> > proc reg data=review1 outest = est4;
> >                 model Z = X Y / SELECTION = rsquare cp aic sbc b
> > best=3;
> > RUN;
> > quit;
> > ods html close;
>
> > Art
> > --------------
> > On Jul 4, 5:27 am, siddharth khanna
>
> > <siddharthkhanna...(a)googlemail.com> wrote:
> > > Hi,
>
> > > I use the code :-
>
> > > ods html on;
> > > title 'Stepwise Regression method';
> > > proc reg data=review1 outest = est4;
> > >                 model Z = X Y / SELECTION = rsquare cp aic sbc b best=3;
> > > RUN;
> > > quit;
> > > ods html close;
>
> > > i want to open the table that i get in the output data set 'est4'
> > > into Word  . I get the log as -
>
> > > 98   ods html close;
> > > 99   ods html on;
> > >               --
> > >               22
> > >               76
> > > ERROR 22-322: Syntax error, expecting one of the following: EXCLUDE,
> > > SELECT.
> > > ERROR 76-322: Syntax error, statement will be ignored.
>
> > > Kindly help what I'm mistaken in?
>
> > > Kindest Regards,
> > > Siddharth
>
> Hi, thanks very much. Could you suggest me what actually does the
> syntax ods html file='c:\test.rtf'; and ods rtf close;  does as a
> new .rtf file gets created in my user in disk C
>
> kindest regards,
> Sid- Hide quoted text -
>
> - Show quoted text -