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

AW: Error from "FTP_Conn" API



Sender: "Werner Noll, GEFIS" <werner.noll@xxxxxxxxx>

Scott,

many thanks. You always hit the nail's head.

Kind regards,

Werner Noll
Gesellschaft für Individual-Software mbH
Ludwigstrasse 9
D-63739 Aschaffenburg
Phone: +49-6021-299880
Fax: +49-6021-299882
e-mail: Werner.Noll@xxxxxxxxx
-----Ursprüngliche Nachricht-----
Von: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] Im
Auftrag von Scott Klement
Gesendet: Dienstag, 2. Mai 2006 18:49
An: ftpapi@xxxxxxxxxxxxx
Betreff: Re: Error from "FTP_Conn" API


FTPAPI only allows you to have 15 sessions running at once (unless you've 
modified the code to allow more!).  You'll get this error whenever you 
try to open more sessions than that.

Make sure you remember to call FTP_quit() when you're done with each FTP 
session so that the session handle is available to be re-used the next 
time you call FTP_conn() or FTP_open()

---
Scott Klement  http://www.scottklement.com

On Tue, 2 May 2006, Werner Noll, GEFIS wrote:

> Hi All,
>
>
>
> we use Scott Klement?s great APIs for FTP communications.
>
> Now there rised a curious problem:
>
> We use the APIs in a ILE-RPG-Programm which is called by an application
> program. When the application program is called interactively, the FTP
runs
> correct. If the same program is executed as a batch job, the FTP_Conn API
> ends with error ?Can not create new session handle?.
>
>
>
> The code looks like:
>
>
>
> // Main Application Program:
>
>
>
> // Send IFS file to FTP server
>
> PUTSTMFFTP(#RmtSys:#RmtUsr:#RmtPwd:#LocPath:#RmtPath:r$RC);
>
> If r$RC = *off;
>
> Etc.
>
> EndIf;
>
>
>
> //Sub-Program PUTSTMFFTP:
>
>
>
> fd = FTP_Conn(#FTPServer:#FTPUser:#FTPPwd:FTP_PORT:120);
>
> If fd < *zeros;
>
>   r$FTPErrMsg = FTP_Error();
>
>   #FTP0001_01 = r$FTPErrMsg;    <--------  ?Can not create new session
> handle?
>
>   #FTP0001_02 = #FTPServer;
>
>   #FTP0001_03 = #FTPUser;
>
>   #FTP0001_04 = %char(FTP_PORT);
>
>
>
> Etc.
>
>
>
> Tips and suggestions of any kind are welcome.
>
>
>
> Kind regards,
>
>
>
> Werner Noll
> Gesellschaft für Individual-Software mbH
> Ludwigstrasse 9
> D-63739 Aschaffenburg
> Phone: +49-6021-299880
> Fax: +49-6021-299882
> e-mail: Werner.Noll@xxxxxxxxx
>
>
>
>


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