One of the problems with i5 articles (including my own) is that the writers focus on accomplishing i5/OS tasks with 5250 green-screen commands. However, many newer administrators are more comfortable with graphical utilities, and learning command line techniques is not that desirable. To help those users, here is a primer on using IBM's iSeries Navigator program to perform basic i5 file and library manipulation from a graphical interface.

As you probably know, iSeries Navigator (OpsNav) is IBM's graphical solution for managing i5, iSeries, and AS/400 machines. Packaged as part of its iSeries Access for Windows product, system operation tasks are accessed by navigating through OpsNav's tree structure and opening different nodes to perform different functions.

Like a Windows file share, you can navigate through an i5 partition's data directories by opening the File Systems --> Integrated File System node in your OpsNav tree. This node displays the many different file systems that are contained in the AS/400 Integrated File System (IFS). Starting at the Root directory (/) of the IFS, you can navigate to any of seven different file systems that are housed under an i5 partition (for an excellent primer on the IFS, see The Integrated File System for Intelligent People).

For this article, I'll concentrate on how to manipulate native i5/OS objects residing within the QSYS.LIB file system, because QSYS.LIB is the underlying file system for traditional i5/OS and OS/400 systems. To keep things simple, I'll focus on how you can use OpsNav to perform two different functions on QSYS.LIB and Root (/) files:

Creating and deleting user libraries in QSYS.LIB and under the Root (/) directory.

In coming articles, I'll review other QSYS.LIB functions that you can perform with OpsNav.

Creating, Deleting, and Renaming User Libraries in QSYS.LIB

In OpsNav, native i5/OS libraries are represented as folders under the QSYS.LIB subsystem. For the uninitiated, an i5/OS library is somewhat equivalent to a Windows directory folder, where objects relating to a particular application or database are stored together.

To work with objects in QSYS.LIB libraries, open up an OpsNav session and expand the File Systems --> Integrated File System --> QSYS.LIB node for your target i5 partition. Each folder displayed under this node represents a QSYS.LIB library and the folder and object names are displayed in standard AS/400 IFS notation where the object name is followed by an extension denoting what type of object it is. For QSYS.LIB folders (libraries), each folder name is followed by the literal '.LIB' to designate that it is a library object. Under this scheme, the QGPL library would be called 'QGPL.LIB', the QUSRSYS library would be called 'QUSRSYS.LIB', and all user library names would also be named with a '.LIB' extension.

It's easy to create a new library under an OpsNav partition. If you are signed on to OpsNav as a user with proper administrative authority, you can create a new library by performing the following steps.

Right-click on the QSYS.LIB node in the OpsNav partition where you want to add the library.

Select the New folder option from the pop-up menu that appears.

Type in the name of the new library that you want to create in the New Folder input box that shows up. The library name should be followed by the '.LIB' literal. If I wanted to create a new library called JOE, for example, I would type in 'JOE.LIB' in this box. Generally, you should stay away from creating libraries whose name starts with the letter 'Q', as 'Q' libraries are considered system libraries on an i5 machine.

User access authority (permissions) for the new library will be equal to the standard default authority for new library objects, as it is defined in the green-screen Change Library command (CHGLIB) on your system. For an explanation on how these authorities are derived, see the previous Admin Alert article that I wrote called Limiting *PUBLIC Access to i5/OS Objects. If you want to set additional permissions for this library, right-click on the new library node and select Permissions from the pop-up menu that appears.

Unlike creating new folders in a Windows file share, you will not be able to create sub-folders (a folder under another folder) in the QSYS.LIB file system. All libraries are stored as single-level objects under the QSYS.LIB file system.

In addition to creating new folders in QSYS.LIB, you can also delete and rename these folders, if you have the proper authority. To delete a folder and all the objects it contains, right-click on the folder and select Delete from the pop-up menu that appears. Once you confirm that you want to delete this folder, the folder and all its objects will be deleted from the system. Be careful with this function, however, because unlike a Windows system, there is no recycling bin that you can retrieve deleted objects from if you make a mistake. You cannot easily restore a deleted object to the system without performing a Restore command from backup media. You should also be careful renaming or deleting 'Q' folders under QSYS.LIB because these folders are system libraries that i5/OS uses to run the partition.

To rename a folder, you would once again right-click on the folder and select Rename from the pop-up menu. Put in a new library name (complete with the '.LIB' literal) and the library will be renamed to its new name and all the objects in that library will have their pointers changed to designate that they now belong to the new library name.

Copying, Pasting, Renaming, and Deleting i5/OS Objects

OpsNav also gives you the capability to move, rename, and delete i5/OS objects inside the QSYS.LIB folders (libraries). To work with individual objects instead of entire folders, double-click the folder representing the library you want to work with under QSYS.LIB. A list of individual objects from that library will appear in the right-hand side of the OpsNav pane. As with folder objects, each object inside a folder will also be labeled with an extension designating what type of object it is. Files are labeled with a '.FILE' designation, programs will be marked as '.PGM', data areas are called '.DTAARA', etc.

As you did with the folder objects, you can also Copy and Paste, Rename, and Delete individual i5/OS objects within a library folder. To perform any of these options for individual objects, do the following within your OpsNav tree.

Double-click on the QSYS.LIB folder containing the objects that you want to work with. A list of all the objects contained within that folder will appear in the right-hand pane of the OpsNav screen.

