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



Well, my 2 cents worth...

As a bunch of people have mentioned - any SQL client is going to want to
talk to a database server, and your text file is not in a relational
database.

I guess we all have our own skill-sets and tools which point us to the most
convenient direction for us at the time. I'd go one of two ways:

1) If I was concerned about transferring a lot of data I didn't want, I'd
either write a couple of lines of java code or a regular expression in
ultraedit or notepad++ to pull out the records I wanted and delimit just
the data I wanted and write/save it to the IFS. Then use CPYFRMIMPF to
insert into a DB2 table.

2) If I wasn't really concerned about data sizes, I'd just FTP the whole
thing up as a flat DB2 file ( single field ) and then use SQL to get the
data out of that file and into my proper DB2 table. I'd just use SUBSTR or
the new DB2 regular expressions to identify the data I wanted from the flat
file.

regards,
Craig

On 30 August 2016 at 21:22, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx> wrote:

Dave

I would check that about DDS-defined - if the PF exists, FTP will fill it
byte-by-byte - this works fine if you have only alpha and zoned fields.
Packed and integer and float will be a mess. Signs and decimal points and
thousands separators will also mess you up. Maybe in a fixed-length setup
that is less of an issue, but no guarantee there.

Cheers
Vern

If the PF does NOT exist, it is created as a flat file.

On 8/30/2016 2:54 PM, dlclark@xxxxxxxxxxxxxxxx wrote:

"WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx> wrote on 08/30/2016 02:10:08 PM:

If it's fixed width column layout why not just create the file on
the system & simply FTP the txt file directly into it?

Presuming you mean a "flat" file with a single field the width of
the text file's record length, you could certainly do that. But, if you
mean a DDS- or SQL-defined, multi-field or multi-column file, then FTP
will not break up fixed-column layout text files into the separate
fields/columns defined on the IBM i.

Sincerely,

Dave Clark


--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.


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.