There are numerous syntax errors in your script that should prevent it from working correctly, some of them are: - extra semicolon in SyncFTPDir and other lines - local files (NT) should use single backslash as a path name separator and not double forward slash - extra spaces in file names ( for example see FileFindFirst - " c://interface//stage//C *.RL" You may want to run your script in the Debugger using Step mode in order to see how your variables get changed. : We are evaluating 24 x 7 for ftp-ing some files from unix to NT to a : mainframe. As the files are placed in a new folder, we are deleting them : in the first folder. However, there seems to be a memory cache that tries : to find the previous file when the scheduler runs the job again. It cannot : find the file and errors out. : The code is below: Thank you for your help. : Dim file_name, string, NULL : Dim found, boolean, NULL : Dim RL_file_name, string, NULL : Dim CMS_file_name, string, NULL : Dim Server_file_name, string, NULL : Dim Archive_file_name, string, NULL : // Start file search : // Watch for file on remote FTP site. : SyncFTPDir( "REMOTE", "unix", "login", : "pw", "cms/interface/out/", " : c://interface//stage//" ;, true, false, false, false ) : FileFindFirst( " c://interface//stage//C *.RL", file_name, found ) : LoopWhile( found, END_LOOP ) : concat("INTERFAC.", file_name, RL_file_name) : concat(" c://interface//stage//" ;, file_name, Server_file_name) : concat("cms/interface/out/", file_name, CMS_file_name) : concat(" c://interface//archive//" ;, file_name, Archive_file_name) : // FTPConfig( "SITE", "lrecl=700 blksize=4096 recfm=Vb" ) : FTPPutFile( "mainframe.us.chep.com", "login", : "pw", Server_file_name, RL_file_name) : FTPDeleteFile( "unix", "login", "pw", : CMS_file_name ) : FileCopy( Server_file_name, Archive_file_name) : FileDelete( Server_file_name ) : FIND_NEXT: // Find next file : FileFindNext( file_name, found ) : END_LOOP:
|