Right-click on the object that you want to manage. A pop-up menu of actions you can perform on this option will appear (You can also select common object operations by highlighting the object and then clicking on File or Edit from the OpsNav menu bar). The three most common options that you may want to use on library objects are Delete, Rename, and Copy. Here are some of the ins and outs of using each option.

Deleting an Object

Besides selecting the Delete option from the pop-up menu or the menu bar as described in step 2, you can also delete an i5/OS object by highlighting it in OpsNav and pressing the Windows Delete key. Before it performs any deletion, OpsNav will prompt you to confirm whether or not you actually want to delete the object. As with the folder delete I discussed earlier, this delete is permanent on an i5 partition and it cannot be undone. If you want to retrieve a deleted object, you would have to perform an object restore from backup media.

Renaming an Object

If you want to rename an object, you would select the Rename command from the pop-up menu or the OpsNav menu bar as described in step 2. A Rename input box will appear asking you for the new name of the object. There are only a few rules to follow when renaming an object.

First, remember that you must enter a valid i5/OS name that is no longer than 10 characters. If you enter a new name that is longer than 10 characters, the operation will fail and you will get the following cryptic message:

'The operation failed. Verify your connection is working and that you have proper authority for the operation.'

With a rename, this simply means that i5/OS didn't like the name that you selected and that you should try again with a different name.

The other rule to follow is to respect the extension name (.FILE, .PGM, etc) that is attached to the object you are trying to rename. Don't try to delete or change the object extension with the new name or you'll get the same cryptic message about operation failure or connection failure that I just talked about. The object extension is defined when the object is created and it cannot be changed.

Cut and Paste

There are two ways that you can use OpsNav to perform a copy and paste operation.

The first is to perform a standard Copy and Paste, where you highlight the object, select the Copy function from the right-click pop-up menu or from the menu bar, and then perform a Paste operation into the library where you want to copy the object. The Paste option is implemented in OpsNav by doing one of the following:

Right-clicking on the library folder that you want to copy the object to and then selecting Paste off the pop-up menu that appears.

Highlighting the target folder and then selecting Edit, Paste from the OpsNav menu bar.

The second option for copying and pasting an i5/OS object between folders is to drag and drop the object from the folder where it is currently residing to the new library folder where you want to copy it to. This technique will also make an exact copy of the object in the new library.

As far as i5/OS authority goes for copied objects, the copied object will retain the same authority as the original object with one exception. The person who copied that object from the original library will become the owner of the newly copied object. To change the owner name, right-click on the new copied object and select Permissions from the pop-up menu that appears. This will display a Permissions panel for the object, which will allow you to change the new object's authorities and ownership. Click on the Owner button on that panel, and the system will allow you to change the object's owner.

What About Using Cut and Paste?

For this article, I also tested using OpsNav to move objects between libraries by using standard Windows Cut and Paste functionality. However, in my testing, I found that OpsNav Cut and Paste didn't work any differently than the Copy and Paste function that I explained above. The object was copied to the new library but it wasn't removed from the old library. I wasn't sure if this was due to the level of software I was testing with or whether my system wouldn't allow this function. So feel free to try this function and please let me know if you get any different results.

About Our Testing Environment

All configurations described in this article were tested on an i5 box running i5/OS V5R3, using the iSeries Navigator product that comes with iSeries Access for Windows V5R3. However, many of these commands and features are also available on i5/OS V5R4 and in most earlier versions of OS/400 V4R5 and below running on AS/400 and iSeries machines. Most of the OpsNav functionality discussed here should also be available with different iSeries Access for Windows or Client Access Express for Windows software versions. Be aware, however, that you may see some variations from these examples when using different versions of the software.

This premier System i education and networking event promises to be larger than our recent conferences, providing invaluable learning and networking opportunities for you and your employees.

The Annual Conference & Expo will be the flagship event of the new "COMMON…Customized" education model, offering over 500 educational sessions, hands-on labs, and all-day workshops. We've added new tracks on hot topics like PHP, open source, and IP telephony - all delivered by the most respected experts in the IT industry. In addition, the new COMMON Annual Conference & Expo will offer non-technical, professional development sessions to help IT managers resolve daily business issues.

COMMON's 2007 Annual Conference & Expo will offer:·More session hours, including over 500 sessions and hands-on labs in a range of choices every hour.·More user sessions that are driven by users, including customer experience sessions.·More in-depth education that includes all-day pre-conference workshops, all-day Integrated Seminars, open labs and a wide variety of regular-length sessions.·Emphasis on networking that provides great opportunities to network with your peers, IBM developers and executives, and industry experts.·An extensive Expo of new companies showcasing the latest System i-related industry solutions.

The COMMON Annual Conference & Expo is one of the most cost-effective ways to gain knowledge and tools needed to meet the changing demand of IT. You'll pay a reasonable amount for intensive education, and realize a tangible, immediate return on your investment. In addition to the direct cost savings, the networking opportunities and professional contacts are immeasurable.

The COMMON 2007 Annual Conference & Expo is a System i educational and networking event that you and/or your team won't want to miss. To learn more about the conference and to register online, visit www.common.org/conference.html.

The Annual Conference & Expo is just one of the many benefits to COMMON membership, so don't miss out on your opportunity to attend this premier event.