From: "Data _null_;" on
Maybe not so weird, I think I like it. To obtain the behavior you
desire put a 1 an the end of the filename.

ods html file="junk1aa1.html"

to produce 19 files junk1aa1-junk1aa19



On 1/21/10, Ya Huang <ya.huang(a)amylin.com> wrote:
> Hi there,
>
> When you use newfile=bygroup option for ods, SAS will automatically
> generate separated files with incremental number as suffix to the file name
> specified, which make sense. What not make sense is that if you
> already have a number in the middle of the filename, the number incremental
> will starts there, not appending new numbers at the end. For example,
> the following code, I expected to see the file names as
>
> junk1aa.html, junk1aa1.html, junk1aa2.html, ....
>
> instead, I get this:
>
> junk1aa.html, junk2aa.html, junk3aa.html,....
>
> Isn't it weird?
>
> Your thoughts?
>
> Thanks
>
> Ya
>
> 12 ods html close;
> 13 ods html file="c:\temp\junk1aa.html" style=myhtml newfile=bygroup;
> NOTE: Writing HTML Body file: c:\temp\junk1aa.html
> 14
> 15 proc sort data=sashelp.class out=xx;
> 16 by name;
> 17 run;
>
> NOTE: There were 19 observations read from the data set SASHELP.CLASS.
> NOTE: SAS sort was used.
> NOTE: The data set WORK.XX has 19 observations and 5 variables.
> NOTE: PROCEDURE SORT used (Total process time):
> real time 0.01 seconds
> cpu time 0.00 seconds
>
>
> 18
> 19 proc report nowd data=xx;
> 20 column _all_;
> 21 by name;
> 22 run;
>
> NOTE: Writing HTML Body file: c:\temp\junk2aa.html
> NOTE: The above message was for the following BY group:
> Name=Alice
> NOTE: Writing HTML Body file: c:\temp\junk3aa.html
> NOTE: The above message was for the following BY group:
> Name=Barbara
> NOTE: Writing HTML Body file: c:\temp\junk4aa.html
> NOTE: The above message was for the following BY group:
> Name=Carol
> NOTE: Writing HTML Body file: c:\temp\junk5aa.html
> NOTE: The above message was for the following BY group:
> Name=Henry
> NOTE: Writing HTML Body file: c:\temp\junk6aa.html
> NOTE: The above message was for the following BY group:
> Name=James
> NOTE: Writing HTML Body file: c:\temp\junk7aa.html
> NOTE: The above message was for the following BY group:
> Name=Jane
> NOTE: Writing HTML Body file: c:\temp\junk8aa.html
> NOTE: The above message was for the following BY group:
> Name=Janet
> NOTE: Writing HTML Body file: c:\temp\junk9aa.html
> NOTE: The above message was for the following BY group:
>
From: "Huang, Ya" on
Nice! I'm thinking to use something like AA,AB,AC etc to replace the
middle number.
This way, I don't have to :-)


-----Original Message-----
From: Data _null_; [mailto:iebupdte(a)gmail.com]
Sent: Thursday, January 21, 2010 2:07 PM
To: Huang, Ya
Cc: SAS-L(a)listserv.uga.edu
Subject: Re: Weird naming convention with newfile=bygroup ?

Maybe not so weird, I think I like it. To obtain the behavior you
desire put a 1 an the end of the filename.

ods html file="junk1aa1.html"

to produce 19 files junk1aa1-junk1aa19



On 1/21/10, Ya Huang <ya.huang(a)amylin.com> wrote:
> Hi there,
>
> When you use newfile=bygroup option for ods, SAS will automatically
> generate separated files with incremental number as suffix to the file

