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



" Not sure what the length of the field names has to do with the SQL
statement length for a statement used to generate a column heading row
for CSV, but..."

When building a list of field names, SQL stmts can get lengthy. The longer each field name, the longer the SQL stmt.


essage . . . . : 11600 - RJSIMAGE/DOCSQL SQLSTM('insert into
qtemp/WORKHEADER values ( ''"Cust0001-Name","Cust0001-address-line1
"," Cust0001-address-line2"," Cust0001-address-line3","CUST0001-CITY,"," ...

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: Monday, April 02, 2012 3:40 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Is there a better way to run SQL in a CL pgm?

On 02-Apr-2012 10:33 , Stone, Joel wrote:
The DOCSQL command is great - it builds larger strings than the one I
copied from the magazines, which is especially useful for building
row 1 of an excel spreadsheet containing all the column headings from
an Iseries PF with the ZFFDTOCSV command. These SQL commands can
get to be 1000+ characters when a file has lots of lengthy field
names.

Not sure what the length of the field names has to do with the SQL
statement length for a statement used to generate a column heading row
for CSV, but...

If interested, I had given an example of a recursive query which
could be used to generate such a heading row from the catalogs for a
named table; a query statement text which would be effectively fixed-length:
# Subject: Re: CSV file with a header
# Date: Fri, 21 May 2010 13:32:10
http://archive.midrange.com/midrange-l/201005/msg00932.html

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.