Problem solve Get help with specific problems with your technologies, process and projects.

Green-screen commands for an IFS toolkit

Keep these commands on hand in case Operations Navigator isn't available.

The increased amount of Web-based technology inside OS/400 has created a greater need for AS/400 operators to access and manipulate ASCII-based files and directories in the Integrated File System (IFS), where files for programs such as WebSphere and your AS/400 Web pages are frequently stored. Although IBM provides several tools for IFS manipulation inside its iSeries Operations Navigator program, sometimes it's just easier to perform IFS modification from within the green screen -- if you know the proper commands.

To that end, OS/400 contains a set of green-screen commands that perform basic IFS manipulation and authorization functions. These commands form the basis of a green-screen IFS toolkit, and they can help you make quick IFS changes through a 5250 emulation screen. You can use these commands if you don't want to take the time to open up OpsNav. These commands are also useful if you're working over a slow modem connection where OpsNav's graphical interface may run sluggishly, or if the PC you're using for AS/400 connectivity doesn't have OpsNav installed. Whatever the reason, the following OS/400 commands are valuable for quick IFS changes from the green screen.

1. Create Directory (CRTDIR) -- This command allows you to create directories inside any of the non-QSYS.LIB file systems in the IFS. CRTDIR syntax is simple in that you specify the IFS path name of the directory you wish to create. If you want to create a directory called '/S400' off the '/HOME' directory under the IFS root, you can specify an absolute path name by coding CRTDIR in the following way:

CRTDIR DIR('/home/s400')

In addition to creating the directory, there are other CRTDIR parameters that allow you to specify data and object authority for the new directory.

2. Remove Directory (RMVDIR) -- RMVDIR is the opposite of CRTDIR in that it deletes directories from the Integrated File System, rather than creating them. The syntax rules are the same as for the CRTDIR command, and if you wanted to delete the '/home/s400' directory you would enter RMVDIR in the following way:

RMVDIR DIR('/home/s400')

3. Edit File (EDTF) -- This command allows you to edit stream files in the IFS. (It can also be used to edit OS/400 database files.) Like CRTDIR and RMVDIR, you can specify the absolute or relative path names of the files you want to edit. For example, if you wanted to edit a file called 'index.htm' in the '/home/joe' directory, you would enter the EDTF command with an absolute path name, as follows:

EDTF  STMF('/home/joe/index.htm')

The beauty of EDTF is that it brings stream file data into an SEU-like screen so that you can edit and save the data. When you save your work, it writes the file to the target IFS location in the format used by that IFS file system (ASCII, when you are saving to the root directory).

4. IFS Authority commands -- There are also a group of commands that allow you to display, change and manage object authority for IFS objects. These commands include the following:

  • Display Authority (DSPAUT) -- Display a users' authority to an IFS object
  • Work with Authority (WRKAUT) -- Allows you to work with IFS object authority
  • Change Authority (CHGAUT) -- Allows you to add, remove or change authority for specific users on IFS objects
  • Change Owner (CHGOWN) -- Allows you to change the owner of a particular object
  • Change Primary Group (CHGPGP) -- Allows you to change the primary group of an IFS object to another user or to specify that there is no primary group for an object

So, the next time you need to work with objects in the IFS, be sure to check out these tools. They're handy commands to have in your toolbox.

About the author: Joe Hertvik is an IT consultant and freelance writer who specializes in middleware, network infrastructure, and iSeries issues. Joe can be reached at


Dig Deeper on Performance