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



I'm looking at what I might do with this suggestion...thanks.


CRPence wrote:
Pat Barber wrote:
I have been asked to create a CSV file to send to an outside
company.

They sent me a standard file layout and I created the file just
fine using a file transfer request using Access.

Got a note back and now they want a "header" record inserted as the first record of the file. This header record is nothing but
column heading with descriptions.

Since the file has fixed field lengths, I can't just put a dummy
record there to create this stupid header.

I need to be able to store the CSV header record somewhere and
copy it as the first record on each file transfer.

Any ideas.


FWiW I have an example of a recursive CTE querying data in QADBIFLD [probably better to use the SYSCOLUMNS catalog VIEW] which easily could be modified to generate a row of data that matches the desired\required CSV formatting. The query could be encapsulated in a VIEW, or possibly in a program, to dynamically generate the /header/ record for a particular file, rather than [creating "by hand" and] storing it somewhere. As a VIEW, if using CPYTOIMPF for the data rows, a first CPYTOIMPF request against the VIEW using MBROPT(*REPLACE) could precede the CPYTOIMPF of the row data using MBROPT(*ADD).
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14030108

Regards, Chuck

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.