|
>Does anyone have another idea of how to handle unknown variable typs at run time? One solution would be to use Java given the ability to use the result set meta data from an SQL select. Aaron Bartell -----Original Message----- From: rpgnext-bounces@xxxxxxxxxxxx [mailto:rpgnext-bounces@xxxxxxxxxxxx] Sent: Thursday, February 03, 2005 5:49 AM To: RPGNext Discussion and Information Subject: Re: [RPGNext] Fw: CPYFTOCSV Sorry Kirk, I was out of town that week so it must have slipped off my radar... I've got you in sights now! Actually, I've been meaning to rewrite the CPYTOCSV utility. I wrote it a long time ago based on DSPFFD. Today I'd rewrite it to use QUSLFLD, I think it would be faster. I've also never been satisfied with the WHERE clause. I'm also open to suggestions on how to handle a particular problem: since this is supposed to work for any database file, the file definitions are unknown at run time. I can easily use dynamic SQL to construct the appropriate select statement, but in order to process the data, I have to be able to read it into a program variable. Since there is no way to know at compile time what the run-time variable type will be, I have to convert everything to character. I do this using the char() SQL function. It appears that this is preventing the records with DATE data types from showing records. Does anyone have another idea of how to handle unknown variable typs at run time? Joel On Thu, 2005-02-03 at 15:31, Kirk.Palmer@xxxxxxxxxxxxx wrote: > I haven't gotten any responses to my problem. Any ideas? > > Kirk > > ----- Forwarded by Kirk Palmer/Walsworth Publishing Company on > 02/03/2005 09:29 AM ----- > Kirk Palmer/Walsworth Publishing > Company > > 12/27/2004 10:56 AM > To > rpgnext@xxxxxxxxxxxx > cc > > Subject > CPYFTOCSV > > > > Hi -- > > I downloaded and installed the RPGNext library to be able to use the > CPYFTOCSV command. I needed a CSV file with a field names header line > to send to an outside program. > > When I tested this command, I am getting a record in the CSV file for > each record in my physical file. But, except for the header line, all > I get is double quotes (") and commas, no data. > > What I determined is that any file I try with date fields works like I > described. If the file doesn't have dates, the file is created > correctly with the data. > > Since this is the only utility I found that adds the header line, I > would like to use it. I don't relish trying to do the same on my own > with the IFS APIs. > > Any help you can give me would be appreciated. > > Thanks, > Kirk > > > ______________________________________________________________________ > _______________________________________________ > This is the RPGNext Discussion and Information (RPGNext) mailing list > To post a message email: RPGNext@xxxxxxxxxxxx To subscribe, > unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpgnext > or email: RPGNext-request@xxxxxxxxxxxx Before posting, please take a > moment to review the archives at http://archive.midrange.com/rpgnext. _______________________________________________ This is the RPGNext Discussion and Information (RPGNext) mailing list To post a message email: RPGNext@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpgnext or email: RPGNext-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpgnext.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.