From AS400 DLS to IBM i IFS – Evolution of an Integrated File System 

 August 16, 2017

By  NickLitten

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

IFS | Windows Style

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 Style

AS400 DLS to IBM i IFS creates very modern outlook style emailDos 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… 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:

  • 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”)

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…


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

  • I try to find a function or method in sql to read the text table in the IFS to be use in the iSeries directly and I can’t, could you please have any idea ?

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
    __CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

    Get In Touch

    I’m always looking for awesome input, feedback and critique!