All-
I'm getting the above error code from an RPGSQL program. This is just after a DECLARE statement. Other fields in the SQLCA are blank. I can run the statement in Interactive SQL w/o errors.
I should be getting a small subset. I get 0 records.
Any Ideas? It's not in the SQLCODE finder.
Phil
Software/Hardware used:
iSeries V5R4M0
ASKED:
November 2, 2009 11:02 PM
UPDATED:
November 28, 2009 2:29 AM
I think you might have looked at this value at the wrong step.
My guess is you got zero returned records because that was the result of your query.
Perhaps if we see the code …
Code:
Declare C01 cursor for Select INWIP100.Activ, MSPMP100.Activ, INWIP100.PrdNo, House WIPID, INWIP100.SgVnd, MSPMP100.Obsol, INWIP100.MinB INWIP100.OrdPt, INWIP100.LeadT, INWIP100.Buyer FROM INWIP100 inner join MSPMP100 on INWIP100.PrdNo = MSPMP100.PrdNo WHERE MSPMP100.ITTYP = :ITTYP and House = :House and WIPID =
lanner EVAL ITTYP
ITTYP = ‘B’
EVAL House
HOUSE = ‘AD’
EVAL Planner
PLANNER = ‘PLINE ‘
So you’re saying that the variables have their values
Then you declare the cursor
Then you open the cursor
Then you fetch the cursor into …
and you get no records ??? what is the SQLCode and other values when you do the fetch?
Phil
If all that’s happened so far is the DECLARE, then I wouldn’t expect anything in any SQLCA value to be populated yet.
Nothing SQL has executed. The DECLARE is really only for the pre-compiler to generate its structures. AFAIK, until you at least OPEN the cursor, no actual SQL has executed. No status or code exists yet.
Tom
HUuummm …
I thought that the Declare statement loaded the variables and did some basic error checking..
Thanks. I’ll run the code again and keep that in mind. Dang, makes sense.
PS: Tom – > Programming since unit-record machine days
Does a 026 or a 82 or a 1402 ring a bell?
AFAIK means?
Does a 026 or a 82 or a 1402 ring a bell?
Yep. The 1402 was almost as big as the 1401 next to it. Hard to imagine nowadays that the 1401 was an 8K box; we had a 4K expansion unit to bring us up to 12K. Eventually, the 026s were replaced with 129s. We already had a couple 029s, so getting the 026s totally gone made a real difference. (About as much as moving from the 10CPS TTY remote terminal connections up to 30CPS! Wow!)
AFAIK means?
AFAIK, “as far as I know”.
Tom