Does anybody know of a utility that will import a CSV file into a
iSeries physical file? I've tried searching on google (and maybe I've
missed it!) but I can't find a utility already done for that........
Thanks
Steve
You can use excel and ODBC and then use import external data or you
could use FTP to the IFS then use CPYFRMIMPF command.
I seem to recall the Client Access has a file transfer component,
and it probably supports CSV. So if from a windows client, that may
be an option.
CPYFRMIMPF is the IBM i feature for import from text [stream]
files into the database; CSV being a supported form, but by various
parameters in the prompted command to describe the input layout. It
can read from a network drive, or from the [stream] file data that
was placed on the system; e.g. by FTP
Because a number of users were FD&H about its [improper]
functioning in older releases, when several corrections were made
for v5r3+, there have been many negative posts bemoaning its many
flaws; almost all of which were resolved simply be reestablishing
the wasteful pre-processing of CPYTOSTMF or CPYFRMSTMF to perform
CCSID conversion against data which is tagged to not have any CCSID
conversions performed. That is a heads-up, that if the input data
is not properly tagged, do not expect the feature to magically do
the right thing when lied to.
In some of those tirades about CPYFRMIMPF [& CPYTOIMPF] there
will invariably be reference to /write it yourself/ and utilities
that were written by others to be used instead of those
import\export features provided in the OS. A web search with
site:midrange.com will surely find some variety of those.
Regards, Chuck
There is an addin for Excel that allows you to do this directly from
the spreadsheet. You can create a new file or add data to a file and
add and replace members. Don't remeber the install off the top of my
head but check your Excel toolbar it may already be there.
Thad Rizzi
Previous comments already mention both of the tools I use most often:
Client Access (iSeries Access) and CPYFRMIMPF. Both have their
flaws. Both make you jump through annoying hoops. Well, they are
annoying to me, anyway. Client Access is better at handling CSVs
generated from Excel.
If you don't mind using fixed-field flat files instead of CSV, another
option is to transfer the file to the QDLS folder system and use
CPYFRMPCD.
John
Copy any *.CSV onto the DLS and then run a command on the artist-
formerly-known-as-AS400 which parses it, creates a file with field
sizes read from the CSV and the copies data into that file - it
creates new files and/or uses existing (as long as the fields data
columns fit into the fields).
I've been meaning to upload the code to my website for the longest
time.. but why prevaricate when you can put it off until
tomorrow! ;)
I'm working away this week and its on my home machine... fire me an
email offline and I'll send you the source code when I'm back home on
Monday.
FWiW: The other tools to which I alluded in a prior message,
AFaIK all avoid the deprecated /QDLS file system.
Regards, Chuck
QDLS is going away? When is this happening?
Chris
Deprecated as in dictionary definition. That is, /discouraged/
[for its use]. The effective function is available in /root without
having to use /QDLS which has naming limitation, user directory
entry requirements, lack of thread-safety, and poor performance.
Regards, Chuck
--
Margaret Fenlon
Integrated File System and Servers - IBM i
mfe...@us.eye-bee-m.com (spam trick)
(opinions stated are not necessarily those of my employer)
"Hal" <hal...@gmail.com> wrote in message
news:a9666fdc-aa6d-4637...@q33g2000pra.googlegroups.com...