Is it possible to FTP files from an iSeries using comma delimited to a PC server?

6925 pts.
Tags:
AS/400 FTP
Comma-delimited
iSeries import/export
Is it possible to FTP files from an iSeries using comma delimited to a PC server? Thanks. Moderator Note: This is a submitted question

Answer Wiki

Thanks. We'll let you know when a new response is added.

Yes.

Below is a one example of how to accomplish this since I assume that is ultimately what you are asking for.

pgm

CPYTOIMPF FROMFILE(mylib/myfile) +
TOSTMF(‘/ifsfolder/file.csv’) +
MBROPT(*REPLACE) STMFCODPAG(*PCASCII) +
RCDDLM(*CRLF) STRDLM(*NONE) FLDDLM(‘,’)

OVRDBF FILE(INPUT) TOFILE(my_ftp_script)

OVRDBF FILE(OUTPUT) TOFILE(my_ftp_log_file)

FTP RMTSYS(’11.11.111.111′)

endpgm

FTP SCRIPT

ANONYMOUS FTP
NAM 1
LCD /iSeries_lib
CD PC_folder
PUT file.csv
QUIT

If you don’t want to use CPYTOIMPF, you can go to http://www.scottklement.com/rpg/ifs.html and view Scott’s tutorial on reading and writing files directly to the IFS.

Discuss This Question:  

 
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

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