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

RE: Using FTPAPI passing input Lib/Filename



Sender: "Sean Porterfield" <sporter@xxxxxxxxxxxx>

> I have a need to send saved journal receivers to a FTP server as a
> backup for recovery. Does anyone know if the FTPAPI programs support
> the passing of Library/Filename as input parameters?  Each file I
> will pass will have a unique name.

Absolutely!  We run this 6 times every day; works great.  Keep in mind, you
use the API in your own program.  You can start with Scott's example program
TESTPUT as a framework.

To get the file, I added:

C     *ENTRY        PLIST
C                   PARM                    LIB              10
C                   PARM                    FILE             10


Then before you do the PUT, just build your filename into a variable.  For
example:

C                   eval      file = '/QSYS.LIB/' + %TRIM(LIB) + '.LIB' +
C                             %TRIM(FILE)

(I've altered my code slightly for this example, so you should test for your
circumstances before using this.)

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------