Page 1 of 1

file list to IBM i

Posted: Wed Oct 02, 2013 7:44 am
by monahanks
If I have a project that downloads a select group of files from an SFTP server and create a file list (Destination Files Variable list), can I pass that list of names to the IBM i, possibly to a data area or something?
Here is the relevant XML code following the SFTP:
<get label="Get Data files, Put to IFS" destinationDir="resource:smb://${IFSPath}" destinationFilesVariable="ATSFiles">
<fileset dir="/Default/DEV/SN/SFSEXPORTS">
<wildcardFilter>
<include pattern="*InvImpATS*.txt" caseSensitive="false" />
</wildcardFilter>
</fileset>
</get>
</sftp>


<print label="print file list" version="1.0">
<![CDATA[variable ATSFiles
print
${ATSFiles}
print]]>
</print>

Re: file list to IBM i

Posted: Wed Oct 02, 2013 8:22 am
by Support_Rick
The best option would be to create a Table on the IBMi and insert the File List into that Table. That would make the items of the FileList available to you by row or SQL Selection.

Don't forget, you can also push the additional file attributes along with it when inserting them into your table.

You could also use a DTAARA for passing that data, but in this instance, I think the Table would be a better solution.

Re: file list to IBM i

Posted: Wed Oct 02, 2013 8:44 am
by monahanks
Thanks Rick. Where can I find an example of writing to a table? Also, how do I include attributes (notably last modified date)? I did write the list to a .txt file in the workspace and copy that text to the IFS, but using a table with the date attribute would be easier to manipulate in a CLLE.

Re: file list to IBM i

Posted: Wed Oct 02, 2013 9:04 am
by Support_Rick
Check out the link below here on the Forum ...

http://www.goanywheremft.com/forum/post ... 369dc#p666