Discussion:
New file uploaded to blat
(too old to reply)
b***@yahoogroups.com
2002-10-08 11:59:32 UTC
Permalink
Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the blat
group.

File : /blat.cpp
Uploaded by : Harry_el_Fuerte <***@pp.inet.fi>
Description : Can have names in To/Cc, better buffer handling.

You can access this file at the URL

http://groups.yahoo.com/group/blat/files/blat.cpp

To learn more about file sharing for your group, please visit

http://help.yahoo.com/help/us/groups/files

Regards,

Harry_el_Fuerte <***@pp.inet.fi>
ordad2000
2002-10-08 13:24:57 UTC
Permalink
a file has been uploaded to the Files area of the blat group.
File : /blat.cpp
Description : Can have names in To/Cc, better buffer handling.
Does Tim Charron monitor uploads to the files area? The Blat home
page at http://www.blat.net/ says: "Questions / comments /
Christer Romson
Please forgive my ignorance, but how do I use this new blat.cpp file?
If it does better buffer handling, I want to use it. I wrote a
script that sends an email message to my boss reporting on the size
of extents for tables in our production database. It only works
when I use a where clause in the query to limit the number of rows
returned (extent_id >= 25). Any more rows than that and it won't
send the data in the html table, it just puts all the html text and
data in the message (and is probably missing a lot because it's too
big.) I am using the exec method of the wscript object to return a
command window, but I think the buffer is too small for the whole
file. Any comments will be greatly appreciated. Thanks, Debra
Tim Musson
2002-10-08 14:31:20 UTC
Permalink
Hey ordad2000,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57 AM.

o> Please forgive my ignorance, but how do I use this new blat.cpp
o> file?

I believe it is a source code file. ie, it has not been compiled into
an exe yet.

o> If it does better buffer handling, I want to use it. I wrote a
o> script that sends an email message to my boss reporting on the size
o> of extents for tables in our production database. It only works
o> when I use a where clause in the query to limit the number of rows
o> returned (extent_id >= 25). Any more rows than that and it won't
o> send the data in the html table, it just puts all the html text and
o> data in the message (and is probably missing a lot because it's too
o> big.) I am using the exec method of the wscript object to return a
o> command window, but I think the buffer is too small for the whole
o> file. Any comments will be greatly appreciated. Thanks, Debra

Are you thinking it is a Blat issue? At first read it sounds like it
may be an issue with the code passing info to Blat. Not clear what
language you are using though.
--
***@Musson.net
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
ordad2000
2002-10-08 16:43:47 UTC
Permalink
Thank you very much for your reply Sir. Here is the script in
VBscript which calls Blat.
Are you thinking it is a Blat issue? At first read it sounds like
it may be an issue with the code passing info to Blat. Not clear
what language you are using though.
'====================================================================
' NAME: getextents.vbs
' AUTHOR: Debra Delaney
' DATE : 1/4/2002
' COMMENT: Alerts via email when production object extents exceed
115.
' Added Blat stuff 10/4/2002
' Database: medev (uid=system pwd=xxxxxx)
' Table Name: get_extents
' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
(example:
' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE (example: INDEX
or TABLE)
' EXTENT_ID (example: 114), BYTES (example: 409,600)
'====================================================================
Option Explicit

Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject, objShell,
intMailCounter, strSend

arrRecpts = Array("***@vp.com", "***@vp.com")
msgSubject = """Automated Message - Get Extents"""

Set objConn = CreateObject("ADODB.Connection")
objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"

