×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
The precompiler doesn't seem to have a problem with PREFIX.
D aaakeyds e ds extname(aaakey) prefix (x)
/free
exec sql
select comp into :xcomp
from aaakey
where comp=1;
xcomp+=1;
exec sql
update aaakey
set comp=:xcomp
where comp=:xcomp-1;
*inlr=*on;
return;
/end-free
Nor does it seem to have a problem with qualified.
D aaakeyds e ds extname(aaakey) qualified
/free
exec sql
select comp into :aaakeyds.comp
from aaakey
where comp=1;
aaakeyds.comp+=1;
exec sql
update aaakey
set comp=:aaakeyds.comp
where comp=:aaakeyds.comp-1;
*inlr=*on;
return;
/end-free
Nor does it seem to have a problem with likeds.
D aaakeyds e ds extname(aaakey) qualified
d xds ds likeds(aaakeyds)
/free
exec sql
select comp into :xds.comp
from aaakey
where comp=1;
xds.comp+=1;
exec sql
update aaakey
set comp=:xds.comp
where comp=:xds.comp-1;
*inlr=*on;
return;
/end-free
It just seems to have a problem with that extra field.
D aaakeyds e ds extname(aaakey) qualified
d xds ds likeds(aaakeyds)
d mysubfield 3p 0
/free
exec sql
select comp into :xds.mysubfield
from aaakey
where comp=1;
xds.mysubfield+=1;
exec sql
update aaakey
set comp=:xds.mysubfield
where comp=:xds.mysubfield-1;
*inlr=*on;
return;
/end-free
From listing:
select comp into :xds.mysubfield
SQL0312: Position 32 Variable MYSUBFIELD not defined or not usable.
SQL0312: Position 28 Variable XDS not defined or not usable.
So I think this general rule about SQL needing pointers to get to a
subfield in a data structure is not what I am seeing.
Might behoove you to report this as a bug.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.