Admin Alert: An Alternate Way to Port Image Catalogs Between Systems: QFileSrv.400
August 10, 2011 Joe Hertvik
In a recent article, I presented a technique for porting image catalog files between Power i systems. Afterward, a reader contacted me with an equally valid ways of moving image catalogs around that may even work better than my technique. This week, I’ll look at his suggestion and see how it can make life easier when porting optical media to remote systems. My Solution My original solution to porting an image catalog and its associated files from a source to a target machine consisted of the following steps:
For this solution, you have to maintain system backup code on your source system and an FTP script and image catalog reload source code on your target system to make this work. For more details on performing these steps, check out this article. IMHO, this is a fairly good solution that’s easy to run and automate. However, it turns out that this isn’t necessarily the most efficient way to transfer image catalogs between systems. For that, we turn to reader Milan Apeltauer and his QFileSvr.400 solution that he sent me after the article was published. Cutting the Fat Out of My Technique? Milan Apeltauer checked in with a streamlined approach that replaces steps 5 and 6 of my solution with the elegant solution of using the QFileSvr.400 file system to easily move image files across systems. Here are the steps that Milan uses to send image catalogs and their associated image files between systems. 1. Make sure your virtual optical device is created on both your source and your target machines (step 1 and part of step 2 in my original procedure). In addition, Milan’s technique requires that you also create the image catalog on both machines (the source and target) at the start, rather than creating it only on the source machine, as my article specified, and then recreating it on the target system through a CL program. To create an image catalog on your source and target machine, run the following Create Image Catalog (CRTIMGCLG) command. CRTIMGCLG IMGCLG(IMAGE_CAT) DIR('/imagedir) TYPE(*OPT) CRTDIR(*YES) Where IMAGE_CAT equals the name of your image catalog and /imagedir equals the AS/400 Integrated File System (AS/400 IFS) directory name where you want to store the catalog’s image files. This command creates the new image catalog and its associated AS/400 IFS image catalog directory on the system. 2. Load the optical media into the image catalog on your source machine as a new image file entry. This can be done with the following Add Image Catalog Entry (ADDIMGCLGE) command. ADDIMGCLGE IMGCLG(IMAGE_CAT) FROMDEV(OPTxx) TOFILE(IMAGE_FILE) IMGCLGIDX(1) REPLACE(*YES) Where IMAGE_CAT equals the name of your image catalog, OPTxx equals the name of your physical optical media reader where you read the loaded image from a CD or a DVD disk (for example, OPT01), and IMAGE_FILE equals the name of the image catalog entry you are creating. The Image Catalog Index (IMGCLGIDX) parameter is equal to 1 in this case so that we can always update and copy the first image catalog entry between the systems. At this point, your new image catalog file entry is created. You can view it and any other image files in that catalog by using the following Work with Image Catalog Entries (WRKIMGCLGE) command. WRKIMGCLGE IMGCLG(IMAGE_CAT) 3. If you don’t already have one, create a QFileSvr.400 link on your target system that points to your source iSeries, System i, or Power i machine. QFileSvr.400 allows you to create AS/400 IFS links on one Power i OS system that point to an AS/400 IFS directory on another Power i OS system. These links can also be created on machines running earlier operating systems versions, including i5/OS and OS/400. IBM offers a primer on how to create a QFileSvr.400 link on your target system in Software Technical Document 19112808, Using QFileSvr.400. The only tricky requirement is that you must create the link by using a user ID that has the same password on both machines. In most cases, the AS/400 IFS directory name on your target system will be /QFileSvr.400/xxxxxxxxxx where xxxxxxxxxx equals the name of the source system. 4. Here’s where Milan really taught me something. He replaced steps 4 through 6 in my solution with a single command that allows me to recreate an image catalog entry on my target system with the same image catalog entry from my source machine. To create an image catalog image file on your target system directly from the source system, run the following ADDIMGCLGE command on the target system. ADDIMGCLGE IMGCLG(IMAGE_CAT) FROMFILE('/QFileSvr.400/xxxxxxxxxx/imagedir/IMAGE_FILE) IMGCLGIDX(1) REPLACE(*YES) Where again, xxxxxxxxxx equals the name of your source system, /imagedir equals the name of your image catalog directory, and IMAGE_FILE equals the name of the image file you are creating from the source system. And that’s it. Milan’s solution is elegantly simple and easy to run. The command can be called from a command line, scripted into a CL program, or run through a job scheduler such as Help/Systems’ Robot/SCHEDULE program. This is a really simple way to copy an image catalog file entry from one system to another. So a tip of my hat to Milan who showed me an easier way to transfer image catalog files from one iSeries, System i, or Power i machine to another. Two Solutions To Choose From . . . Or Is It Three? With my original article and Milan’s solution, we now have two ways to transfer image catalogs between i OS systems. Choose whichever one works better in your environment. But would you believe it? Another reader, Jeff Yanoviak, wrote in to tell that there is actually a third IBM-sanctioned way to transfer image catalogs between systems, starting in i OS 6.1. But that’s another article for another day. RELATED STORIES Admin Alert: Porting an Image Catalog Between Power i Boxes using FTP Admin Alert: Five Minutes to Moving System i Objects Between Partitions
|