Set objRS = objConn.Execute("Select * from get_extents where
extent_id >= 25 order by extent_id desc")

msgBodyHTML = """<html><b>Run Time: "& date & " "& time & "</b><br>"
msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue><tr><th>System_Name</th><th>Segment_Name</th><th>Ow
ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"

Dim rsField
Do While Not objRS.EOF
msgBodyHTML = msgBodyHTML & "<tr>"
For Each rsField in objRS.Fields
msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value & "</td>"
Next
msgBodyHTML = msgBodyHTML & "</tr>"
objRS.Movenext
Loop

If msgBodyHTML <> "" Then
msgBodyHTML = msgBodyHTML & "</table></html>"""
MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
End If

WScript.Quit

Sub MySendMailHTML(recipients, subject, body)
Set objShell = WScript.CreateObject("WScript.Shell")
intMailCounter = 0
Do While intMailCounter <= uBound(recipients)
strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
(intMailCounter) & " -s " & msgSubject & " -body " & msgBodyHTML
& " -html" & " -u VP\DDELANEY -pw jabba8 "
objShell.exec strSend
intMailCounter = intMailCounter + 1
Loop
End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57 AM.
o> Please forgive my ignorance, but how do I use this new blat.cpp
o> file?
I believe it is a source code file. ie, it has not been compiled into
an exe yet.
o> If it does better buffer handling, I want to use it. I wrote a
o> script that sends an email message to my boss reporting on the size
o> of extents for tables in our production database. It only works
o> when I use a where clause in the query to limit the number of rows
o> returned (extent_id >= 25). Any more rows than that and it won't
o> send the data in the html table, it just puts all the html text and
o> data in the message (and is probably missing a lot because it's too
o> big.) I am using the exec method of the wscript object to
return a
o> command window, but I think the buffer is too small for the
whole
o> file. Any comments will be greatly appreciated. Thanks, Debra
Are you thinking it is a Blat issue? At first read it sounds like it
may be an issue with the code passing info to Blat. Not clear what
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
Tim Musson
2002-10-08 19:53:18 UTC
Permalink
Hey ordad2000,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 12:43:47 PM.

o> Thank you very much for your reply Sir. Here is the script in
o> VBscript which calls Blat.

Ok, so it is VBscript (which I don't know, btw :-)

It looks like you are calling Blat.exe. Did you know there is a .dll
version. That may be a better option for you.

Looking at your Do While loop, can you explain what is going on? Or
correct me?

strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the file
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in emails... :-)

I am guessing here, but how big are your variables in chars? Blat
being a command line app is limited by the number of chars on the
command line (something like 256?). I am guessing that this is your
problem now, not your code or Blat.

I can't tell you how to resolve this in VBScript, but I can send you
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it sounds like
it may be an issue with the code passing info to Blat. Not clear
what language you are using though.
o> '====================================================================
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object extents exceed
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
o> (example:
o> ' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE (example: INDEX
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '====================================================================
o> Option Explicit

o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject, objShell,
o> intMailCounter, strSend

o> arrRecpts = Array("***@vp.com", "***@vp.com")
o> msgSubject = """Automated Message - Get Extents"""

o> Set objConn = CreateObject("ADODB.Connection")
o> objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"

o> Set objRS = objConn.Execute("Select * from get_extents where
extent_id >>= 25 order by extent_id desc")

o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time & "</b><br>"
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>Ow
o> ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"

o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value & "</td>"
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop

o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If

o> WScript.Quit

o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject("WScript.Shell")
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
o> (intMailCounter) & " -s " & msgSubject & " -body " & msgBodyHTML
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57 AM.
o> Please forgive my ignorance, but how do I use this new blat.cpp
o> file?
I believe it is a source code file. ie, it has not been compiled
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I wrote a
o> script that sends an email message to my boss reporting on the
o> size
o> of extents for tables in our production database. It only works
o> when I use a where clause in the query to limit the number of
o> rows
o> returned (extent_id >= 25). Any more rows than that and it won't
o> send the data in the html table, it just puts all the html text
o> and
o> data in the message (and is probably missing a lot because it's
o> too
o> big.) I am using the exec method of the wscript object to
o> return a
o> command window, but I think the buffer is too small for the
o> whole
o> file. Any comments will be greatly appreciated. Thanks, Debra
Are you thinking it is a Blat issue? At first read it sounds like
o> it
may be an issue with the code passing info to Blat. Not clear what
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
o> Community email addresses:
o> Post message: ***@yahoogroups.com
o> Subscribe: blat-***@yahoogroups.com
o> Unsubscribe: blat-***@yahoogroups.com
o> List owner: blat-***@yahoogroups.com

o> Shortcut URL to this page:
o> http://groups.yahoo.com/group/blat

o> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
--
***@Musson.net
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Why get even, when you can get odd?
ordad2000
2002-10-08 20:59:41 UTC
Permalink
Dear Tim,

You are very kind to look at this problem with me (of not being able
to send an html message with Blat that has a huge amount of data in
it returned from a query. The query without the where clause
returns 800 rows). Thank you also for not forwarding the login info
that I didn't catch in the script. <oops!> The reason we (me and my
boss)used null.txt (0 bytes) in the command line is that we
couldn't get it to work without it. By the time I finish building
the msgBodyHTML variable, the value probably does exceed 256
characters. If that's the problem, I think I will try blat.dll.
Thank you.

Debra
Post by Tim Musson
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 12:43:47 PM.
o> Thank you very much for your reply Sir. Here is the script in
o> VBscript which calls Blat.
Ok, so it is VBscript (which I don't know, btw :-)
It looks like you are calling Blat.exe. Did you know there is
a .dll
Post by Tim Musson
version. That may be a better option for you.
Looking at your Do While loop, can you explain what is going on? Or
correct me?
strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the file
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in
emails... :-)
Post by Tim Musson
I am guessing here, but how big are your variables in chars? Blat
being a command line app is limited by the number of chars on the
command line (something like 256?). I am guessing that this is your
problem now, not your code or Blat.
I can't tell you how to resolve this in VBScript, but I can send you
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it sounds like
it may be an issue with the code passing info to Blat. Not
clear
Post by Tim Musson
what language you are using though.
o> '=================================================================
===
Post by Tim Musson
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object extents
exceed
Post by Tim Musson
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
o> ' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE (example: INDEX
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '=================================================================
===
Post by Tim Musson
o> Option Explicit
o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject,
objShell,
Post by Tim Musson
o> intMailCounter, strSend
o> msgSubject = """Automated Message - Get Extents"""
o> Set objConn = CreateObject("ADODB.Connection")
o> objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"
o> Set objRS = objConn.Execute("Select * from get_extents where
extent_id >>= 25 order by extent_id desc")
o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time
& "</b><br>"
Post by Tim Musson
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>O
w
Post by Tim Musson
o>
ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"
Post by Tim Musson
o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value
& "</td>"
Post by Tim Musson
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop
o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If
o> WScript.Quit
o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject("WScript.Shell")
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
o> (intMailCounter) & " -s " & msgSubject & " -body " &
msgBodyHTML
Post by Tim Musson
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57 AM.
o> Please forgive my ignorance, but how do I use this new
blat.cpp
Post by Tim Musson
o> file?
I believe it is a source code file. ie, it has not been
compiled
Post by Tim Musson
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I wrote a
o> script that sends an email message to my boss reporting on the
o> size
o> of extents for tables in our production database. It only works
o> when I use a where clause in the query to limit the number of
o> rows
o> returned (extent_id >= 25). Any more rows than that and it won't
o> send the data in the html table, it just puts all the html text
o> and
o> data in the message (and is probably missing a lot because it's
o> too
o> big.) I am using the exec method of the wscript object to
o> return a
o> command window, but I think the buffer is too small for the
o> whole
o> file. Any comments will be greatly appreciated. Thanks, Debra
Are you thinking it is a Blat issue? At first read it sounds like
o> it
may be an issue with the code passing info to Blat. Not clear what
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
o> http://groups.yahoo.com/group/blat
o> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Post by Tim Musson
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Why get even, when you can get odd?
Tim Musson
2002-10-09 01:12:14 UTC
Permalink
Hey ordad2000,

My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 4:59:41 PM.

o> Dear Tim,

o> You are very kind to look at this problem with me (of not being able
o> to send an html message with Blat that has a huge amount of data in
o> it returned from a query. The query without the where clause
o> returns 800 rows).

Yes, that would be more than a command line could handle... :-)

o> Thank you also for not forwarding the login info
o> that I didn't catch in the script. <oops!> The reason we (me and my
o> boss)used null.txt (0 bytes) in the command line is that we
o> couldn't get it to work without it.

Try using - instead, that tells Blat that you will give it the message
body elsewhere.

o> By the time I finish building the msgBodyHTML variable, the value
o> probably does exceed 256 characters. If that's the problem, I think
o> I will try blat.dll.

You could also try something like this (in Perl):

,----- [ This is un-tested, and only for example. ]
| $Body = "your HTML text all goes here...
| btw, this is how the unix 'sendmail' is usually called!";
| $Add = "blat\@sdf.lonestar.org":
| $Blat = qq[Blat.exe - -to $Add -f $Add -server smtp.blat.e.Mail.org -html];
| open (MAIL, "|$Blat"); # start Blat with all it's parms
| print MAIL $body; # now put in the msg body (bigger this way than CL)
`-----

The last 2 lines read something like this...
1. Open Blat with all it's parms, but keep it open so we can send the
message body to in (kind of like sending to STDIN).
2. send to the body of the message to Blat.

====8<---------------- snip
--
***@Musson.net
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Printed on 100% recycled electrons.
Gerald W. Gaston
2002-10-09 10:02:27 UTC
Permalink
You can't pass that much on the command line... Replace you
MySendMailHTML with the one below...

I'm not big on vbscript (I only really use for Exchange event
scripts), it's 5:45am and I haven't slept yet, the code is on the fly
untested (but this is pretty much out of the book stuff), etc, etc,
etc... ;-)

I split a few lines trying to cut down on the wrapping. Replace 'Call
wsxOut.readall' with 'wscript.echo wsxOut.readall' to see output from
blat. And of course put you username and password in...

Question: Do you really want to send separate emails to each
recipient (instead of one call to blat with all recipients)?

'-----------------------------------------------
sub MySendMailHTML(recipients, subject, body)
dim fso, tmpname, tmpfile, tmpfolder, tmpfpath, objShell
dim intMailCounter, strSend, wsx, wsxout
set fso = CreateObject("Scripting.FileSystemObject")
set tmpfolder = fso.GetSpecialFolder(2)
tmpname = fso.GetTempName
set tmpfile = tmpfolder.CreateTextFile(tmpname)
tmpfile.WriteLine(body)
tmpfile.Close
set objShell = WScript.CreateObject("WScript.Shell")
tmpfpath = tmpfolder & "\" & tmpname
intMailCounter = 0
do while intMailCounter <= uBound(recipients)
strSend = "c:\blat\blat.exe " & chr(34) & tmpfpath & chr(34)
strSend = strSend & " -t " & recipients(intMailCounter)
strSend = strSend & " -s " & subject & " -html"
strSend = strSend & " -u username -pw password"
set wsx = objShell.exec(strSend)
set wsxOut = wsx.stdout
do: wscript.sleep 10
do: Call wsxOut.readall
loop until wsxOut.atendofstream
loop until wsx.status <> 0 and wsxOut.atendofstream
intMailCounter = intMailCounter + 1
loop
set tmpfile = fso.Getfile(tmpfpath)
tmpfile.Delete
end sub

'-----------------------------------------------

HTH,
Gerald W. Gaston
Post by ordad2000
Dear Tim,
You are very kind to look at this problem with me (of not being able
to send an html message with Blat that has a huge amount of data in
it returned from a query. The query without the where clause
returns 800 rows). Thank you also for not forwarding the login info
that I didn't catch in the script. <oops!> The reason we (me and my
boss)used null.txt (0 bytes) in the command line is that we
couldn't get it to work without it. By the time I finish building
the msgBodyHTML variable, the value probably does exceed 256
characters. If that's the problem, I think I will try blat.dll.
Thank you.
Debra
Post by Tim Musson
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 12:43:47 PM.
o> Thank you very much for your reply Sir. Here is the script in
o> VBscript which calls Blat.
Ok, so it is VBscript (which I don't know, btw :-)
It looks like you are calling Blat.exe. Did you know there is
a .dll
Post by Tim Musson
version. That may be a better option for you.
Looking at your Do While loop, can you explain what is going on? Or
correct me?
strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the file
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in
emails... :-)
Post by Tim Musson
I am guessing here, but how big are your variables in chars? Blat
being a command line app is limited by the number of chars on the
command line (something like 256?). I am guessing that this is your
problem now, not your code or Blat.
I can't tell you how to resolve this in VBScript, but I can send
you
Post by Tim Musson
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it sounds
like
Post by Tim Musson
it may be an issue with the code passing info to Blat. Not
clear
Post by Tim Musson
what language you are using though.
o> '=================================================================
Post by ordad2000
===
Post by Tim Musson
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object extents
exceed
Post by Tim Musson
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
INDEX
Post by Tim Musson
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '=================================================================
Post by ordad2000
===
Post by Tim Musson
o> Option Explicit
o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject,
objShell,
Post by Tim Musson
o> intMailCounter, strSend
o> msgSubject = """Automated Message - Get Extents"""
o> Set objConn = CreateObject("ADODB.Connection")
o>
objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"
Post by ordad2000
Post by Tim Musson
o> Set objRS = objConn.Execute("Select * from get_extents where
extent_id >>= 25 order by extent_id desc")
o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time
& "</b><br>"
Post by Tim Musson
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>O
Post by ordad2000
w
Post by Tim Musson
o>
ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"
Post by Tim Musson
o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value
& "</td>"
Post by Tim Musson
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop
o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If
o> WScript.Quit
o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject("WScript.Shell")
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
o> (intMailCounter) & " -s " & msgSubject & " -body " &
msgBodyHTML
Post by Tim Musson
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 9:24:57
AM.
Post by Tim Musson
o> Please forgive my ignorance, but how do I use this new
blat.cpp
Post by Tim Musson
o> file?
I believe it is a source code file. ie, it has not been
compiled
Post by Tim Musson
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I
a
Post by Tim Musson
o> script that sends an email message to my boss reporting on
the
Post by Tim Musson
o> size
o> of extents for tables in our production database. It only
works
Post by Tim Musson
o> when I use a where clause in the query to limit the number
of
Post by Tim Musson
o> rows
o> returned (extent_id >= 25). Any more rows than that and it
won't
Post by Tim Musson
o> send the data in the html table, it just puts all the html
text
Post by Tim Musson
o> and
o> data in the message (and is probably missing a lot because
it's
Post by Tim Musson
o> too
o> big.) I am using the exec method of the wscript object to
o> return a
o> command window, but I think the buffer is too small for the
o> whole
o> file. Any comments will be greatly appreciated. Thanks, Debra
Are you thinking it is a Blat issue? At first read it sounds
like
Post by Tim Musson
o> it
may be an issue with the code passing info to Blat. Not clear
what
Post by Tim Musson
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
ordad2000
2002-10-09 13:58:29 UTC
Permalink
Dear Mr. Musson, Mr. Willms, and Mr. Gaston,

Thank you all for your help with this script I am writing that uses
Blat. My boss has given me the "go-ahead" to try your solutions, as
he is curious about the results. It will take me some time to
examine and test each suggestion you have made. They are all great
tips and I appreciate it. I will let you know the results as soon as
I can get it to work properly. Thanks to all of you and I wish you
well in your endeavors.

Debra
Post by Gerald W. Gaston
You can't pass that much on the command line... Replace you
MySendMailHTML with the one below...
I'm not big on vbscript (I only really use for Exchange event
scripts), it's 5:45am and I haven't slept yet, the code is on the fly
untested (but this is pretty much out of the book stuff), etc,
etc,
Post by Gerald W. Gaston
etc... ;-)
I split a few lines trying to cut down on the wrapping.
Replace 'Call
Post by Gerald W. Gaston
wsxOut.readall' with 'wscript.echo wsxOut.readall' to see output from
blat. And of course put you username and password in...
Question: Do you really want to send separate emails to each
recipient (instead of one call to blat with all recipients)?
'-----------------------------------------------
sub MySendMailHTML(recipients, subject, body)
dim fso, tmpname, tmpfile, tmpfolder, tmpfpath, objShell
dim intMailCounter, strSend, wsx, wsxout
set fso = CreateObject("Scripting.FileSystemObject")
set tmpfolder = fso.GetSpecialFolder(2)
tmpname = fso.GetTempName
set tmpfile = tmpfolder.CreateTextFile(tmpname)
tmpfile.WriteLine(body)
tmpfile.Close
set objShell = WScript.CreateObject("WScript.Shell")
tmpfpath = tmpfolder & "\" & tmpname
intMailCounter = 0
do while intMailCounter <= uBound(recipients)
strSend = "c:\blat\blat.exe " & chr(34) & tmpfpath & chr(34)
strSend = strSend & " -t " & recipients(intMailCounter)
strSend = strSend & " -s " & subject & " -html"
strSend = strSend & " -u username -pw password"
set wsx = objShell.exec(strSend)
set wsxOut = wsx.stdout
do: wscript.sleep 10
do: Call wsxOut.readall
loop until wsxOut.atendofstream
loop until wsx.status <> 0 and wsxOut.atendofstream
intMailCounter = intMailCounter + 1
loop
set tmpfile = fso.Getfile(tmpfpath)
tmpfile.Delete
end sub
'-----------------------------------------------
HTH,
Gerald W. Gaston
Post by ordad2000
Dear Tim,
You are very kind to look at this problem with me (of not being
able
Post by ordad2000
to send an html message with Blat that has a huge amount of data in
it returned from a query. The query without the where clause
returns 800 rows). Thank you also for not forwarding the login
info
Post by ordad2000
that I didn't catch in the script. <oops!> The reason we (me and my
boss)used null.txt (0 bytes) in the command line is that we
couldn't get it to work without it. By the time I finish
building
Post by Gerald W. Gaston
Post by ordad2000
the msgBodyHTML variable, the value probably does exceed 256
characters. If that's the problem, I think I will try
blat.dll.
Post by Gerald W. Gaston
Post by ordad2000
Thank you.
Debra
Post by Tim Musson
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at 12:43:47 PM.
o> Thank you very much for your reply Sir. Here is the script in
o> VBscript which calls Blat.
Ok, so it is VBscript (which I don't know, btw :-)
It looks like you are calling Blat.exe. Did you know there is
a .dll
Post by Tim Musson
version. That may be a better option for you.
Looking at your Do While loop, can you explain what is going
on?
Post by Gerald W. Gaston
Or
Post by ordad2000
Post by Tim Musson
correct me?
strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the file
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in
emails... :-)
Post by Tim Musson
I am guessing here, but how big are your variables in chars? Blat
being a command line app is limited by the number of chars on the
command line (something like 256?). I am guessing that this is
your
Post by ordad2000
Post by Tim Musson
problem now, not your code or Blat.
I can't tell you how to resolve this in VBScript, but I can send
you
Post by Tim Musson
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it
sounds
Post by Gerald W. Gaston
Post by ordad2000
like
Post by Tim Musson
it may be an issue with the code passing info to Blat. Not
clear
Post by Tim Musson
what language you are using though.
o> '=================================================================
Post by Gerald W. Gaston
Post by ordad2000
===
Post by Tim Musson
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object extents
exceed
Post by Tim Musson
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG), SEGMENT_NAME
o> ' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE
INDEX
Post by Tim Musson
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '=================================================================
Post by Gerald W. Gaston
Post by ordad2000
===
Post by Tim Musson
o> Option Explicit
o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject,
objShell,
Post by Tim Musson
o> intMailCounter, strSend
o> msgSubject = """Automated Message - Get Extents"""
o> Set objConn = CreateObject("ADODB.Connection")
o>
objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"
Post by ordad2000
Post by Tim Musson
o> Set objRS = objConn.Execute("Select * from get_extents
where
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
extent_id >>= 25 order by extent_id desc")
o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time
& "</b><br>"
Post by Tim Musson
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>O
Post by Gerald W. Gaston
Post by ordad2000
w
Post by Tim Musson
o>
ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" & rsField.Value
& "</td>"
Post by Tim Musson
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop
o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If
o> WScript.Quit
o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject("WScript.Shell")
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " & recipients
o> (intMailCounter) & " -s " & msgSubject & " -body " &
msgBodyHTML
Post by Tim Musson
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at
9:24:57
Post by Gerald W. Gaston
Post by ordad2000
AM.
Post by Tim Musson
o> Please forgive my ignorance, but how do I use this new
blat.cpp
Post by Tim Musson
o> file?
I believe it is a source code file. ie, it has not been
compiled
Post by Tim Musson
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I
a
Post by Tim Musson
o> script that sends an email message to my boss reporting on
the
Post by Tim Musson
o> size
o> of extents for tables in our production database. It
only
Post by Gerald W. Gaston
Post by ordad2000
works
Post by Tim Musson
o> when I use a where clause in the query to limit the
number
Post by Gerald W. Gaston
Post by ordad2000
of
Post by Tim Musson
o> rows
o> returned (extent_id >= 25). Any more rows than that and it
won't
Post by Tim Musson
o> send the data in the html table, it just puts all the html
text
Post by Tim Musson
o> and
o> data in the message (and is probably missing a lot
because
Post by Gerald W. Gaston
Post by ordad2000
it's
Post by Tim Musson
o> too
o> big.) I am using the exec method of the wscript object to
o> return a
o> command window, but I think the buffer is too small for the
o> whole
o> file. Any comments will be greatly appreciated. Thanks,
Debra
Post by ordad2000
Post by Tim Musson
Are you thinking it is a Blat issue? At first read it
sounds
Post by Gerald W. Gaston
Post by ordad2000
like
Post by Tim Musson
o> it
may be an issue with the code passing info to Blat. Not clear
what
Post by Tim Musson
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
ordad2000
2002-10-10 14:50:14 UTC
Permalink
Thank you Mr. Musson for your tips (the - worked fine in the command
line. (Now I don't have to type in "blat\null.txt" anymore, good!).
I also downloaded ActivePerl and tried your perlscript example. It
worked fine too. I am grateful to you Mr. Willms for the suggestion
of putting the msgBody into a text file and sending it with the -
html switch. That worked great too. But I liked Mr. Gaston's
sendmail routine the best. He showed me how to use wscript
methods to create a textfile on the fly, send it with Blat, show
Blat messages, and then delete the file. He and Mr. Wilms also
suggested calling Blat once to send mail to multiple recipients. I
took out the array and put the addresses in the command line with
the -t option. Again, many, many thanks to you all for your help
with this script.

Sincerely,
Debra
Post by ordad2000
Dear Mr. Musson, Mr. Willms, and Mr. Gaston,
Thank you all for your help with this script I am writing that
uses
Post by ordad2000
Blat. My boss has given me the "go-ahead" to try your solutions, as
he is curious about the results. It will take me some time to
examine and test each suggestion you have made. They are all great
tips and I appreciate it. I will let you know the results as soon as
I can get it to work properly. Thanks to all of you and I wish you
well in your endeavors.
Debra
Post by Gerald W. Gaston
You can't pass that much on the command line... Replace you
MySendMailHTML with the one below...
I'm not big on vbscript (I only really use for Exchange event
scripts), it's 5:45am and I haven't slept yet, the code is on
the
Post by ordad2000
fly
Post by Gerald W. Gaston
untested (but this is pretty much out of the book stuff), etc,
etc,
Post by Gerald W. Gaston
etc... ;-)
I split a few lines trying to cut down on the wrapping.
Replace 'Call
Post by Gerald W. Gaston
wsxOut.readall' with 'wscript.echo wsxOut.readall' to see output
from
Post by Gerald W. Gaston
blat. And of course put you username and password in...
Question: Do you really want to send separate emails to each
recipient (instead of one call to blat with all recipients)?
'-----------------------------------------------
sub MySendMailHTML(recipients, subject, body)
dim fso, tmpname, tmpfile, tmpfolder, tmpfpath, objShell
dim intMailCounter, strSend, wsx, wsxout
set fso = CreateObject("Scripting.FileSystemObject")
set tmpfolder = fso.GetSpecialFolder(2)
tmpname = fso.GetTempName
set tmpfile = tmpfolder.CreateTextFile(tmpname)
tmpfile.WriteLine(body)
tmpfile.Close
set objShell = WScript.CreateObject("WScript.Shell")
tmpfpath = tmpfolder & "\" & tmpname
intMailCounter = 0
do while intMailCounter <= uBound(recipients)
strSend = "c:\blat\blat.exe " & chr(34) & tmpfpath & chr(34)
strSend = strSend & " -t " & recipients(intMailCounter)
strSend = strSend & " -s " & subject & " -html"
strSend = strSend & " -u username -pw password"
set wsx = objShell.exec(strSend)
set wsxOut = wsx.stdout
do: wscript.sleep 10
do: Call wsxOut.readall
loop until wsxOut.atendofstream
loop until wsx.status <> 0 and wsxOut.atendofstream
intMailCounter = intMailCounter + 1
loop
set tmpfile = fso.Getfile(tmpfpath)
tmpfile.Delete
end sub
'-----------------------------------------------
HTH,
Gerald W. Gaston
Post by ordad2000
Dear Tim,
You are very kind to look at this problem with me (of not
being
Post by ordad2000
Post by Gerald W. Gaston
able
Post by ordad2000
to send an html message with Blat that has a huge amount of
data
Post by ordad2000
in
Post by Gerald W. Gaston
Post by ordad2000
it returned from a query. The query without the where clause
returns 800 rows). Thank you also for not forwarding the
login
Post by ordad2000
Post by Gerald W. Gaston
info
Post by ordad2000
that I didn't catch in the script. <oops!> The reason we (me
and
Post by ordad2000
my
Post by Gerald W. Gaston
Post by ordad2000
boss)used null.txt (0 bytes) in the command line is that we
couldn't get it to work without it. By the time I finish
building
Post by Gerald W. Gaston
Post by ordad2000
the msgBodyHTML variable, the value probably does exceed 256
characters. If that's the problem, I think I will try
blat.dll.
Post by Gerald W. Gaston
Post by ordad2000
Thank you.
Debra
Post by Tim Musson
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at
12:43:47
Post by ordad2000
PM.
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> Thank you very much for your reply Sir. Here is the
script
Post by ordad2000
in
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> VBscript which calls Blat.
Ok, so it is VBscript (which I don't know, btw :-)
It looks like you are calling Blat.exe. Did you know there is
a .dll
Post by Tim Musson
version. That may be a better option for you.
Looking at your Do While loop, can you explain what is going
on?
Post by Gerald W. Gaston
Or
Post by ordad2000
Post by Tim Musson
correct me?
strSend = "c:\blat\blat
c:\blat\null.txt <<--Why this? what is in the
file
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
-to " & recipients(intMailCounter) & " <<--Your list of rcpt
-s " & msgSubject & " <<--Subject
-body " & msgBodyHTML & " <<--The msg body
-html" & " <<--html switch.
-u ::string:: -pw ::string:: " <<--Should hide this in
emails... :-)
Post by Tim Musson
I am guessing here, but how big are your variables in chars?
Blat
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
being a command line app is limited by the number of chars
on
Post by ordad2000
the
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
command line (something like 256?). I am guessing that this is
your
Post by ordad2000
Post by Tim Musson
problem now, not your code or Blat.
I can't tell you how to resolve this in VBScript, but I can
send
Post by Gerald W. Gaston
Post by ordad2000
you
Post by Tim Musson
an example in Perl that I am working on for my FAQ site.
Are you thinking it is a Blat issue? At first read it
sounds
Post by Gerald W. Gaston
Post by ordad2000
like
Post by Tim Musson
it may be an issue with the code passing info to Blat.
Not
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
clear
Post by Tim Musson
what language you are using though.
o> '=================================================================
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
===
Post by Tim Musson
o> ' NAME: getextents.vbs
o> ' AUTHOR: Debra Delaney
o> ' DATE : 1/4/2002
o> ' COMMENT: Alerts via email when production object
extents
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
exceed
Post by Tim Musson
o> 115.
o> ' Added Blat stuff 10/4/2002
o> ' Database: medev (uid=system pwd=xxxxxx)
o> ' Table Name: get_extents
o> ' Column Names: SYSTEM_NAME (example: ARMFG),
SEGMENT_NAME
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> ' PARTS_WELDS), OWNER (example: MFG), SEGMENT_TYPE
INDEX
Post by Tim Musson
o> or TABLE)
o> ' EXTENT_ID (example: 114), BYTES (example: 409,600)
o> '=================================================================
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
===
Post by Tim Musson
o> Option Explicit
o> Dim objConn, objRS, msgBodyHTML, arrRecpts, msgSubject,
objShell,
Post by Tim Musson
o> intMailCounter, strSend
o> msgSubject = """Automated Message - Get Extents"""
o> Set objConn = CreateObject("ADODB.Connection")
o>
objConn.Open "DSN=medev;UID=system;PWD=xxxxx;SERVER=t:medev:bss"
Post by ordad2000
Post by Tim Musson
o> Set objRS = objConn.Execute("Select * from get_extents
where
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
extent_id >>= 25 order by extent_id desc")
o> msgBodyHTML = """<html><b>Run Time: "& date & " "& time
& "</b><br>"
Post by Tim Musson
o> msgBodyHTML = msgBodyHTML & "<table border=1
bgcolor=lightblue>><tr><th>System_Name</th><th>Segment_Name</th><th>O
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
w
Post by Tim Musson
o>
ner</th><th>Segment_Type</th><th>Extent_ID</th><th>Bytes</th></tr>"
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> Dim rsField
o> Do While Not objRS.EOF
o> msgBodyHTML = msgBodyHTML & "<tr>"
o> For Each rsField in objRS.Fields
o> msgBodyHTML = msgBodyHTML & "<td>" &
rsField.Value
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
& "</td>"
Post by Tim Musson
o> Next
o> msgBodyHTML = msgBodyHTML & "</tr>"
o> objRS.Movenext
o> Loop
o> If msgBodyHTML <> "" Then
o> msgBodyHTML = msgBodyHTML & "</table></html>"""
o> MySendMailHTML arrRecpts, msgSubject, msgBodyHTML
o> End If
o> WScript.Quit
o> Sub MySendMailHTML(recipients, subject, body)
o> Set objShell = WScript.CreateObject
("WScript.Shell")
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> intMailCounter = 0
o> Do While intMailCounter <= uBound(recipients)
o> strSend = "c:\blat\blat c:\blat\null.txt -to " &
recipients
Post by ordad2000
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> (intMailCounter) & " -s " & msgSubject & " -body " &
msgBodyHTML
Post by Tim Musson
o> & " -html" & " -u ::string:: -pw ::string:: "
o> objShell.exec strSend
o> intMailCounter = intMailCounter + 1
o> Loop
o> End Sub
Hey ordad2000,
My MUA believes you used eGroups-EW/0.82
to write the following on Tuesday, October 8, 2002 at
9:24:57
Post by Gerald W. Gaston
Post by ordad2000
AM.
Post by Tim Musson
o> Please forgive my ignorance, but how do I use this new
blat.cpp
Post by Tim Musson
o> file?
I believe it is a source code file. ie, it has not been
compiled
Post by Tim Musson
o> into
an exe yet.
o> If it does better buffer handling, I want to use it. I
a
Post by Tim Musson
o> script that sends an email message to my boss
reporting
Post by ordad2000
on
Post by Gerald W. Gaston
Post by ordad2000
the
Post by Tim Musson
o> size
o> of extents for tables in our production database. It
only
Post by Gerald W. Gaston
Post by ordad2000
works
Post by Tim Musson
o> when I use a where clause in the query to limit the
number
Post by Gerald W. Gaston
Post by ordad2000
of
Post by Tim Musson
o> rows
o> returned (extent_id >= 25). Any more rows than that
and
Post by ordad2000
it
Post by Gerald W. Gaston
Post by ordad2000
won't
Post by Tim Musson
o> send the data in the html table, it just puts all the
html
Post by Gerald W. Gaston
Post by ordad2000
text
Post by Tim Musson
o> and
o> data in the message (and is probably missing a lot
because
Post by Gerald W. Gaston
Post by ordad2000
it's
Post by Tim Musson
o> too
o> big.) I am using the exec method of the wscript object
to
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> return a
o> command window, but I think the buffer is too small
for
Post by ordad2000
the
Post by Gerald W. Gaston
Post by ordad2000
Post by Tim Musson
o> whole
o> file. Any comments will be greatly appreciated.
Thanks,
Post by ordad2000
Post by Gerald W. Gaston
Debra
Post by ordad2000
Post by Tim Musson
Are you thinking it is a Blat issue? At first read it
sounds
Post by Gerald W. Gaston
Post by ordad2000
like
Post by Tim Musson
o> it
may be an issue with the code passing info to Blat. Not
clear
Post by Gerald W. Gaston
Post by ordad2000
what
Post by Tim Musson
language you are using though.
--
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Don't get old, you will live to regret it.
Romson Christer
2002-10-08 13:10:34 UTC
Permalink
a file has been uploaded to the Files area of the blat group.
File : /blat.cpp
Description : Can have names in To/Cc, better buffer handling.
Does Tim Charron monitor uploads to the files area? The Blat home
page at http://www.blat.net/ says: "Questions / comments /
changes? Please contact me at ***@interlog.com".

Christer Romson
Tim Musson
2002-10-08 14:26:36 UTC
Permalink
Hey Romson,

My MUA believes you used Internet Mail Service (5.5.2653.19)
to write the following on Tuesday, October 8, 2002 at 9:10:34 AM.

RC> Does Tim Charron monitor uploads to the files area?

I don't think Tim does anything actively with the list. I don't
believe he even reads it.
--
***@Musson.net
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
My software never has bugs; it just develops random features.
Christophe Henquin
2002-10-09 03:36:15 UTC
Permalink
Post by Tim Musson
RC> Does Tim Charron monitor uploads to the files area?
I don't think Tim does anything actively with the list. I don't
believe he even reads it.
I do monitor the list but only with one eye. Basically I look into treads
that are expanding in time, offensive subject and complaints that I may
receive thru blat-moderator.

Before Tim and Me there was no support at all, then we took Blat in our
hands including the support. After we release our version 1.8 the authors
gave us the full responsibility of it.

After a few months of answering, it became clear that peer support was the
best option for Blat.


Christophe Henquin
One of the three blat-moderators.
Romson Christer
2002-10-08 13:44:22 UTC
Permalink
a file has been uploaded to the Files area of the blat group.
File : /blat.cpp
Description : Can have names in To/Cc, better buffer handling.
How do I use this new blat.cpp file?
It appears to be a modified source file. You'd download it and
recompile Blat (or wait for the patch to be included in a future
official release).

If I were to use the file, I'd be concerned by the fact that mail
to Harry bounces. Maybe it's just an innocent typo, but maybe
there's malicious trojans hidden in his code?

Christer Romson
L.Willms
2002-10-08 15:24:21 UTC
Permalink
Post by Romson Christer
It appears to be a modified source file.
And quite heavily modified. A diff over the sources of Blat 194 and what I
would call Blat 200 creates a report of 695 lines.
Post by Romson Christer
You'd download it and
recompile Blat (or wait for the patch to be included in a future
official release).
If I were to use the file, I'd be concerned by the fact that mail
to Harry bounces. Maybe it's just an innocent typo, but maybe
there's malicious trojans hidden in his code?
Everybody can read the source. I can upload the DIFF file, if wanted.

Yours,
Lüko Willms
-----------------------------------------------
Frankfurt/Main
Harri Pesonen
2002-10-08 17:20:49 UTC
Permalink
Hello all! And sorry for all this trouble and confusion about the new blat.cpp that I uploaded to the mailing list. My old e-mail address ***@pp.inet.fi does not work anymore, and I don't seem to be able to activate my work address ***@wicom.com, or my primary home address ***@sci.fi, so I just activated my secondary home address ***@nic.fi. I tried to send N messages, but I think that they went to the list owner (sorry!) :-)

More information about this version. It is based on the latest 1.9.4. It handles recipients better, the e-mail address can now contain

"Harri Pesonen" <***@wicom.com> or
Harri Pesonen <***@wicom.com> or just plain
***@wicom.com

and the optional name will remain correctly in To/Cc fields.

Another big change was the new Str class, that is used in main function instead of buffer, header and filebuffer variables, that were either fixed char[] or allocated char* variables. Str makes it all much easier and cleaner. And Blat does not crash anymore if you have many recipients. I tested it with 500 recipients in To/Cc and 10000 recipients in Bcc.

That's about it... I'm happy to answer any questions that you may have.

I have been using some older version of blat for a couple of years now, mainly with my PBEM Helper application (http://www.nic.fi/~fuerte/pbem.htm). I am using a DLL version of my own. Blat.cpp was about the same that was in the official version, but now I needed to fix those above mentioned problems. Feel free to do anything you want with it, or just ignore it completely. Of course I hope that these modifications would make it to the official version.

--
Harri Pesonen
http://www.nic.fi/~fuerte/
You should not underestimate the power of thickness - Kaoru Iwamoto


[Non-text portions of this message have been removed]
b***@yahoogroups.com
2002-10-08 19:02:57 UTC
Permalink
Hello,

This email message is a notification to let you know that
a file has been uploaded to the Files area of the blat
group.

File : /blat195.cpp
Uploaded by : Harry_el_Fuerte <***@sci.fi>
Description : 1.9.4: Plus can have names in To/Cc, better buffer handling. This is a fixed version... :-) Ordinary e-mail addresses without <> didn't work. Sorry.

You can access this file at the URL

http://groups.yahoo.com/group/blat/files/blat195.cpp

To learn more about file sharing for your group, please visit

http://help.yahoo.com/help/us/groups/files

Regards,

Harry_el_Fuerte <***@sci.fi>
Harry_el_Fuerte
2002-10-09 14:09:44 UTC
Permalink
Post by b***@yahoogroups.com
File : /blat195.cpp
Description : 1.9.4: Plus can have names in To/Cc, better buffer
handling. This is a fixed version... :-) Ordinary e-mail addresses
without <> didn't work. Sorry.

Now that I posted this fixed version and changed my original non-
working e-mail address to a working one, I am unable to remove that
first blat.cpp from Files. Ugh. I wonder if group owner or moderators
can remove it?
Harri Pesonen
2002-10-10 17:58:35 UTC
Permalink
I have not sent the source code, because I'm not quite sure if it is
bug-free yet. I have been using that new version for just a couple of
days, and I was hoping that some other people would try it and tell if
it works for them. I already found that one bug, e-mail addresses
without <> didn't work. :-)

It is possible that my changes break blat for someone, because the e-mail address is parsed differently. It does not remove any spaces in the beginning, it just parses the <> address and if that is not found, then it removes spaces from the beginning and end, and adds <> characters. It also understands that the name can be in quotation marks (") in the beginning of the address:
"person name" <e-mail address>

This syntax can only be used with blat.dll, or when the recipients are
in a file.

-----Original Message-----
From: Romson Christer [mailto:***@siemens.com]
Sent: 10. lokakuuta 2002 10:22
To: Harri Pesonen; ***@sci.fi
Subject: RE: [blat] Re: New file uploaded to blat
Post by Harri Pesonen
Of course I hope that these modifications would make it to the
official
version.

Have you sent them to the maintainer at ***@interlog.com?

Christer Romson


[Non-text portions of this message have been removed]
Gerald W. Gaston
2002-10-11 08:54:25 UTC
Permalink
I'm not involved with maintaining Blat (although I do maintain a
personal version based on it called eBlat), but I hope to look at
your changes this weekend. I should probably wait until then to
comment but what the heck ;-)
Post by Harri Pesonen
It is possible that my changes break blat for someone, because
the e-mail address is parsed differently. It does not remove any
spaces in the beginning, it just parses the <> address and if
that is not found, then it removes spaces from the beginning and
end, and adds <> characters.
Just to clarify, Blat currently removes spaces from Receipients
(built from destination, cc_list, and bcc_list) for which it uses to
create the RCPT To: mail commands for talking to the SMTP server.
Since destination and cc_list are used in the actually header
unmodified, spaces in the dispaly name are preserved there.
Post by Harri Pesonen
It also understands that the name can be in quotation marks (")
"person name" <e-mail address>
This syntax can only be used with blat.dll, or when the
recipients are in a file.
Blat can do this now (and on the command line if you escape the
quotes). OK it will display something like:

Sending stdin.txt to "personname"<e-mail address>

with spaces removed in the output here as that uses Recipients, but
what shows up in the header will be be correct with spaces.

Now if when building the RCPT TOs you are skipping over commas (the
only valid char that blat uses as an address delimiter that could be
part of a display name) embedded between quotation marks, then that
can be useful. I do that now in my copy to allow a comma in the
display name. i.e. "Smith, John" so on the command line I can do:

blat - -to "\"Smith, John\"<***@somewhere.com>" -s test -body YAT

and it works correctly. The current release of blat would stop at the
comma and create 'RCPT To: <"Smith>' which wouldn't fly.


Gerald W. Gaston
Harri Pesonen
2002-10-12 08:12:07 UTC
Permalink
I'm not involved with maintaining Blat (although I do maintain a
personal version based on it called eBlat), but I hope to look at
your changes this weekend. I should probably wait until then to
comment but what the heck ;-)
Post by Harri Pesonen
It is possible that my changes break blat for someone, because
the e-mail address is parsed differently. It does not remove any
spaces in the beginning, it just parses the <> address and if
that is not found, then it removes spaces from the beginning and
end, and adds <> characters.
Just to clarify, Blat currently removes spaces from Receipients
(built from destination, cc_list, and bcc_list) for which it uses to
create the RCPT To: mail commands for talking to the SMTP server.
Since destination and cc_list are used in the actually header
unmodified, spaces in the dispaly name are preserved there.

Well it seems that I have been confused here then.
Post by Harri Pesonen
It also understands that the name can be in quotation marks (")
"person name" <e-mail address>
This syntax can only be used with blat.dll, or when the
recipients are in a file.
Blat can do this now (and on the command line if you escape the
quotes). OK it will display something like:

Sending stdin.txt to "personname"<e-mail address>

with spaces removed in the output here as that uses Recipients, but
what shows up in the header will be be correct with spaces.
OK.... I was confused about what it displays in the log...
Now if when building the RCPT TOs you are skipping over commas (the
only valid char that blat uses as an address delimiter that could be
part of a display name) embedded between quotation marks, then that
can be useful. I do that now in my copy to allow a comma in the
display name. i.e. "Smith, John" so on the command line I can do:

blat - -to "\"Smith, John\"<***@somewhere.com>" -s test -body YAT

and it works correctly. The current release of blat would stop at the
comma and create 'RCPT To: <"Smith>' which wouldn't fly.

Right, I did that for my version.

Another thing that my version has is that it does not crash when you have many recipients. The header is not fixed char[] any more.

Gerald W. Gaston

Thanks for your comments! :-)


[Non-text portions of this message have been removed]

Continue reading on narkive:
Search results for 'New file uploaded to blat' (newsgroups and mailing lists)
7
replies
New file uploaded to blat
started 2002-12-18 20:09:40 UTC
blat@yahoogroups.com
25
replies
New file uploaded to blat
started 2002-11-30 21:17:39 UTC
blat@yahoogroups.com
7
replies
New file uploaded to blat
started 2004-01-18 15:30:06 UTC
blat@yahoogroups.com
10
replies
possible timeout .SMTP server error message
started 2004-06-29 17:01:37 UTC
blat@yahoogroups.com
25
replies
New file uploaded to AutoItList
started 2003-02-19 14:43:51 UTC
AutoItList@yahoogroups.com
Loading...