FTP PUT command adding an extra (carriage return?) character

100 pts.
Tags:
AS/400
FTP
IBM iSeries
Physical File
I have a physical file on the iSeries which I am sending to a Windows server. When the file gets to the server, an extra line has been added with what is (I think) an end of file or carriage return character. The software that is processing the file on the server doesn't handle this character well. Please advise on how to send the file to the server without the extra data. I am using this FTP command:

OVRDBF     FILE(INPUT) TOFILE(Lib/Sourcefile) MBR(FTPCMD) 

OVRDBF     FILE(OUTPUT) TOFILE(Lib/Sourcefile) MBR(FTPLOG)

FTP        RMTSYS(ServerName) 

The FTPCMD member looks like this:

login                                   OPEN ServerName                            user xxxx....                    put qtemp/sfbol.sfbol     sfbol.bol     quit

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Wlakesearcher
    Perhaps I should add that this file contains only 1 field that is 1761 characters long. The software on the Windows server receives the file and prints uses it to print a form.
    100 pointsBadges:
    report
  • TomLiotta
    Simplest workaround is probably to run CPYTOSTMF to copy the database file into a streamfile first. Then FTP the streamfile. FTP isn't really designed for database files -- unless you are transferring between the same DBMS on both ends. E.g., between DB2 on two iSeries systems, the two systems can understand each other. But if you try to FTP a SQL Server database file to some other platform...? I don't recall seeing any good resolution for the trailing <CR/LF> delimiter on a database file from iSeries to Windows. Tom
    125,585 pointsBadges:
    report
  • Wlakesearcher
    Thank you, Tom. Do you think that the CPYTOSTMF will eliminate the <CR/LF> delimiter, or will that be added to the file no matter how I move it to the windows server?
    100 pointsBadges:
    report
  • Wlakesearcher
    Oh, I think I that you are saying streamfile to server will not have the delimiter, but database to server will always have the delimiter?
    100 pointsBadges:
    report
  • TomLiotta
    ...streamfile to server will not have the delimiter... It doesn't on tests that I've run. I won't be surprised to learn of it happening, but I would expect that it could be controlled where a database transfer apparently cannot be. (I try not to say it'll "never" happen. I'm regularly amazed by variations on different systems.) Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following