|
Birgitta's sample works on another machine I have access to. I opened a
ticket with IBM and am going to send what they need to figure it out.
Thanks
On Fri, Jan 10, 2020 at 2:12 PM Bruce Vining <bruce.vining@xxxxxxxxx>
wrote:
Very strange indeed. I just tried the sample program Birgitta supplied on
a 7.3 system with no problem (with both a job CCSID of 65535 and of 37,
and
a *SRCF of varying CCSIDs). I don't suppose there's anyway for me to
access your system to check things out...
Bruce
On Fri, Jan 10, 2020 at 1:47 PM Art Tostaine, Jr. <atostaine@xxxxxxxxx>
wrote:
Thank you again Birgitta. I get the same message. DSPLY 332-, CPD4318which
reason code 12.
Something is definitely weird.
On Fri, Jan 10, 2020 at 1:20 PM Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx
wrote:
SQLTYPE(DBCLOB: 256000) defines a double byte variable. CCSID 1208 isonly
allowed for Single Byte Data Types, i.e. CLOB.
SQLTYPE(CLOB: 256000) CCSID(1208) defines a single Byte variable,
is(Les
NOT a CLOB or DBCLOB File!
Did you try to write just any hardcoded element to the IFS?
The following example can be compiled and executed without any problem
DCL-S OutFile SQLTYPE(CLOB_File) CCSID(1208);
//******************************************************************
//IFS File Information
OutFile_Name = '/home/Hauser/TestOutfile.json';
OutFile_NL = %Len(%Trim(OutFile_Name));
OutFile_FO = SQFCRT;
Exec SQL Select JSON_OBJECT('data': 'Value')
into :OutFile
From SysIBM.SysDummy1;
If SQLCODE < *Zeros;
Dsply SQLCODE;
EndIf;
*InLR = *On;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars."
sameBrown)them
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training
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> On Behalf Of Art
Tostaine, Jr.
Sent: Freitag, 10. Januar 2020 16:51
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: JSON_OBJECT and Writing to IFS
We are on V7R3. This compile fails it says CCSID 1208 not allowed
dcl-S OutFile SqlType(DBCLOB:256000) ccSid(1208);
I can use 1208 on CLOB_FILE, so I tried this, with just one field,
Hauser@xxxxxxxxxxxxxxxerror.
DCL-S OutFile SQLType(CLOB_FILE) ccSid(1208) ;
exec sql select json_object('data':
json_arrayagg(
json_object(
'ExternalId': trim( cast (Nameid as char ccsid 37))
) ) )
into :outFile from lcadtalib.namintprp where nameid >= '0275610'
;
On Fri, Jan 10, 2020 at 12:22 AM Birgitta Hauser <
on?
wrote:
Before we continue, yet another question, on what release you are
65535.May be it is an older release and the CCSID specification on the
SQLTYPE is not yet allowed.
Otherwise there must be somewhere a character field with CCSID
to... and UTF-8 (CCSID 1208) is considered as single byte, so belongs
singleCHAR, CLOB while UTF-16 (CCSID 1200) is double Byte, i.e. GRAPHIC,
DBCLOB
Try to first explicitly cast your character fields into EBCDIC
trainingbyte, i.e. CCSID 37 (in your case). If the CC
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
sothem and keeping them!"
„Train people well enough so they can leave, treat them well enough
Artthey don't want to.“ (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
postwrote:Tostaine, Jr.
Sent: Donnerstag, 9. Januar 2020 20:18
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: JSON_OBJECT and Writing to IFS
Yes I've tried 1208 too. Same error.
On Thu, Jan 9, 2020 at 1:40 PM Bryan Dietz <bdietz400@xxxxxxxxx>
<snip>
I declare the DBCLOB like this:
DCL-S OutFile SqlType(DBCLOB:256000) ccSid(1200) ; </snip>
I believe it should be 1208;
Bryan
Art Tostaine, Jr. wrote on 1/9/2020 1:34 PM:
I declare the DBCLOB like this:--
DCL-S OutFile SqlType(DBCLOB:256000) ccSid(1200) ;
This is the RPG programming on IBM i (RPG400-L) mailing list To
post aa message email: 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
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliate
link: https://amazon.midrange.com
--
Art Tostaine
--
This is the RPG programming on IBM i (RPG400-L) mailing list To
unsubscribe,message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
affiliateor change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
post alink:
https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list To
unsubscribe,message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
affiliateor change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
unsubscribe, orlink: https://amazon.midrange.com
--
Art Tostaine
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a
message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
affiliatechange list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
affiliatelink: https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: 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
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
link: https://amazon.midrange.com
--
Art Tostaine
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: 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
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
Thanks and Regards,
Bruce
931-505-1915
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: 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
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
Art Tostaine
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.