940 pts.
 SQLCODE = 1077952576
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

Answer Wiki:
Note that dec(1077952576) = hex(40404040). Tom "Very interesting" (said in a German accent.)
Last Wiki Answer Submitted:  November 5, 2009  2:44 am  by  TomLiotta   108,135 pts.
All Answer Wiki Contributors:  TomLiotta   108,135 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 …

 44,190 pts.

 

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 = :P lanner                

EVAL ITTYP
ITTYP = ‘B’

EVAL House
HOUSE = ‘AD’

EVAL Planner
PLANNER = ‘PLINE ‘

 940 pts.

 

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

 44,190 pts.

 

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

 108,135 pts.

 

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?

 940 pts.

 

AFAIK means?

 940 pts.

 

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

 108,135 pts.