I think you can just do a CPY from your multiformat to an IFS file.
You'll get a crlf after every record by default which works fine for
EXCEL. You can call it CSV, it just won't have any commas as you only
have one field per record.
I don't have time to try it right now, but your command should look
something like this:
CPY OBJ('/qsys.lib/filename.file/mbrname.mbr')
TOOBJ('/dkimmel/home/mbrname.csv')
TOCCSID(*PCASCII)
DTAFMT(*TEXT)
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jennifer Martin
Sent: Tuesday, November 04, 2008 3:19 PM
To: Midrange Systems Technical Discussion
Subject: Re: Transferring a multiple record format logicalfromthe AS/400
intoExcel
Thanks I will check out the links. The data needs to be like this:
Customer
Address
Address
Customer
Address
Address
Address
Customer
Address , etc.
and that's how I have it in the MF logical file. It has to be in csv
format to upload into the other system. It won't accept any other
format.
<rob@xxxxxxxxx> 11/4/2008 3:49 PM >>>
After doing further research on this I think you're better off either
using
http://www.scottklement.com/rpg/ifs.html
to create a tab delimited file in the ifs by reading this MF lf in
RPGLE, or, use his examples on writing directly to excel at
http://faq.midrange.com/data/cache/533.html
Because, what I am sure you are looking for is something like:
A B
001 CompanyA
001 Dallas
002 Fort Worth
002 CompanyB
001 Fort Wayne
003 CompanyC
001 Kendallville
002 Avilla
where column A could be either company number or ship to number and
column b could be company name or ship to name.
Or some gyration of this.
Avoid CSV or comma seperated variable, because of concerns about
embedded commas in names like My Company, Inc. There's workarounds but
why take the hassle?
Excel can easily read a tab delimited. Try it. I used Notepad and
typed in the above columns and replaced the space with a tab. Did a
save as .txt. Exited Notepad. Then used Windows Explorer to find it.
And said Open With Excel and it did a fine job. And, if one row has
more or less columns, no problem. Try that with notepad and then excel
again.
Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
This transmission may contain information that is privileged,
proprietary, confidential and/or exempt from disclosure under applicable
law. If you are not the intended recipient, you are hereby notified that
any disclosure, copying, distribution, or use of the information
contained herein (including any reliance thereon) is STRICTLY
PROHIBITED. If you received this transmission in error, please
immediately contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.