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 |