IBMi Integrated File System
I’ve been playing with the IBMi Integrated File System over recent weeks. The IFS allows us to use and share data with Windows/Linux clients. It basically shares native IBMi (AS400) data with the windows world so that it looks just like a normal windows network drive.
You may read about AS/400 IFS and QDLS. It can be confusing for people. The QDLS folders were orig created for OfficeVision, a discontinued product, but can (and have been) used for other purposes. These folders are DOS-compatable and therefore use DOS style name (8.3 format). Directories (as sometimes called folders) not under QDLS are Unix compatable - long filenames and case-sensitive.
That sounds complicated but to make it very simple
IFS - Windows File Sharing of data from IBMi. Long Windows File names. Links to data might look something like this \\systemname \home \stuff \Big_Report_of_stuff.pdf
QDLS - Dos based File sharing. Short xxxxxxxx.yyy file names. Links to data might look something like this \\systemname \qdls \nickstuf \bigreprt.pdf
I know which one I prefer to play with... DLS is a bit smelly.
IBMi has some useful commands to simplify the data interchanges between different file systems:
- CPYFRMIMPF to copy data from IFS to the IBMi database system
- CPYTOIMPF to copy data from the IBMi database system to IFS
- CPYFRMSTMF to copy stream files into IBMi database files
- CPYTPSTMF to copy IBMi database files to stream files
- CPYTOPCD to copy IBMi database files to PC documents, stored in the QDLS folders
- CPYFRMPCD to copy PC documents in the QDLS folders into IBMi database files
The CPYTOPCD and CPYFRMPCD commands are only used when copying data to and from the QDLS system. They are a layer inbetween the modern windows structure and the old DOS (IBM Officevision derived) layouts. Newer IFS commands have many more options and are more flexible. They look similar, but there are important differences as follows:
CPYFRMSTMF converts text files (stream files that are in text format) to physical files. It has no concept of fields, so it can only write records to program described files (i.e. files that have no fields defined) or source pfs.
CPYFRMIMPF converts text files as well, but it tries to interpret fields in the input file and copy them to the appropriate fields in the output file. You can either import delimited fields (for example, comma separated value (CSV) files, tab-delimited files, pipe delimited files, etc) or you can read input from fixed-position fields (you have to define the record layout in a "field definition file")
I've been refactoring the old PROJEX400 DSTDTA and DSTSPLF commands during my evenings of re-imagination while sitting in a hotel room recently. They are getting pretty slick and use all the IFS functions to allow IBMi users to select any spool file or data file and send them via IFS, DLS or Email in PDF, XML, CSV, TXT formats.
One command to rule them all... and a very simple way for programmers to deliver really quick results in a common and modern layout.
Watch this space...








Add new comment