Hi, for your info....this will also work with a pdf file....if your printer can recognize the pdf file printer stream. Try using remote file: local file: not local file: remote file if ftp_put(sess: to: from) < 0 This i how it looks like in the FTPAPI_H source mbr. D FTP_put PR 10I 0 D peSocket 10I 0 value D peRemote 256A const D peLocal 256A const options(*nopass) Best regards Magne ________________________________ Fra: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx på vegne av Mike Krebs Sendt: to 12.03.2009 14:13 Til: 'HTTPAPI and FTPAPI Projects' Emne: RE: Using FTPAPI to ftp to a printerfile Jack, I see where you are headed here. Cool idea. What are the relevant parameters on the print file? Simply userascii? CRTPRTF FILE(QGPL/FTPPRINT) DEVTYPE(*USERASCII) Mike Krebs > -----Original Message----- > From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi- > bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Lammerts, Jack > Sent: Thursday, March 12, 2009 4:26 AM > To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx > Subject: Using FTPAPI to ftp to a printerfile > > Hi Scott, > > > > Sorry, should have included the relevant code in the first place. > > > > This is the test code I use, shamelessly copied and adapted from one of > your > > supplied testprograms: > > > > * put the IFS PCL printerfile to a *USERASCII printerfile > > > > c eval from = '/tmp/test.pcl' > > c eval to = '/qsys.lib/qgpl.lib/ftpprint.file' > > > > c callp FTP_NamFmt(sess: 1) > > c callp ftp_binaryMode(sess: *on) > > > > c if ftp_put(sess: from: to) < 0 > > c eval Msg = ftp_errorMsg(sess) > > c dsply Msg > > c endif > > > > The error ocuurs at the ftp_put operation. > > > > Thnx in advance, Jack > > > > > > ----------------------------------------------------------------------- > - > ------------------- > > Hi Jack, > > > > Please tell us how to create the same error for ourselves. That will > help us to understand. > > > > > > Lammerts, Jack wrote: > > > > > > I;ve been using your excellent project FTPAPI for some time now, > and I > > > am liking it very much. Thanks! > > > > > > > > > Today I've come across a situation which I don't know how to > solve. > I > > > am trying to ftp a binary file from the IFS to a *USERASCII > > > printerfile on our iSeries box. Manually FTP'ing the file to the > > > printerfile works fine, but when I use FTPAPI I receive the error > > > message "Invalid file type for FTP transfer". Are printerfiles not > > > supported by your API, or am I doing something wrong? ----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------
<<winmail.dat>>
----------------------------------------------------------------------- This is the FTPAPI mailing list. To unsubscribe, please go to: http://www.scottklement.com/mailman/listinfo/ftpapi -----------------------------------------------------------------------