× 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.



SQLTYPE(DBCLOB: 256000) defines a double byte variable. CCSID 1208 is only allowed for Single Byte Data Types, i.e. CLOB.
SQLTYPE(CLOB: 256000) CCSID(1208) defines a single Byte variable, which is 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." (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> 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, same error.

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 <Hauser@xxxxxxxxxxxxxxx>
wrote:

Before we continue, yet another question, on what release you are on?
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 65535.
... and UTF-8 (CCSID 1208) is considered as single byte, so belongs to
CHAR, CLOB while UTF-16 (CCSID 1200) is double Byte, i.e. GRAPHIC,
DBCLOB

Try to first explicitly cast your character fields into EBCDIC single
byte, 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 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> On Behalf Of Art
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> wrote:

<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
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
--
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

--
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
--
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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.