IFS Path and Stream file concept in IBM i

This article discusses the IFS Path and Stream file concept in IBM i.
IFS Path and Stream file concept in IBM i, Current Directory, Home Directory, ifs, ifs directory, ifs directories, directory, directories, Absolute IFS path, Relative IFS path, DSPCURDIR command, Current Working Directory, Stream file,ibmi,as400,iseries,systemi, working with ifs,as400 and sql tricks, as400 tutorial, ibmi tutorial
IFS Path and Stream file concept in IBM i

What is the IFS path?

IFS path tells the system how to access an object. Individual directories and the object name are separated by a slash (/) character. For example:

 /home/EASYCLASS/helloworld 

Here, we use CL command WRKLNK to access any object on the IFS.

Two ways of locating the IFS path

  • Absolute IFS path
  • Relative IFS path
  • Absolute IFS path

    An absolute pathname begins at the highest level, or “root” directory (which is identified by the / character). It specifies each and every directory or its subdirectory to locate an object.

    Relative IFS path

    If the pathname does not begin with the / character, the system assumes that the path begins at your current directory. This type of pathname is called a relative pathname.

    DSPCURDIR command

    The Display Current Directory (DSPCURDIR) command is used to display the name of the current working directory.

                           Display Current Working Directory                    
                                                                                
     Directory  . . . . . . :   /home/EASYCLASS                                 
                                                                                
    

    Here, my Current Working Directory named /home/EASYCLASS.

    What is a Stream file?

    A stream file is a randomly accessible sequence of bytes, with no further structure imposed by the system. Documents that are stored in your system's folders are stream files.

                                                  
        FLR         Folder                        
        JOBD        Job description               
        JOBQ        Job queue                     
        LIB         Library                       
        LIND        Line description              
        MSGQ        Message queue                 
        OUTQ        Output queue                  
        PGM         Program                       
        SBSD        Subsystem description         
        STMF        Stream file                   
        SYMLNK      Symbolic link                 
        USRPRF      User profile                  
    

    EDTF command to create stream file

                                    Edit File (EDTF)                               
                                                                                   
     Type choices, press Enter.                                                    
                                                                                   
     Stream file, or  . . . . . . . . STMF           /home/easyclass/testfile1     
                                                                                   
     Data base file . . . . . . . . . FILE                                         
       Library  . . . . . . . . . . .                  *LIBL                       
                                                                                   
                                                                                   
                                                                                                                             
    

    Here, Use Edit File (EDTF) to edit a file 'testfile1'.

    Post a Comment

    © AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain