Midrange News for the IBM i Community


Posted by: Chris Proctor
Programmer Analyst
Columbia Sports Company
Portland, OR
Contents of an IFS folder into a database file???
has no ratings.
Published: 03 Jan 2012
Revised: 23 Jan 2013 - 4110 days ago
Last viewed on: 23 Apr 2024 (6527 views) 

Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.

Contents of an IFS folder into a database file??? Published by: Chris Proctor on 03 Jan 2012 view comments(2)

Happy New Year, everyone! A co-worker of mine asked me if I new of a way to extract the file names within an IFS folder to a database file. Off the top of my head I couldn't think of anything except the old dump contents to a printout, copy the printout to a flat file, parse out the data, etc, etc....

I hoping someone here may have found a slick way to handle this. I'm sure he'd appreciate any input!!

 

Thanks! Chris

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: Ringer
Premium member *
Comment on: Contents of an IFS folder into a database file???
Posted: 12 years 3 months 22 days 1 hours 29 minutes ago

RTVDIRINF ? Or there are API's you can call from RPG to open a directory and read the list of files. I can post those if you need them.

Chris R

Posted by: Viking
Premium member *
CA
Comment on: Contents of an IFS folder into a database file???
Posted: 12 years 3 months 19 days 12 hours 12 minutes ago
Edited: Fri, 06 Jan, 2012 at 20:18:41 (4493 days ago)

We use a UDTF called IFSDIR and it works great!  Once you get the function created you can use it right from your programs to populate a PF with a list of files that exist in an IFS folder.  For example, I have one RPG program that displays a subfile list of certain jpg images found in a specific folder.  We've found IFSDIR to be very useful and easy to use.

 

It's described here:

http://www2.systeminetwork.com/artarchive/index.cfm?fuseaction=viewarticle&CO_ContentID=17851

(for some reason, the page can sometimes take a while to come up)