Is it possible to FTP files from an iSeries using comma delimited to a PC server?
6535 pts.
0
Q:
Is it possible to FTP files from an iSeries using comma delimited to a PC server?
Is it possible to FTP files from an iSeries using comma delimited to a PC server? Thanks.

Moderator Note: This is a submitted question
ASKED: Jun 15 2009  6:24 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
3165 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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.
Last Answered: Jun 15 2009  9:08 PM GMT by Teandy   3165 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0