file list to IBM i

Post any question you may have in regards to GoAnywhere Director and let our talented support staff and other users assist you.
4 posts Page 1 of 1

monahanks

Posts: 41
Joined: Wed Mar 30, 2011 10:19 am

Post by monahanks » Wed Oct 02, 2013 7:44 am
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>

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

Post by Support_Rick » Wed Oct 02, 2013 8:22 am
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.
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696

monahanks

Posts: 41
Joined: Wed Mar 30, 2011 10:19 am

Post by monahanks » Wed Oct 02, 2013 8:44 am
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.

Support_Rick

Support Specialist
Posts: 592
Joined: Tue Jul 17, 2012 2:12 pm
Location: Phoenix, AZ

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

http://www.goanywheremft.com/forum/post ... 369dc#p666
Rick Elliott
Lead Solutions Consultant
(402) 944.4242
(800) 949-4696
4 posts Page 1 of 1