Over recent years, I’ve been playing with the IBM i Integrated File System a lot more than usual. The IFS allows us to use and easily share IBM i Data with Windows/Linux/Apple or just about any other computer on the network. It basically shares native IBM i (AS400) data with the windows world so that it looks just like a normal windows network drive. It’s a large part of every IBM i Developers future because (I bet you a $dollar) we will soon be using it to store our program source code.
You may read about IBM i IFS and also QDLS. It can be confusing for people, if you haven’t used IFS or DLS.
My simple explanation is think of DLS as the OLD DOS way of storing PC files and IFS as the new Windows (or Apple) way. Think old short file names like MYDOCUMENT.DOC versus the new naming standards like “Christmas Shopping List 2017.doc”
The DLS is a vintage, subset of the IFS.
The QDLS folders were orig created for OfficeVision, a discontinued product, but can (and have been) used for other purposes. These folders are DOS-compatible and therefore use DOS style name (8.3 format). Directories (as sometimes called folders) not under QDLS are Unix compatible – long filenames and case-sensitive.
That sounds complicated but to make it very simple
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
I know which one I prefer to play with… IFS! Because, the old DLS system is a bit smelly.
IBM i has some useful commands to simplify the data interchanges between different file systems:
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”)
So – Ditch DLS in favor of IFS. #please 🙂
Over recent years I’ve completely refactored all my old code to move away from DLS and to use IFS native commands instead. IFS access is faster and easier to read. That on it’s own should be a good argument to scrap the old DLS routines.
We can now use IFS *API’s to allow IBM i users to do all kinds f modern goodies – like “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…