I'm stuck on a small portion of code I'm writing and was hoping someone
here could help me out. This job is running Suprtool within a While loop
in Mpex, all within a Streamx job. The user is prompted for a date
range. What I'm trying to do is to get the number of records (cnt) that
qualify for each date within a date range.
!job...
::assign d1 = cdate(begdate,'ccyymmdd')
::assign d2 = cdate(enddate,'ccyymmdd')
!mpex
while {d2} >= {d1} do
::setbraces ~~
suprtool
base <database>,5,reader
get <dataset>
item <date1>,date,ccyymmdd
item <date2>,date,ccyymmdd
item <date3>,date,ccyymmdd
if <date1> >="~d1~" &
and <date2> <="~d1~"
o$null
exit
setvar cnt !suprtoolfullcount
calc ~d1~ + 1
setvar d1 !hpresult
!exit
!tell #s{hpjobnum} Job is done.
!eoj
I'll give only the portion of the stdlist where the problem shows up:
...
>>and <date2> >= "20020101"
>o$null
in=...., out=107. ...
Warning: <database> is held open
%> setvar cnt !suprtoolfullcount
%> calc 20020101 + 1
%> setvar d1 !hpresult
%>:exit
end of program
:
:tell #s{hpjobnum}
^
Expected a session number between 1 and 16,383 (cierr 1611)
Remainder of job flushed.
I don't understand why the database would still be open if I exited
Suprtool. The greater-than sign would indicate to me that Suprtool was
still running, too.
Thanks for any help you may offer.
Jay
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|