NicC wrote:Why not read all the data for that ID into a cursor and have a loop in the program walking through the cursor displaying each item at a time? Saves going to DB2 each time you want a new item (which turns out to be not the item you need).
How would you keep the cursor open in a pseudo-conversational setup?
first time (or when issue-id changes) :
if account-id is character move low-values to hv-account-id
if numeric : move -9999 to hv-account-id (make sure your hv is signed)
select ... where ISSUE_ID = :hv-issue-id and ACCOUNT_ID > :hv-account-id
order by account-id
fetch first 1 row only
I can explain it to you, but i can not understand it for you.