|
As I recall, the SQL precompiler doesn't like qualified data structures.
I believe I ran into this at v7R1 and had to solve it with pointers. I
don't have access to that code or a V7R1 machine now, however and your code
is, I think, complicated in that SQLCA is defined and used by the SQL
insert. So even a pointer solution might not work.
You could probably solve the problem quickly by using RLA...
Sam
On 10/15/2014 1:08 PM, Michael Ryan wrote:
I thought I was being clever...perhaps not...I can't get the variables in---
the INSERT clause right. I've tried using pIn_SQLCA subfields or In_SQLCA
subfields and I get the :In_SQLCA.SQLWRN -> SQL0312: Position 21 Variable
IN_SQLCA not defined or not usable as well as the other side SQL0312:
Position 30 Variable SQLWRN not defined or not usable. Why can't I do
this?
D In_SQLCA DS LikeDS(SQLCA)
P WSV_Logger...
P B Export
D WSV_Logger...
D PI Like(rc)
D pIn_SQLCA Value
D LikeDS(SQLCA)
D rc S 10I 0
/Free
In_SQLCA = pIn_SQLCA;
Exec SQL
Insert Into WEBSVC/WSVLOGP (WSV_SQLCAID,
WSV_SQLCABC,
WSV_SQLCODE,
WSV_SQLERRML,
WSV_SQLERRMC,
WSV_SQLERRP,
WSV_SQLERR,
WSV_SQLWRN,
WSV_SQLSTATE)
Values ( :In_SQLCA.SQLCAID,
:In_SQLCA.SQLCABC,
:In_SQLCA.SQLCODE,
:In_SQLCA.SQLERRML,
:In_SQLCA.SQLERRMC,
:In_SQLCA.SQLERRP,
:In_SQLCA.SQLERR,
:In_SQLCA.SQLWRN,
:In_SQLCA.SQLSTATE) ;
Return 1;
P WSV_Logger...
P E
This email is free from viruses and malware because avast! Antivirus
protection is active.
http://www.avast.com
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.