Page 1 of 1

FTP Task

Posted: Tue Dec 16, 2014 1:46 am
by Shoma_Costco
My below FTP task is not recognising the file name generated with variable from database file. It says no such file or directory. Please advise

Code: Select all
<project name="SEND_MBR_EXTRACT" mainModule="Main" version="1.0" logLevel="verbose">
	<description>Upload International PO Details to GW SFTP Server</description>

	<module name="Main">

		<sql label="Get Files" resourceId="Test DB" autoCommit="true" user="auissa" password="********" version="1.0">
			<query label="Read DB" outputVariable="Fileset">
				<statement>Select XFFLNM from MBTSTDTA.MBEXEFP</statement>
			</query>
		</sql>

		<forEachLoop label="For Each File" itemsVariable="${Fileset}" currentItemVariable="Row">

			<ftp label="Send File by FTP" resourceId="Media Merchant" version="1.0">
				<put label="Put File" sourceFile="/MEM/${Row[1]}" destinationDir="/Renewal EDMs" />
			</ftp>

		</forEachLoop>
	</module>

</project>

Re: FTP Task

Posted: Thu Dec 18, 2014 8:46 am
by Support_Rick
Shoma,

First .. when sending these to support, it truly helps if you send the full log file associated to your issue hopefully with DEBUG mode set for job logging. (Defined under the Project Level in the Control Tab)

Second .. I took a copy of this project, and created a table on my iSeries that matches the same you have here. Having it read the table and loop through the file names retrieved, it prints the Source FileName correctly, thus finding it for whatever task is necessary (as in FTP, etc).

Please send us your JobLog (in debug mode) so that we can get a further definition of what the issue is and we will reivew.

Thanks!