Re: CLOB fields
Jon Paris <[email protected]> Sat, 6 Jun 2026 07:46:47 -0400
| Newsgroups | gmane.comp.hardware.ibm.midrange |
|---|---|
| Message-ID | <[email protected]> |
Where possible (i.e. below 16Mb) wouldn't it be better to have SQL bring them into a VARCHAR? Why mess with lengths when the code can do it for you? Jon Paris [email protected] > On Jun 5, 2026, at 3:15 PM, David Gibbs via MIDRANGE-L <[email protected]> wrote: > > >> On Jun 5, 2026, at 2:18 AM, Daniel Gross <[email protected]> wrote: >> >> If you want the content in RPG your best bet is to use a variable of SQLTYPE(CLOB:<size>). This results in a special data structure with a _LEN and _DATA subfield, that you can use from RPG. And the contents of your CLOB are fully copied into memory. > > FWIW: I submitted an idea to allow the data and length subfields to be accessed more idiotically. > > Instead of ‘clobfield_data’ and ‘clobfield_len’, the subfields would be qualified, clobfield.data & clobfield.len. > > https://ideas.ibm.com/ideas/IBMI-I-4759 > > david > > -- > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: [email protected] > To subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/midrange-l > or email: [email protected] > Before posting, please take a moment to review the archives > at https://archive.midrange.com/midrange-l. > > Please contact [email protected] for any subscription related questions. > -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/midrange-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l. Please contact [email protected] for any subscription related questions.