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



On Thu, Nov 10, 2011 at 9:32 AM, Morgan, Paul <Paul.Morgan@xxxxxxxxxxx> wrote:
If you use CPYFRMIMPF with the RCDDLM(*CRLF)
and FROMRCD(2) parameters you can skip the .txt
futzing in your process.

I think Pete was referring only to the very last CRLF (which could be
interpreted as signifying an empty record at the end; but I don't know
because I haven't used CPYFRMIMPF in ages; see below). Surely the
other ones have to stay in there. FROMRCD(2) is a nice tip for
skipping the header row.

Personally, I have had lots of problems (ranging from annoyances to
deal-breaking lack of functionality or incorrect functionality) with
all of CPYFRMIMPF, CPYTOIMPF, CPYFRMSTMF, and CPYTOSTMF. I'm on V5R2,
if that makes a difference, and I think it does.

1) Save from Excel (I prefer CSV format)

Normally, I would say CSV is less safe than tab-delimited (because
data is much more likely to contain commas than tabs), but in the case
of either type generated *by Excel*, I think I agree that CSV is
better. The reason for this is that even if you choose tab-delimited,
Excel STILL treats commas in your data as special characters, so your
import facility still has to know how to parse Excel CSV anyway. (And
CPYFRMIMPF on V5R2 certainly does not.)

Because of all the issues with IBM's commands, particularly when
interfacing with Excel, I don't use any of them directly anymore.
Some of them I've been able to create tolerable wrappers around (I
think CPYFRMSTMF and CPYTOIMPF). For anything that has to read or
write "heavy-duty" Excel data, I now leave the data in Excel binary
format and use iSeries Python and the xlwt and xlrd modules. (Regular
Python with xlwt and xlrd is a great option for working with Excel
files on Linux/Windows/Mac.)

Scott Klement's POI stuff is certainly an option, and Giovanni Perotti
(Easy400.net) provides a wrapper around that which should be even
easier. (In my opinion, neither of those is as easy or as capable as
xlwt and xlrd, though.)

John

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.