Hi Birgitta,
The freqs field (second column) of the log_table now includes *POINTER, it makes sense to you?
[cid:image001.png@01D675A5.DB648560]
--
Thank you,
Nihat
-----Özgün İleti-----
Kimden: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> Yerine Birgitta Hauser
Tarih: Tuesday, August 18, 2020 9:02 PM
Kime: 'RPG programming on IBM i' <rpg400-l@xxxxxxxxxxxxxxxxxx>
Konu: RE: SQL0311 error
DİKKAT: Bu e-posta kurum dışından gönderilmiştir. Zararlı dosya veya bağlantılar (link) içerebilir. Kaynağından emin olmadığınız dosyaları/bağlantıları (link) açarken veya e-postayı cevaplarken dikkatli olunuz.
________________________________
You also have to set the length!
l_data = peReqs;
I_Len = %Len(%Trim(I_Data);
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok) "What is worse than training your staff and losing them? Not training them and keeping them!"
„Train people well enough so they can leave, treat them well enough so they don't want to.“ (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx<mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>> On Behalf Of Nihat Ezer via RPG400-L
Sent: Dienstag, 18. August 2020 18:15
To: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
Cc: Nihat Ezer <nihatezer@xxxxxxxxxxxxxxxxxxxxx<mailto:nihatezer@xxxxxxxxxxxxxxxxxxxxx>>
Subject: SQL0311 error
Greetings,
create table log_table (
fwsad varchar(50),
freqs xml,
facklm varchar(120),
fhtkod varchar(20),
);
I have a scenario, which sends xml request and receives response then invokes the following procedure within service program that writes the log_table above
peReqs is the xml request itself in character, after assigning it to the pre-compiler expanded field (l_data) successfully, i receive the sql0311 (Length in varying-length, LOB, or XML host variable not valid) while inserting
dcl-pi log_table_insert ind;
pedsLog_table likeds(dstLog_table) const;
peReqs varchar(1200) const;
peHataMesaji varchar(100);
end-pi;
dcl-s l sqltype(clob:9999)
// here we go
l_data = peReqs;
exec SQL
insert into fgLog_table
values (
:pedsLog_table.fwsad,
:l,
:pedsLog_table.facklm,
:pedsLog_table.fhtkod)
with nc;
Seen the following link as well, which did not help much as i did not understand
https://archive.midrange.com/rpg400-l/201407/msg00159.html
--
Thank you,
Nihat
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx> To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx> To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.