Please run the job in the debugger step by step to find out where it does not work. My guess you are passing incorrect value for p_full_filename, as a result the FTPDir statement returns an empty list. The p_full_filename should contain file name relative to your ftp user directory like you use for ftp_file_name variable. You can also enable the trace option and run the job as is then analyze the script.log file. PS. I have replaced user name and password with dummy values just in case... to prevent non-authorized people from connecting to your sever. : I have created a script that can be called and passed 2 parameters - the : p_agency_name and the p_full_filename : // ftp the agency files to : Leeds_primary : Dim short_file_name, string : Dim ftp_file_name, string : Dim no_more, boolean : Dim local_file_name, string : Dim file_list, string : // : FTPDir "10.10.1.7", "user", "password", : p_full_filename, file_list : isEqual file_list, "", no_more : LoopUntil no_more, END_LOOP : GetToken ",", file_list, short_file_name : Concat, "/pfu/pfv6/export/dialler/", short_file_name, ftp_file_name : ConcatEx, "\\\\leeds_primary\\secure\\Agency Control\\Dialler File : Processing\\Third Party Outgoing\\", p_agency_name, "\\", : short_file_name, local_file_name : FTPGetFile "10.10.1.7", "tenhill", "Armani", : ftp_file_name, local_file_name; : // to delete the file after sucessful downloading uncomment the following : line : // FTPDeleteFile "10.10.1.7", "tenhill", : "Armani", ftp_file_name : isEqual file_list, "", no_more : END_LOOP: exit : Problem is it does not FTP the file - there are no errors when I run it and : the file exists on the remote server but it does not get FTP'd. : When I look at the local_file_name variable it looks OK, I can't understand : why it doesn't get sent. : I am calling the script with : ftp_agency_file(agency_name, : "/pfu/pfv6/export/dialler/4A*.txt") : where the script name is ftp_agency_file
|