Guild Companies, Inc.  
Midrange Guru - Tech Tips
OS/400 Edition
Volume 2, Number 35 - May 8, 2002

EDTF Sizes Up OS/400 IFS Directories

Hey, Joe:

Do you know of any way I can tell how large an OS/400 Integrated File System (IFS) directory is and how many subdirectories and files it contains? I need this information to help plan a backup project.

-- Bob

There are two ways I know of to retrieve OS/400 IFS directory sizes: a green-screen technique that uses the Edit File (EDTF) command, and a command-line technique using Operations Navigator (OpsNav). Here are the ins and outs of both of them.

Under the green-screen technique, you use the Path Size option in the EDTF command. With Path Size, OS/400 will return the size of the designated OS/400 IFS directory--including directories off the root ('/') of the OS/400 IFS, as well as QOpenSys directories--and the number of sub-directories and files that the target directory contains. Of course, there are a few turns in the road here, so let's run through this one by the numbers.

The first trick is to put your AS/400 or iSeries Telnet session into 132-character mode rather than its normal 80-character mode. To do this in the Client Access PC5250 emulator, see "Ad min Alert: Switching Between 80- and 132-Character Mode in PC5250" in our system publication, T he Four Hundred. The 132-character mode is necessary for this process because the number of subdirectories and the number of files a directory contains will be listed in the final column of the EDTF screen, which is displayed well past the 80th character on the screen.

Once your PC is set to display 132-character output as necessary, start the Edit File command for the root of the OS/400 IFS by typing in the following command:


This displays the entries in the root directory of the OS/400 IFS. These entries include directories off the OS/400 IFS root ('/'), QOpenSys directories, entries for other OS/400 IFS file systems, and any files that reside in the root. The OS/400 IFS entries that you can edit or display with EDTF are marked with an input line in front of the entry. The entries that can't be manipulated with EDTF (such as the QSYS.LIB and QDLS file systems) will have no input line listed next to their OS/400 IFS object.

To get the size of an OS/400 IFS directory, tab down to the directory that you want to size. If you need to size a subdirectory, you can open that directory by tabbing down to its parent directory and entering option 5 (Display). Option 5 displays another screen showing the contents of the sub-directory and you can use this option to keep exploring downward in a directory tree until you find the entry that you're looking for.

Once you've found your target directory to size, enter option 6 (Path size) in front of the directory and OS/400 will calculate the size of the files and sub-directories contained within the OS/400 IFS directory. It will also tell you how many sub-directories can be found under this parent directory. The size of the directory contents will be included in the third column (Size) of the screen while the number of sub-directories and files will be shown in the last column (which is labeled Symbolic Links). In my testing, I found that this option works fairly well for both OS/400 V4R5 and V5R1 machines.

However, a few caveats are in order as you work with EDTF to determine the size of your individual directories.

First, the larger the directory, the longer it will take to determine its size. I found that in relatively small directories, EDTF returns the directory size rather quickly. However, with large OS/400 IFS directories, it may take several minutes for EDTF to return sizing detail. And if you're trying to size extremely large directories (such as the root of a well-used QOpenSys file system), it may take a very long time to return its' size, depending on how many files and sub-directories there are.

Second, be careful when you use the EDTF screen for directory sizing, because there are two other EDTF options that are used to delete data: Delete file (option 4) and Recursive delete (option 9). Remember that the first job of EDTF is to manage stream file data in the OS/400 IFS and that path sizing is something of a sideline. In the wrong or careless hands, someone could easily delete files and directories when all they are trying to do is determine size.

If you're not a green-screen fan, you can also graphically retrieve OS/400 IFS directory sizes through the OpsNav program that comes with Client Access Express for Windows V5R1. Using OpsNav, open the File Systems-Integrated File System node, and follow the OS/400 IFS tree down until you find the directory that you want to size. Right-click on that directory and select the Properties option from the pop-up menu that appears. On the Properties panel, the directory size will be listed in the Total data size field under the panel's General tab. To see the number of folders (directories) and files the directory contains, click on the Storage tab of the Properties panel, and that information will also be displayed. Like EDTF's Path Size option, OpsNav calculates these sizes on the fly, so you may have to wait when it calculates the size of an extremely large directory. And--also like EDTF--it's very simple to inadvertently delete files or directories with OpsNav, so be very careful with the user profile authorities of any user that accesses this function.

Both of these features are fairly simple to use in determining the size and contents of an OS/400 IFS directory. Be sure to give one of them a try, but be careful of their shortcomings.

-- Joe Hertvik

Sponsored By

SEQUEL meets all your iSeries and AS/400 data access needs in a single, integrated solution:

  • Windows, Web or host user interfaces
  • Convert AS/400 data into PC file formats
  • E-mail or FTP query results, reports and spool files
  • Run-time prompted queries and reports for end users
  • IF-THEN-ELSE logic in queries and reports
  • Report, form and label formatting second to none
  • Easily convert date fields, character-to-numeric, numeric-to-character and other data manipulation
  • SORT or JOIN using a calculated field
  • Quick summarization of data with Tabling function
  • Run multiple SEQUEL requests as one with the SEQUEL Scripting function
  • OLAP Business Intelligence at a fraction of the cost of comparable solutions

Take 6 minutes to view a SEQUEL ViewPoint ScreenCam movie to see how simple Windows-based AS/400 and iSeries data access can be! In just a few short minutes, you can find out ways to make your job easier and improve data access throughout your organization. Download the ViewPoint movie here.

For more information or a FREE trial of SEQUEL, call 847/605-1311 or visit Advanced Systems Concepts .

Advanced Systems Concepts (ASC)
Aldon Computer Group
EDTF Sizes Up OS/400 IFS Directories
Convert OV/400 Documents to MS Word for Free
Reader Feedback and Insights: Another Way to Check the Call Stack
  Newsletters | Subscribe | Advertise | About Us | Contact | Search | Home  
  Last Updated: 5/8/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.