> name specified, which make sense. What not make sense is that if you
> already have a number in the middle of the filename, the number
> incremental will starts there, not appending new numbers at the end.
> For example, the following code, I expected to see the file names as
>
> junk1aa.html, junk1aa1.html, junk1aa2.html, ....
>
> instead, I get this:
>
> junk1aa.html, junk2aa.html, junk3aa.html,....
>
> Isn't it weird?
>
> Your thoughts?
>
> Thanks
>
> Ya
>
> 12 ods html close;
> 13 ods html file="c:\temp\junk1aa.html" style=myhtml
newfile=bygroup;
> NOTE: Writing HTML Body file: c:\temp\junk1aa.html
> 14
> 15 proc sort data=sashelp.class out=xx;
> 16 by name;
> 17 run;
>
> NOTE: There were 19 observations read from the data set SASHELP.CLASS.
> NOTE: SAS sort was used.
> NOTE: The data set WORK.XX has 19 observations and 5 variables.
> NOTE: PROCEDURE SORT used (Total process time):
> real time 0.01 seconds
> cpu time 0.00 seconds
>
>
> 18
> 19 proc report nowd data=xx;
> 20 column _all_;
> 21 by name;
> 22 run;
>
> NOTE: Writing HTML Body file: c:\temp\junk2aa.html
> NOTE: The above message was for the following BY group:
> Name=Alice
> NOTE: Writing HTML Body file: c:\temp\junk3aa.html
> NOTE: The above message was for the following BY group:
> Name=Barbara
> NOTE: Writing HTML Body file: c:\temp\junk4aa.html
> NOTE: The above message was for the following BY group:
> Name=Carol
> NOTE: Writing HTML Body file: c:\temp\junk5aa.html
> NOTE: The above message was for the following BY group:
> Name=Henry
> NOTE: Writing HTML Body file: c:\temp\junk6aa.html
> NOTE: The above message was for the following BY group:
> Name=James
> NOTE: Writing HTML Body file: c:\temp\junk7aa.html
> NOTE: The above message was for the following BY group:
> Name=Jane
> NOTE: Writing HTML Body file: c:\temp\junk8aa.html
> NOTE: The above message was for the following BY group:
> Name=Janet
> NOTE: Writing HTML Body file: c:\temp\junk9aa.html
> NOTE: The above message was for the following BY group:
>
From: Tom Abernathy on
I assume this is a side effect of SAS using code that can handle
different extensions (.html,.rtf,.htm, etc).

I like that by adding your own numeric suffix you can override the
strange default numbering.
With the default numbering the first file does not have a suffix and
then it numbers from one. So the second group is FILE1 and the third
is FILE2. file.htm, file1.htm, file2.htm

But if you add a 1 ('one') or 0 ('zero') suffix then you get names
that all have numeric suffixes.
file1.htm, file2.htm, file3.htm
or
file0.htm, file1.htm, file2.htm



On Jan 21, 5:12 pm, Ya.Hu...(a)AMYLIN.COM ("Huang, Ya") wrote:
> Nice! I'm thinking to use something like AA,AB,AC etc to replace the
> middle number.
> This way, I don't have to :-)
>
>
>
> -----Original Message-----
> From: Data _null_; [mailto:iebup...(a)gmail.com]
> Sent: Thursday, January 21, 2010 2:07 PM
> To: Huang, Ya
>
> Cc: SA...(a)listserv.uga.edu
> Subject: Re: Weird naming convention with newfile=bygroup ?
>
> Maybe not so weird, I think I like it.  To obtain the behavior you
> desire put a 1 an the end of the filename.
>
> ods html file="junk1aa1.html"
>
> to produce 19 files junk1aa1-junk1aa19
>
> On 1/21/10, Ya Huang <ya.hu...(a)amylin.com> wrote:
> > Hi there,
>
> > When you use newfile=bygroup option for ods, SAS will automatically
> > generate separated files with incremental number as suffix to the file
>
> > name specified, which make sense. What not make sense is that if you
> > already have a number in the middle of the filename, the number
> > incremental will starts there, not appending new numbers at the end.
> > For example, the following code, I expected to see the file names as
>
> > junk1aa.html, junk1aa1.html, junk1aa2.html, ....
>
> > instead, I get this:
>
> > junk1aa.html, junk2aa.html, junk3aa.html,....
>
> > Isn't it weird?
>
> > Your thoughts?
>
> > Thanks
>
> > Ya
>
> > 12   ods html close;
> > 13   ods html file="c:\temp\junk1aa.html" style=myhtml
> newfile=bygroup;
> > NOTE: Writing HTML Body file: c:\temp\junk1aa.html
> > 14
> > 15   proc sort data=sashelp.class out=xx;
> > 16   by name;
> > 17   run;
>
> > NOTE: There were 19 observations read from the data set SASHELP.CLASS.
> > NOTE: SAS sort was used.
> > NOTE: The data set WORK.XX has 19 observations and 5 variables.
> > NOTE: PROCEDURE SORT used (Total process time):
> >      real time           0.01 seconds
> >      cpu time            0.00 seconds
>
> > 18
> > 19   proc report nowd data=xx;
> > 20   column _all_;
> > 21   by name;
> > 22   run;
>
> > NOTE: Writing HTML Body file: c:\temp\junk2aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Alice
> > NOTE: Writing HTML Body file: c:\temp\junk3aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Barbara
> > NOTE: Writing HTML Body file: c:\temp\junk4aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Carol
> > NOTE: Writing HTML Body file: c:\temp\junk5aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Henry
> > NOTE: Writing HTML Body file: c:\temp\junk6aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=James
> > NOTE: Writing HTML Body file: c:\temp\junk7aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Jane
> > NOTE: Writing HTML Body file: c:\temp\junk8aa.html
> > NOTE: The above message was for the following BY group:
> >      Name=Janet
> > NOTE: Writing HTML Body file: c:\temp\junk9aa.html
> > NOTE: The above message was for the following BY group:- Hide quoted text -
>
> - Show quoted text -