[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
-----------------------------------------------------------------------