I’m using a combination of IFSEBOOK and FTPAPI to create a text file in the IFS and FTP it to a PC file server. My situation is this:
My IFS text file is getting created OK, and I have figured out how to create it so it is either CCSID 37 or 819.
However, when I use the iSeries FTP command, it transfers OK to the PC server, but when I use the FTPAPI service programs, it does not. Attached are the two resulting files. I have attempted to use the FTP_codepg AND the FTP_codePage procedures but they don’t help – at least not the way I’m trying them obviously.
RPG code is as follows: ===================================================================== * Setup iSeries IFS directory where the file is c eval OurDir = ‘/bss/username’ * Connect to FTP server. c eval sess = ftp_conn('192.168.173.75': c 'anonymous': c '') * On connection error, display an error message and exit. c if sess < 0 c eval Msg = 'ftp_errorMsg(0) c dsply Msg c else * * Switch iSeries ftp to NAMEFMT 1 mode c callp ftp_NamFmt(sess:1) * * Send the text file to the server c if ftp_put(sess:'bc110.txt': c %trimr(OurDir) + '/bc110.txt')<0 c eval Msg = 'ftp_errorMsg(sess) c dsply Msg c endif * * We're done c callp ftp_quit(sess) c endif ================================================================
The two resulting files (one via iSeries FTP, the other via the FTPAPIs) are attached. The result is the same whether the CCSID of the IFS text file is 37 or 819. Our system value QCCSID is 65535. The job default CCSID is 37.
Any help would be appreciated. (Also, if possible, would like “getting started” info on if you can FTP the text file directly without having to first write to the IFS.)
Thanks in advance.
Bruce Henke Systems Group Incorporated Itasca, IL 630-787-5440
--
|
O0110 f160 M0600 L PE SE 1X1100000100010B390590002002 1X1100000100110L002590 1X1100000100210L002590 1X1100002200160L002380 1X1100002200110L260002 401100200200030P/N 49110020040006025002500 4a520320040009525002500 401100200200125Quantity 4911002004001553 4a52032004001903 401100202250125Batch 491100202250155BATCH NBR 401100204500125Cure Date 4911002045001552Q05 991 401100202250170PR code 49110020225020099 401100203000170Vendor 49110020300020012345 401100204100170Purchase order 491100204100200123456 401100205300170Line 491100205300200123 401100200200220Control 49110020040025005654321 4a520320040028505654321 401100200200315Date received 49110020040034510/26/05 401100200200390MY COMPANY NAME - ANYTOWN, USA 40110020470039010/18/05 REFID E
Öðññð %?ñöð %Ôðöðð %Ó %×Å %âÅ %ñçññðððððñðððñðÂóùðõùðððòððò %ñçññðððððñððññðÓððòõùð %ñçññðððððñððòñðÓððòõùð %ñçññððððòòððñöðÓððòóøð %ñçññððððòòððññðÓòöðððò %ôðññððòððòðððóð×aÕ %ôùññððòððôðððöðòõððòõðð %ô?õòðóòððôðððùõòõððòõðð %ôðññððòððòððñòõؤ??£?£¨ %ôùññððòððôððñõõó %ô?õòðóòððôððñùðó %ôðññððòðòòõðñòõÂ?£?? %ôùññððòðòòõðñõõÂÁãÃÈ@ÕÂÙ %ôðññððòðôõððñòõä??@Ä?£? %ôùññððòðôõððñõõòØðõ@ùùñ %ôðññððòðòòõðñ÷ð×Ù@???? %ôùññððòðòòõðòððùù %ôðññððòðóðððñ÷ðå????? %ôùññððòðóðððòððñòóôõ %ôðññððòðôñððñ÷ðפ????¢?@????? %ôùññððòðôñððòððñòóôõö %ôðññððòðõóððñ÷ðÓ??? %ôùññððòðõóððòððñòó %ôðññððòððòððòòðÃ??£??? %ôùññððòððôððòõððõöõôóòñ %ô?õòðóòððôððòøõðõöõôóòñ %ôðññððòððòððóñõÄ?£?@?????¥?? %ôùññððòððôððóôõñðaòöaðõ %ôðññððòððòððóùðÔè@ÃÖÔ×ÁÕè@ÕÁÔÅ@`@ÁÕèãÖæÕk@äâÁ %ôðññððòðô÷ððóùðñðañøaðõ@ÙÅÆÉÄ %Å %