[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Restarting after commit



John,

Are you using any column variables such as &variablename ?   I have found
that SQR loses its column variable values at commit time.  Some folks load
their selection criteria variables to an array and then get the next set
from the array after the commit.  Another thought is, and I haven't really
experimented with this one, if you move all column variable values to string
or numeric variables before the commit, perhaps this will preserve the
values you need for selection criteria.


-----Original Message-----
From: John Sayre <john_sayre@GAP.COM>
To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
Date: 04 March, 1998 12:00 PM
Subject: Restarting after commit


I have to produce a report and do table inserts which is causing a DB2
  -905 error.
  I want to do a commit, but am having problems getting the query to
pick
  up where it left off.

  The problem is that the query has an order by clause which orders on 6
  things:
  Division number
  zone
  region
  district
  store
  employee id

  I actually can get this to restart exactly where it was at the commit
by
  putting variables
  in the query where clause. (and zone# >= saved zone#)

  The problem is always:

  When the higher level sort resets to a lower # the lower sort has to
as
  well

  I can't consistently get this to restart at the place it was, but at
the
  next emplid
  then if the higher levels, to reset the lower levels at exactly the
  right time. I get too few
  rows.

  Any ideas?