Re: Sqlcode +326
Here's before the change (getting 326):
MADE THIS CHANGE (moved the DS to the top) and program functions correctly, w/o +326 SQLCODE. Go Figure:
Here's before the change (getting 326):
Code:
* SQL Data Structures d echds e ds extname(ech) d eclds e ds extname(ecl) d w7zp1 e ds extname(zp1) d a63007fads e ds extname(a63007fa) c/exec sql c+ declare a63007facursor cursor for select * from a63007fa c+ where s1user = :wsuser and (s1prt = ' ' or s1prt = :pxeprt) c+ and s1effdt between :pxefdte and :pxetdte c/end-exec c/exec sql c+ open a63007facursor c/end-exec * if cursor is already open, close it and re-open it c If sqlcod = -502 c/exec sql c+ close a63007facursor c/end-exec c/exec sql c+ open a63007facursor c/end-exec c endif c/exec sql c+ fetch a63007facursor into :a63007fads c dow sqlcod = *zero
Code:
* SQL Data Structures d a63007fads e ds extname(a63007fa) d echds e ds extname(ech) d eclds e ds extname(ecl) d w7zp1 e ds extname(zp1) c/exec sql c+ declare a63007facursor cursor for select * from a63007fa c+ where s1user = :wsuser and (s1prt = ' ' or s1prt = :pxeprt) c+ and s1effdt between :pxefdte and :pxetdte c/end-exec c/exec sql c+ open a63007facursor c/end-exec * if cursor is already open, close it and re-open it c If sqlcod = -502 c/exec sql c+ close a63007facursor c/end-exec c/exec sql c+ open a63007facursor c/end-exec c endif c/exec sql c+ fetch a63007facursor into :a63007fads c dow sqlcod = *zero
Comment