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



To add, use the FTP subcommand APPEND versus PUT.

The transport is data only. The "definition" of the table is not replaced with PUT; as implied by the DSPFFD in the included script. For a target of database file, a member is created or cleared, and only the data transported. A better name for FTP would be DTP [Data] or RTP [Record; where EOL\EOR delimiters signify a record versus a concept of fixed-length], but its origin is from systems where "everything is a file" so it got the less descriptive name.

Interestingly, the given scenario of duplicate key used to have the defect side-effect of deleting the existing file [or member; I do not recall... obviously for a SQL TABLE the RMVM would also fail]. In that defect, the FTP server did not properly track that it had not created the file.member as target, and mistakenly deleted [the member or the file] in response to the duplicate key error.

Regards, Chuck

rob@xxxxxxxxx wrote:

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

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.