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



Does "create a .csv file" mean that the "FROMFILE(QTEMP/&FILNAM1)" was that .csv file created by the RPG program? If so, then CPYTOIMPF is not the best command to be using; not its purpose. That [database file data export] command would normally be creating the .csv directly into the "TOSTMF(&FILNAM1)"; i.e. eliminating the requirement for the RPG program to achieve a .csv output.

Simply replace the CPYTOIMPF with [if not the *correct* command, then] a better command like CPYTOSTMF with parameter settings STMFCODPAG(*PCASCII) ENDLINFMT(*CRLF) to effect what I infer is the desired.

FYI: Since v5r4 CPYTOIMPF RMVBLANK(*TRAILING) with DTAFMT(*DLM) can be used to get a [mostly] compressed view of the export to .csv format.

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.