<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Search results matching tag 'TPL output target'</title><link>http://forums.iis.net/search/SearchResults.aspx?o=DateDescending&amp;tag=TPL+output+target&amp;orTags=0</link><description>Search results matching tag 'TPL output target'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Template file output not written when 0 elements output</title><link>http://forums.iis.net/p/1147808/1863715.aspx#1863715</link><pubDate>Fri, 15 Feb 2008 12:15:15 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1863715</guid><dc:creator>jose_gisbert</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;p&gt;&amp;nbsp;i solve this problem with something like this in&amp;nbsp; .bat file:&lt;/p&gt;&lt;p&gt;Rem *** Example&amp;nbsp;&lt;/p&gt;&lt;p&gt;logparser&amp;nbsp; &amp;quot;select * into xxx.html from ... &amp;quot;&amp;nbsp; -i:.. -otpl&amp;nbsp; -tpl:...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;if not exist xxx.html copy xxx2.html xxx.html&lt;/p&gt;&lt;p&gt;rem&amp;nbsp; ***&amp;nbsp; End example &lt;br /&gt;&lt;/p&gt;&lt;p&gt;where xxx2.html is an static html page with the legend &amp;quot;No Data Found&amp;quot;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Enjoy!&amp;nbsp;&lt;/p&gt;&lt;p&gt; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>RE: elements output</title><link>http://forums.iis.net/p/1145371/1855021.aspx#1855021</link><pubDate>Sat, 27 Jan 2007 04:49:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1855021</guid><dc:creator>LogParser User : allenbi</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>[QUOTE User="LogParser User : allenbi"]Quote: Well, you could produce a dummy file with all of the possible event numbers in, then report on the dummy file and your main file together.   As far as putting the date in the filename, thats easy, use...[/QUOTE] &lt;br /&gt;I am trying to get the current system date or time into my LogParser output file name. Here is the query I am trying:&lt;br&gt;&lt;br&gt;C:\PROGRA~1\LOGPAR~1.2&gt;logparser -i:TSV -iSeparator:spaces "SELECT system_time()&lt;br&gt;, field1 AS %Utilization INTO *chart.gif FROM xfrsGLOBAL.asc" -headerRow:off -ch&lt;br&gt;artType:Column3d -chartTitle:"Global CPU Utilization"&lt;br&gt;&lt;br&gt;Here is the error I am getting in addition to the file name not being created like I want:&lt;br&gt;&lt;br&gt;Task completed with errors.&lt;br&gt;Unexpected internal error calling chart object method ExportPicture:&lt;br&gt;Exception occurred.&lt;br&gt;&lt;br&gt;Where am I going wrong. Does anyone have an example of how to do this correctly?&lt;br&gt;</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854837.aspx#1854837</link><pubDate>Wed, 01 Nov 2006 12:02:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854837</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>The problem with using DATE and TIME directly is that they aren't truly environment variables. they are special variables that are handled by the command interpreter (cmd.exe) directly. So when LP requests them from the environment, they don't exist.</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854883.aspx#1854883</link><pubDate>Tue, 31 Oct 2006 20:48:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854883</guid><dc:creator>LogParser User : Allan Pike</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;I added "set DateTime=%DATE% %TIME%" to the batch file that kicks everything off and used the %DateTime% variable in my .TPL file and it worked !&amp;nbsp; Thanks heaps guys &lt;img src='images/emotions/smile.gif' height='20' width='20' border='0' title='Smile' align='absmiddle'&gt;&amp;nbsp; It's just strange that I couldn't use %DATE% and %TIME% in my .TPL file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW: running Logparser 2.2.10 on Windows 2000 Server SP4&lt;/P&gt;</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854864.aspx#1854864</link><pubDate>Tue, 31 Oct 2006 10:59:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854864</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>Using %DateTime% in your template should certainly work.  Is there any chance you aren't using the latest version of Log Parser (2.2.10)?</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854785.aspx#1854785</link><pubDate>Mon, 30 Oct 2006 20:55:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854785</guid><dc:creator>LogParser User : Allan Pike</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Yes, am running from a batch file - this is it:&lt;/P&gt;&lt;P&gt;logparser.exe file:Tat.sql -o:TPL -tpl:EventMonitor.tpl -direction:BW&lt;/P&gt;&lt;P&gt;sql file like this:&lt;/P&gt;&lt;P&gt;Select&amp;nbsp;ComputerName,&lt;BR&gt;&amp;nbsp;EventLog,&lt;BR&gt;&amp;nbsp;EventTypeName AS EventType,&lt;BR&gt;&amp;nbsp;EventID,&lt;BR&gt;&amp;nbsp;EventCategory AS Category,&amp;nbsp;&lt;BR&gt;&amp;nbsp;Sourcename,&lt;BR&gt;&amp;nbsp;Message,&lt;BR&gt;&amp;nbsp;TimeGenerated&lt;BR&gt;&amp;nbsp;&lt;BR&gt;INTO&amp;nbsp;c:\web\*.html&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp;&lt;a target=_blank href="file://\\server1\System"&gt;\\server1\System&lt;/A&gt;, &lt;a target=_blank href="file://\\server1\application"&gt;\\server1\application&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR&gt;WHERE&amp;nbsp;TimeGenerated &amp;gt;&lt;BR&gt;&amp;nbsp;SUB( TO_lOCALTIME(SYSTEM_TIMESTAMP()),&lt;BR&gt;&amp;nbsp;TIMESTAMP('0000-01-04 00:00:00', 'yyyy-MM-dd hh:mm:ss'))&lt;BR&gt;AND&amp;nbsp;EventTypeName='Error event'&lt;/P&gt;&lt;P&gt;OR&amp;nbsp;TimeGenerated &amp;gt;&lt;BR&gt;&amp;nbsp;SUB( TO_lOCALTIME(SYSTEM_TIMESTAMP()),&lt;BR&gt;&amp;nbsp;TIMESTAMP('0000-01-04 00:00:00', 'yyyy-MM-dd hh:mm:ss'))&lt;BR&gt;AND&amp;nbsp;EventTypeName='Warning event'&lt;/P&gt;&lt;P&gt;ORDER BY TimeGenerated&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jeff - easy enough to do "set DateTime=%DATE% %TIME%" but how do I then add %DateTime% ?&amp;nbsp; All attempts to add user variables to my .TPL file ends up displaying the variable name instead of it's contents in my HMTL file. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854859.aspx#1854859</link><pubDate>Mon, 30 Oct 2006 18:02:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854859</guid><dc:creator>LogParser User : Jeff</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Unfortunately, %DATE% and %TIME% aren't actually environment variables, so Logparser can't pick them up.&amp;nbsp; Also, it appears that Log Parser does use UTC time for the %SYSTEM_TIMESTAMP% and there doesn't seem to be a TO_LOCAL() call that would work in the LPHEADER field.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Best bet would be to make the batch file that says something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;set DateTime=%DATE% %TIME%&lt;/P&gt;&lt;P&gt;logparser -o:tpl ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and have %DateTime% added.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854747.aspx#1854747</link><pubDate>Mon, 30 Oct 2006 11:10:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854747</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>No, it probably just doesn't pick up those variables since they are special.  Are you running LP from a batch file?</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854783.aspx#1854783</link><pubDate>Sun, 29 Oct 2006 23:57:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854783</guid><dc:creator>LogParser User : Allan Pike</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>&lt;P&gt;Thanks for that.&amp;nbsp; I have tried my own variables in the past but the output HTML page showed the variable name and not it's contents.&amp;nbsp; The %DATE% and %TIME% system variables did the same - the output is "Generated 0n %DATE% at %TIME%" which was generated from this part of my .TPL file&lt;/P&gt;&lt;P&gt;&amp;lt;CENTER&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;div style="font-family: Georgia; font-size: 28pt; color: #000000;"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;Error &amp;amp;amp; Warning Events from System and Application Log&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p class="style1"&amp;gt;Generated 0n %DATE% at %TIME%&amp;lt;/p&amp;gt;&lt;BR&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;BR&gt;&amp;lt;/CENTER&amp;gt;&lt;BR&gt;&amp;lt;BR&amp;gt;&amp;lt;BR&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing something wrong ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>RE: Error: detected extra argument  helpppppppp</title><link>http://forums.iis.net/p/1145350/1854863.aspx#1854863</link><pubDate>Sun, 29 Oct 2006 23:14:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1854863</guid><dc:creator>LogParser User : DEinspanjer</dc:creator><cs:applicationKey>output_targets-51</cs:applicationKey><description>Oops. Been a while since someone told me to go read the help file. &lt;img src='images/emotions/wink.gif' height='20' width='20' border='0' title='Wink' align='absmiddle'&gt;  Yeah, I can see where SYSTEM_TIMESTAMP is in UTC format.  So you tried DATE and TIME and they didn't work? They are built in environment variables which the TPL format should support..</description></item></channel></rss>