set tdate [clock format [clock seconds] -format %Y%m%d%H]
set tdate2 [clock format [clock seconds] -format %Y-%m-%d]
set starttime [clock format [clock seconds] -format %H]
set endtime [clock format [expr {(60*60) + [clock seconds]}] -format
%H]
I am currently using this code in Expect:
send "GENERATE PMREPORT PCHLOADSEC STARTDATE=" & $tdate2 & "ENDDATE="
& $tdate2 "STARTTIME=" $starttime ":00 ENDTIME=" $endtime ":00\r"
This beleive this would work in Perl or VBA but it is not recognized
in Expect.
How should I change the send command to make this work?
TIA
Got it. I just had to break it up into separate lines.
send "GENERATE PMREPORT PHLOADSEC STARTDATE=$tdate2&ENDDATE=$tdate2&STARTTIME=$starttime:00&ENDTIME=$endtime:00\r"
will get you closer to where you want to be.
> I am currently using this code in Expect:
>
> send "GENERATE PMREPORT PCHLOADSEC STARTDATE=" & $tdate2 & "ENDDATE="
> & $tdate2 "STARTTIME=" $starttime ":00 ENDTIME=" $endtime ":00\r"
>
> How should I change the send command to make this work?
What would the output from this statement look like if it worked?
For instance, do you want literal & in the output? That is
GENERATE PMREPORT PCHLOADSEC STARTDATE= & 2008-10-02 & ENDDATE= &
2008-10-02 STARTTIME= 13 :00 ENDTIME= 14 :00
I am guessing not. I am guessing that the output you want would rather
be:
GENERATE PMREPORT PCHLOADSEC STARTDATE=2008-10-02 ENDDATE=2008-10-02
STARTTIME=13:00 ENDTIME=14:00
If I am guessing correctly, then in Tcl, you want
send "GENERATE PMREPORT PCHLOADSEC STARTDATE=$tdate2 ENDDATE=$tdate2
STARTTIME=${starttime}:00 ENDTIME=${endtime}:00\r"