Admin Alert: Graphically Moving i5/OS Objects with OpsNav
April 4, 2007 Joe Hertvik
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:
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.
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.
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:
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.