"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 11/17/2016
01:14:11 PM:
I assume it is the pointer that SQL cannot handle very well.
It doesn't appear to be a pointer issue -- unless you know
something I don't. The problem I run into is that the SQL precompiler
doesn't like the subscripts shown in the following use of the array, which
I tried to use for an UPDATE:
exec sql execute IMLFCMDRSM_Update_Stmt
using :IMLFCMP_View1.CiCompPTID :IMLFCMP_Ary(2)
, :IMLFCMP_View1.ImLfSeqTID :IMLFCMP_Ary(3)
, :IMLFCMP_View1.BoyExtTtl :IMLFCMP_Ary(4)
, :IMLFCMP_View1.YtdExtTtl :IMLFCMP_Ary(5)
, :IMLFCMP_View1.ExtIdx :IMLFCMP_Ary(6)
, :IMLFCMP_View1.AbsRto :IMLFCMP_Ary(7)
, :IMLFCMP_View1.TmsLstExt :IMLFCMP_Ary(8)
, :IMLFCMP_View1.TmsLstLRl :IMLFCMP_Ary(9)
, :IMLFCMP_View1.TmsLclCmp :IMLFCMP_Ary(10)
, :IMLFCMP_View1.TmsCrpAct :IMLFCMP_Ary(11)
, :IMLFCMP_View1.ChgByUsr :IMLFCMP_Ary(15)
, :IMLFCMP_View1.ChgByPgm :IMLFCMP_Ary(16)
, :IMLFCMP_View1.IMLFCMPTID
, :IMLFCMP_View1.ChgTs;
That is why I have to create the named indicators and use the data
structure subfields as follows -- and this works fine for an UPDATE:
exec sql execute IMLFCMDRSM_Update_Stmt
using :IMLFCMP_View1.CiCompPTID :IMLFCMP_Ind.CiCompPTID
, :IMLFCMP_View1.ImLfSeqTID :IMLFCMP_Ind.ImLfSeqTID
, :IMLFCMP_View1.BoyExtTtl :IMLFCMP_Ind.BoyExtTtl
, :IMLFCMP_View1.YtdExtTtl :IMLFCMP_Ind.YtdExtTtl
, :IMLFCMP_View1.ExtIdx :IMLFCMP_Ind.ExtIdx
, :IMLFCMP_View1.AbsRto :IMLFCMP_Ind.AbsRto
, :IMLFCMP_View1.TmsLstExt :IMLFCMP_Ind.TmsLstExt
, :IMLFCMP_View1.TmsLstLRl :IMLFCMP_Ind.TmsLstLRl
, :IMLFCMP_View1.TmsLclCmp :IMLFCMP_Ind.TmsLclCmp
, :IMLFCMP_View1.TmsCrpAct :IMLFCMP_Ind.TmsCrpAct
, :IMLFCMP_View1.ChgByUsr :IMLFCMP_Ind.ChgByUsr
, :IMLFCMP_View1.ChgByPgm :IMLFCMP_Ind.ChgByPgm
, :IMLFCMP_View1.IMLFCMPTID
, :IMLFCMP_View1.ChgTs;
But, by the same token the SQL precompiler will not accept the
data structure for an INSERT:
exec sql execute IMLFCMDRSM_Insert_Stmt
using :IMLFCMP_View1 :IMLFCMP_Ind;
For an INSERT, I have to use the array -- not the data structure:
exec sql execute IMLFCMDRSM_Insert_Stmt
using :IMLFCMP_View1 :IMLFCMP_Ary;
Sincerely,
Dave Clark
As an Amazon Associate we earn from qualifying purchases.