IFS - skill-at/AS-400-Training GitHub Wiki
The Integrated File System (IFS)
Integrated file system provides the support that allows applications to access specific segments of storage that are organized as logical units. These logical units are files, directories, libraries, and objects.
There are seven file systems in the integrated file system: root (/) , Open Systems (QOpenSys) , Library (QSYS.LIB), Document Library Services (QDLS), LAN Server/400 (QLANSrv), Optical Support (QOPT) , File Server (QFileSvr.400)
Users and application programs can interact with any of the file systems through a common integrated file system (IFS) interface. This interface is optimized for input/output of stream data, in contrast to the record input/output that is provided through the interfaces.
Below commands are used for copy between stream file from IFS location and data base file.
CPYFRMIMPF
The Copy From Import File (CPYFRMIMPF) command copies all or part of an import file to the TOFILE. The term import file is used to describe a file created for purposes of copying data between heterogeneous databases.
Example : - CPYFRMIMPF FROMSTMF('/home/praf1212/inbound_orders/ FILETEST.CSV') TOFILE( IFSTEST) RCDDLM(*ALL) STRDLM(*NONE)
CPYTOIMPF
CPYFRMIMPF FROMSTMF('/home/praf1212/inbound_orders/ FILETEST.CSV') TOFILE( IFSTEST) RCDDLM(*ALL) STRDLM(*NONE)
Example : - CPYTOIMPF FROMFILE(IFSTEST) TOSTMF('/home/praf1212/inbound_orders/FILETES T.CSV') RCDDLM(*LF) STRDLM(*NONE)
Library file system (QSYS.LIB)
The QSYS.LIB file system supports the IBM i library structure.
This file system provides you with access to database files and all of the other IBM i object types that the library support manages on the system and in the basic user auxiliary storage pools (ASPs).
Format is '/qsys.lib/destination library .lib/file.file/Member.MBR'
Example : - wrklnk '/qsys.lib/PRAF12121.LIB/ACNBPF1.FILE'