Fw: Blat v3.1.2 not sending Subject line with multiple words in %RESULT% .

"Chip" <[email protected]>
Newsgroups gmane.mail.blat
Message-ID <88F74BE3C8FF4B609422D0BEF4FB78E0@localhost>

From: Er 
Sent: Friday, May 02, 2014 4:44 PM
To: [email protected] 
Subject: Fw: [blat] Blat v3.1.2 not sending Subject line with multiple words in %RESULT% .

Addressed to the Yahoo Groups, the email was undeliverable, so I am sending it to you only to do with as you see fit.
Ernest

From: Er 
Sent: Friday, May 02, 2014 18:33 PM
To: [email protected] 
Subject: Re: [blat] Blat v3.1.2 not sending Subject line with multiple words in %RESULT% .

I have had some luck with a construct from the FOR command in other places. Maybe it will help you  (Enter FOR /? at a command prompt):

  In addition, substitution of FOR variable references has been enhanced.
  You can now use the following optional syntax:

     %~I         - expands %I removing any surrounding quotes (")
      %~fI        - expands %I to a fully qualified path name
      %~dI        - expands %I to a drive letter only
      %~pI        - expands %I to a path only
      %~nI        - expands %I to a file name only
      %~xI        - expands %I to a file extension only
      %~sI        - expanded path contains short names only
      %~aI        - expands %I to file attributes of file
      %~tI        - expands %I to date/time of file
      %~zI        - expands %I to size of file
      %~$PATH:I   - searches the directories listed in the PATH
                     environment variable and expands %I to the
                     fully qualified name of the first one found.
                     If the environment variable name is not
                     defined or the file is not found by the
                     search, then this modifier expands to the
                     empty string
Ernest


From: [email protected] 
Sent: Friday, May 02, 2014 16:42 PM
To: [email protected] 
Subject: Re: [blat] Blat v3.1.2 not sending Subject line with multiple words in %RESULT% .

  

My suggestion is that you move the first quotation mark in your SET line to be immediately before the RESULT=, like this below:


Set “RESULT=Export terminated successfully without warnings”

I believe what is happening is that the quotation mark is being given to Blat within your batch file and that then causes unintended results.  If you move the quotation mark as shown above, then your batch file should not include extra quotation marks when it replaces %RESULT%.

Chip



--------------------------------------------------------------------------------
From: Mathias Awundaga <[email protected]>
To: [email protected] 
Sent: Friday, May 2, 2014 9:59 AM
Subject: [blat] Blat v3.1.2 not sending Subject line with multiple words in %RESULT% .





Hello Blat Gurus,

I am using blat v3.1.2 on windows 2012 server for my scheduled backups. In the scripts, I use gawk to get my backup results (usually something like “Export terminated successfully without warnings” into a batch file (HOW_WAS_EXPORT.bat which will contain a line like
Set RESULT=“Export terminated successfully without warnings”

HOW_WAS_EXPORT.bat is then called and when %RESULT% is echoed it gives the expected results - Export terminated successfully without warnings.
Problem:
In blat v3.1.2 on Windows server 2012, an email by blat ignores %RESULT% in the subject line even though the screen output shows it. But this same line or script works well with Blat v1.9.4 on Windows server 2003.
My blat call is:
blat export_results.log -attacht %ORABACKUP%\%LOG_FILE% -i %COMPUTERNAME% -try 5 -to [email protected] -s "PEARSDEV %RESULT%  @ %END_TIME% in %COMPUTERNAME%"

This line sends me an email with Subject: PEARSDEV   @ 11:56:12.65  in PEARSDBTEST

If I change the search so that %RESULT% contains just one word, the email will contain that word.

God Bless you.
Thank, you 
**********************************
Mathias 
**********************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.