Thanks to all who replied. The temporary solution is to run the sql and the CL with the SQL, so the steps are:

(all of the following are in the SQL thanks to Birgitta's suggestion)
Run CL to add the libraries to the library list
Run CL to override the files
Run CL to delete the existing file
Run the SQL to create the table and insert the data
Run CL to remove the overrides
Run CL to remove the libraries from the list
Run CL to execute the CPYTOIMPF to create/replace the csv

All of that is in a source member executed by the RUNSQLSTM command with error level of 40 to ignore errors (dangerous but it works).

I need to move on to the code that will identify changes once the file is accepted but this will hold me for now.

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java

On 12/4/2013 11:34 AM, John Yeung wrote:
On Wed, Dec 4, 2013 at 11:18 AM, Raul A. Jager W. <raul@xxxxxxxxxx> wrote:
to get it in CSV you will have to concatenate the data and the
"comas"
On Wed, Dec 4, 2013 at 11:57 AM, Dan Kimmel <dkimmel@xxxxxxxxxxxxxxx> wrote:
You can always do something like this
[throw in your own double-quotes and commas]
Be very, very careful when rolling your own. It's not always as
simple as you think. Data that contains literal double-quotes are
especially insidious and surprisingly common. The proper way to
handle corner cases depends on who/what is reading the data, and no
one way is universally safe.

I have received more than anyone's fair share of "write-only" CSV data
(easy to write, not easy to reconstitute into the original data).

John


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.