|
On Friday 12 April 2002 6:14 pm, Buck Calabro wrote: > >Your technique with the QUSLFLD API is correct... > >the only thing you need to do is write routines > >that dynamically convert the extracted bytes to an > >alphanumeric presentation in case it's not a > >character field. > > Don't forget NULL support. > I have GOT to see how to handle date/time datatypes this way... Off to > the books I go! > > --buck Hi Buck My routines handle date/time as far as I know, but there is no way to handle NULLs in a program described file[1] (which is how I handle generic files). As far as converting to .csv is concerned it's not too bad, as I've put together a CVTNULFLD routine to strip them out first (obviously over a copy if it's a live file), but not much use when you have to handle them (like from a trigger). There was an article in iSeries News recently with a .csv generator that used the C APIs to read the file instead of direct I/O in RPG, and that could deal with NULLs. I've not yet looked at the technique, so my solution isn't quite there yet. Regards, Martin [1] The compile option is for read only access or user control (in/update/out) for externally described files only :( -- martin@dbg400.net jamaro@firstlinux.net http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X [this space for hire] ASCII Ribbon Campaign against HTML mail & news / \
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.