|
------------------------------
message: 6
date: Tue, 18 Sep 2018 22:52:45 -0500
from: orlando misas <omisas@xxxxxxxxx>
subject: Error handing field CLOB
Hi,
I have a file with 38000 records, the record has only one field char(900).
I need to join these fields in a single field type CLOB (1G). The file size
exceeds 30 megabytes . I use the following instruction:
SELECT CAST ( LISTAGG ( CAST ( TRIM ( FIELD ) AS CLOB ( 1 K ) ) ) AS CLOB
( 1 G ) )
INTO VARIABLE
FROM LIBRARY.FILE ;
Where VARIABLE is CLOB ( 1 G)
When I execute this sentence, I obtain an error, because the result is
greater than one mega then I change the instruction by:
SELECT GET_CLOB_FROM_FILE ( 'LIBRARY/FILE(MEMBER)' , 0 )
INTO VARIABLE
FROM SYSIBM . SYSDUMMY1
WITH CHG ;
This instruction run ok, but the content of the variable is incomplete
because it cuts information from the records that it unites.
Example:
-First records of the file:
<ARInvoiceDataSet>
<InvcDtl>
<Company>81</Company>
<InvoiceNum>10771</InvoiceNum>
<InvoiceLine>1</InvoiceLine>
<PartNum>E12720-60-999</PartNum>
.....
.....
- Expected string:
<ARInvoiceDataSet><InvcDtl><Company>81</Company><InvoiceNum>10771</InvoiceNum><InvoiceLine>1</InvoiceLine><PartNum>E12720-60-999</PartNum>.........
- Obtained string:
Dtl><Company>81</Company><InvoiceNum>10771</InvoiceNum><InvoiceLine>1</InvoiceLine><PartNum>E12720-60-</PartN>....
This process is in iSeries V7.3 in a store procedure sql pure.
Does anybody have an idea?
Thank you.
Orlando Misas
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.