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



I'm with you now. I misunderstood and thought you were talking about a
globally-scoped RPG variable.

Thanks

date: Thu, 16 Sep 2021 05:28:38 +0200
from: "Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx>
subject: RE: Good way to identify malformed XML?

You can define a CLOB variable with the Keyword SQLTYPE:

DCL-S YourCLOBVar SQLTYPE(CLOB: 16000000);

... but a CLOB Variable is restricted to 16MB (RPG's limit of character
variables).
That's why I suggested to use an SQL Global Variable, which is a permanent
Object that works similar to a data area in the QTEMP, i.e. the same SQL
Global variable can have different values in different jobs.
An SQL LOB (CLOB, BLOB, DBCLOB, XML) can be defined up to 2 GB.
An SQL Global Variable can only be accessed in a SQL Statement, i.e. you
either need a SET or VALUES ... INTO statement to populate your SQL Global
Variable.

Examples for Generating SQL Global Variables
Create Variable YourSchema/YourglobalCLOB Clob(2G) Default '';
Create Variable YourSchema/YourglobalXML Xml Default Null;

Examples for populating SQL Global Variables:
Exec SQL Set YourSchema.YourGlobalCLOB = 'ABC';
Exec SQL Set YourSchema.YourGlobalXML = xmlparse(document
httpgetCLOB('https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
',
'' ));

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)




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.