<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Tahoma","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Part of the batch file you need:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>******************************<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>for /f "tokens=1,2,3 delims=/ " %%a in
("%date%") do set day=%%a&set month=%%b&set year=%%c<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>SET SystemDate=%year%%month%%day%<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>:: Time format with leading zeroes<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>SET Now=%Time: =0%<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>SET HHH=%Now:~0,2%<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>:: Call GrADS script (making sure GrADS is on your PATH)<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>grads.exe -cpb 'my_grads_script.gs %SystemDate% %HH%'<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>******************************<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>In your GrADS script:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Subwrd(args, 1) will pick up the date passed %SystemDate%<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'>Subwrd(args, 2) will pick up the time passed by %HH%<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Tahoma","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> gradsusr-bounces@gradsusr.org
[mailto:gradsusr-bounces@gradsusr.org] <b>On Behalf Of </b>bala vasanthakumar<br>
<b>Sent:</b> 22 August 2012 13:42<br>
<b>To:</b> GrADS Users <br>
<b>Subject:</b> [gradsusr] gradsscript through batch file<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Dear Grads user<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal> can any one pls help me how to call the grads script
through batch file by passing the date and time in the batch file itslef. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Thanx and regards <o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<a
href="http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm@Middle?"
target="_blank"><span style='text-decoration:none'><img border=0
id="_x0000_i1025"
src="http://sigads.rediff.com/RealMedia/ads/adstream_nx.ads/www.rediffmail.com/signatureline.htm@Middle"></span></a><o:p></o:p></p>
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=578
style='width:433.5pt'>
<tr>
<td style='padding:0cm 0cm 0cm 0cm'>
<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#393939'>Follow </span><b><u><span style='font-size:9.0pt;
font-family:"Arial","sans-serif";color:#0000CC'><a
href="http://track.rediff.com/click?url=___http://dealhojaye.rediff.com?sc_cid=rediffmailsignature___&cmp=signature&lnk=rediffmailsignature&newservice=deals"
target="_blank">Rediff Deal ho jaye!</a></span></u></b><span
style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#393939'> to
get exciting offers in your city everyday.</span><o:p></o:p></p>
</td>
</tr>
</table>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>