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



I've done FTP directly to/from and DB file.

The trick is to have only character or zoned numeric fields.

You could also do the FTP to a logical or view that redefines the
packed or integer fields as zoned.

Works great as long as you don't have to worry about negative values.

Charles

On Wed, Jan 21, 2009 at 4:07 PM, <rob@xxxxxxxxx> wrote:
Michael,

That was interesting. I would have thought that ftp would not have
replaced the rows in a table but would have replaced the table -
definition and all. Assume...

CREATE TABLE ROB/MS
(MYCHAR CHAR ( 5) NOT NULL WITH DEFAULT,
MYINT INT NOT NULL WITH DEFAULT,
PRIMARY KEY (MYCHAR))

INSERT INTO ROB/MS VALUES('a', 2)

C:\qtemp>copy con rob.txt
test^Z
1 file(s) copied.

C:\qtemp>ftp gdisys
Connected to GDISYS.dekko-1.
220-QTCP at GDISYS.dekko-1.
220 Connection will close if idle more than 5 minutes.
User (GDISYS.dekko-1:(none)): rob
331 Enter password.
Password:
230 ROB logged on.
ftp> put rob.txt rob/ms
200 PORT subcommand request successful.
150 Sending file to member MS in file MS in library ROB.
226 File transfer completed successfully.
ftp: 4 bytes sent in 0.00Seconds 4000.00Kbytes/sec.

dspffd rob/ms
Still had the two fields. And the row that I INSERTed with sql was gone
and replaced with 'text' from the ftp'd file. Granted, the value of myint
was 'interesting'.
select * from rob/ms
....+....1....+....2..
MYCHAR MYINT
test 1,077,952,576
******** End of data

Oh, and the duplicate key
ftp> put rob.txt rob/ms
200 PORT subcommand request successful.
150 Sending file to member MS in file MS in library ROB.
426-Unable to close file. Error code CPE3101.
426 Data transfer ended.
ftp: 16 bytes sent in 0.00Seconds 16000.00Kbytes/sec.
ftp>

WRKACTJOB JOB(QTFTP*)
Duplicate record key in member MS.
Duplicate key not allowed for member MS.
? C
Cancel reply received for message CPF5026.
2 records lost when member MS closed.


Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
Michael_Smith@xxxxxxxxxxxxxx
To:
midrange-l@xxxxxxxxxxxx
Date:
01/21/2009 03:50 PM
Subject:
Re: communicating with a Windows based system
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



I FTP to and from Mainframe, Windows and Novell file systems directly to
DB2 tables on the i nightly. I can't recall the message I get when they
FTP from the mainframe to a DB2 table and tried to add a record with a
duplicate key. It's a bit non descriptive if you don't think about what
the problem might be. Other than that, works great.

I send policy data, AP/GL and others.. no problem.


Michael Smith
E : Michael_Smith@xxxxxxxxxxxxxx







message: 1
date: Wed, 21 Jan 2009 13:32:43 -0500
from: rob@xxxxxxxxx
subject: Re: communicating with a Windows based system

Depends. We had a division (since sold) that had a SQL Server based
canned package for a mixing machine. We used JDBC from the i to access
the SQL Server.

I've also done the remote command to initiate a file transfer request on
PC's for that same division to pump data to the i.

I've never FTP directly to db2 or QSYS.LIB data from pc data. Always to
stream file data and then used something to map that stream file into DB2.

Rob Berendt

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

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.