Difference between revisions of "Image Catalog"

From MidrangeWiki
Jump to: navigation, search
m (some minor readability formatting)
m (Load Images (The Easy Way): removed dots before extensions)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
Building an image catalog on the iSeries
 
Building an image catalog on the iSeries
 
(thanks to Rob Berendt at Group Dekko Services, LLC for all the pointers)
 
(thanks to Rob Berendt at Group Dekko Services, LLC for all the pointers)
Create a virtual optical device to be used to �contain� the image catalog (you'll need to do this only once):
+
 
 +
'''Image Catalogs''' are simply a way of storing and using optical disk images instead of having to use the actual optical disks (CD's or DVD's).
 +
 
 +
.ISO images of the disk(s) are stored in a folder on the IFS called an ''image catalog''. .ISO files cannot be simply copied into the folder: they must be added to it with special commands.
 +
 
 +
The image catalog is associated with a ''virtual optical drive'' by "loading" the catalog to the drive after it has been varied on.
 +
 
 +
The .ISO image currently "mounted" in the catalog is then available for use with LODRUN and RSTLIB commands. Another image can be mounted without varying the device off or unloading the catalog from it.
 +
 
 +
Aside from creating the virtual optical drive, all catalog functions can be done via the "work with image catalog" command, ''wrkimgclg''.
 +
 
 +
==Create Virtual Device==
 +
Create a virtual optical device to be used to contain the image catalog (you'll need to do this only once):
  
 
<code>[[CRTDEVOPT]] DEVD(OPTVRT01) RSRCNAME(*VRT) ONLINE(*YES)  
 
<code>[[CRTDEVOPT]] DEVD(OPTVRT01) RSRCNAME(*VRT) ONLINE(*YES)  
Line 9: Line 21:
  
 
<code>[[VRYCFG]] CFGOBJ(OPTVRT01) CFGTYPE(*DEV) STATUS(*ON)</code>
 
<code>[[VRYCFG]] CFGOBJ(OPTVRT01) CFGTYPE(*DEV) STATUS(*ON)</code>
 
+
==Create Catalog==
 
Create the image catalog to copy the images to:
 
Create the image catalog to copy the images to:
  
<code>[[CRTIMGCLG]] IMGCLG(PTFCATALOG) DIR('/fixes')  
+
<code>[[CRTIMGCLG]] IMGCLG(PTFCATALOG) DIR('/fixes') CRTDIR(*YES)
 
TEXT('PTF image catalog')</code>
 
TEXT('PTF image catalog')</code>
  
 
Note: You have to either create the directory first OR use the <code>[[CRTDIR]](*YES)</code> option when you create the image catalog.
 
Note: You have to either create the directory first OR use the <code>[[CRTDIR]](*YES)</code> option when you create the image catalog.
 +
==Load Images (The Easy Way)==
 +
A new API called QVOIFIMG (Fill Image Catalog) was created via PTFs for releases 5.4, 6.1 and 7.1 that will find multiple files within an image catalog directory and add them to the specified image catalog automatically. This saves you the time and effort of performing several ADDIMGCLGEs. Once you have all your image files in the IFS directory created for your image catalog, simply enter:
 +
* CALL PGM(QVOIFIMG) PARM('<mycatalog>' '*ISO' 0)
 +
or
 +
* CALL PGM(QVOIFIMG) PARM('<mycatalog>' '*BIN' 0)
 +
 +
Note: If the catalog already has entries in it, those entries will be cleared each time you call the QVOIFIMG program.
  
 +
==Load Images (The Hard Way)==
 
At this point you will need to copy the images to the catalog folder using one of the following methods:  
 
At this point you will need to copy the images to the catalog folder using one of the following methods:  
 +
===PTF's===
 
* If you downloaded the images using the FTP commands sent to you when you ordered your PTF's (online) you will use the following command for each .bin (binary) file in the folder.
 
* If you downloaded the images using the FTP commands sent to you when you ordered your PTF's (online) you will use the following command for each .bin (binary) file in the folder.
**:<code>[[ADDIMGCLGE]] IMGCLG(PTFCATALOG) FROMFILE('/fixes/TheFtp.binFileNameHere') TOFILE(*FROMFILE) REPLACE(*INSERT)</code>
+
**<code>[[ADDIMGCLGE]] IMGCLG(PTFCATALOG) FROMFILE('/fixes/TheFtp.binFileNameHere') TOFILE(*FROMFILE) REPLACE(*INSERT)</code>
**It will �register� the existing bin file to the image catalog.  
+
**It will register the existing bin file to the image catalog.  
 
**This will save space by using only one copy of the image  
 
**This will save space by using only one copy of the image  
 
**(the <code>TOFILE(*FROMFILE)</code> parameter will do this IF the folder referenced in the <code>FROMFILE</code> is the same folder as identified in the DIR parameter in the <code>[[CRTIMGCLG]]</code> command)  
 
**(the <code>TOFILE(*FROMFILE)</code> parameter will do this IF the folder referenced in the <code>FROMFILE</code> is the same folder as identified in the DIR parameter in the <code>[[CRTIMGCLG]]</code> command)  
 +
===CD Images===
 +
* If you are copying a CD to the catalog, use the following command:
 +
**<code>[[ADDIMGCLGE]] IMGCLG(YourImageCatalogNameHere) FROMDEV(YourOpticalDevice NameHere)</code>
 +
**'Load' the image catalog into your virtual drive: <code>[[LODIMGCLG]] IMGCLG(PTFCATALOG) DEV(OPTVRT01)</code>
 +
 +
===.ISO files===
 +
* If you are copying an uploaded ISO image to the catalog, use the following command:
 +
**<code>[[ADDIMGCLGE]] IMGCLG(PTFCATALOG) FROMFILE('/fixes/TheUploaded.ISOFileNameHere') TOFILE(*FROMFILE) </code>
 +
 +
You can convert a CD into a .iso with commercial products like Roxio or free ware like [http://isorecorder.alexfeinman.com/isorecorder.htm ISO Recorder] (for Windows).
 +
 +
Linux systems can convert discs to .iso with the command
 +
  cat /dev/scd0 > /home/test.iso
 +
Ubuntu comes pre-loaded with Brasero, a GUI utility that can carry out virtually any task involving optical media including creating ISO images.
  
* If you are copying the CD image to the catalog, use the following command:
+
==Catalogs==
**<code>[[ADDIMGCLGE]] IMGCLG(YourImageCatalogNameHere) FROMDEV(YourOpticalDevice NameHere)</code>
+
===Work With===
 +
**Work with the contents of the image catalog <code>[[WRKIMGCLGE]] PTFCATALOG</code> (if you need to change something like the order of the images)
 
**'Load' the image catalog into your virtual drive: <code>[[LODIMGCLG]] IMGCLG(PTFCATALOG) DEV(OPTVRT01)</code>
 
**'Load' the image catalog into your virtual drive: <code>[[LODIMGCLG]] IMGCLG(PTFCATALOG) DEV(OPTVRT01)</code>
 +
===Verify===
 
**Verify that all is well with the loaded catalog: <code>[[VFYIMGCLG]] IMGCLG(PTFCATALOG) TYPE(*PTF) SORT(*YES)</code>
 
**Verify that all is well with the loaded catalog: <code>[[VFYIMGCLG]] IMGCLG(PTFCATALOG) TYPE(*PTF) SORT(*YES)</code>
**Work with the contents of the image catalog  <code>[[WRKIMGCLGE]] PTFCATALOG</code> (if you need to change something � like the order of the images)
 
  
 +
==Using a Catalog==
 +
===Loading PTFs===
 
Run your [[PTF]] option as follows, using the [[Virtual Optical drive]] ...
 
Run your [[PTF]] option as follows, using the [[Virtual Optical drive]] ...
  
Line 71: Line 109:
 
* <code>LODIMGCLG IMGCLG(SF99529) DEV(OPTVRT01) OPTION(*UNLOAD)</code>
 
* <code>LODIMGCLG IMGCLG(SF99529) DEV(OPTVRT01) OPTION(*UNLOAD)</code>
 
... And so on.
 
... And so on.
 +
 +
===Loading Other Software===
 +
Use LODRUN DEV(OPTVRT01) after mounting the particular image in the catalog you want to use.
 +
 +
Note: you have to manually change the mounted image (from another session) when a "mount next CD" prompt appears. Image catalogs will '''not''' automatically advance from one entry to the next, as they do for PTFs.
  
 
==Categories==
 
==Categories==
 
[[Category:PTF]]
 
[[Category:PTF]]
 
[[Category:Virtual Optical]]
 
[[Category:Virtual Optical]]

Latest revision as of 03:57, 1 September 2013

Building an image catalog on the iSeries (thanks to Rob Berendt at Group Dekko Services, LLC for all the pointers)

Image Catalogs are simply a way of storing and using optical disk images instead of having to use the actual optical disks (CD's or DVD's).

.ISO images of the disk(s) are stored in a folder on the IFS called an image catalog. .ISO files cannot be simply copied into the folder: they must be added to it with special commands.

The image catalog is associated with a virtual optical drive by "loading" the catalog to the drive after it has been varied on.

The .ISO image currently "mounted" in the catalog is then available for use with LODRUN and RSTLIB commands. Another image can be mounted without varying the device off or unloading the catalog from it.

Aside from creating the virtual optical drive, all catalog functions can be done via the "work with image catalog" command, wrkimgclg.

Create Virtual Device

Create a virtual optical device to be used to contain the image catalog (you'll need to do this only once):

CRTDEVOPT DEVD(OPTVRT01) RSRCNAME(*VRT) ONLINE(*YES) TEXT('Virtual optical drive for image catalog')

Make the drive available (after you create it the first time only):

VRYCFG CFGOBJ(OPTVRT01) CFGTYPE(*DEV) STATUS(*ON)

Create Catalog

Create the image catalog to copy the images to:

CRTIMGCLG IMGCLG(PTFCATALOG) DIR('/fixes') CRTDIR(*YES) TEXT('PTF image catalog')

Note: You have to either create the directory first OR use the CRTDIR(*YES) option when you create the image catalog.

Load Images (The Easy Way)

A new API called QVOIFIMG (Fill Image Catalog) was created via PTFs for releases 5.4, 6.1 and 7.1 that will find multiple files within an image catalog directory and add them to the specified image catalog automatically. This saves you the time and effort of performing several ADDIMGCLGEs. Once you have all your image files in the IFS directory created for your image catalog, simply enter:

  • CALL PGM(QVOIFIMG) PARM('<mycatalog>' '*ISO' 0)

or

  • CALL PGM(QVOIFIMG) PARM('<mycatalog>' '*BIN' 0)

Note: If the catalog already has entries in it, those entries will be cleared each time you call the QVOIFIMG program.

Load Images (The Hard Way)

At this point you will need to copy the images to the catalog folder using one of the following methods:

PTF's

  • If you downloaded the images using the FTP commands sent to you when you ordered your PTF's (online) you will use the following command for each .bin (binary) file in the folder.
    • ADDIMGCLGE IMGCLG(PTFCATALOG) FROMFILE('/fixes/TheFtp.binFileNameHere') TOFILE(*FROMFILE) REPLACE(*INSERT)
    • It will register the existing bin file to the image catalog.
    • This will save space by using only one copy of the image
    • (the TOFILE(*FROMFILE) parameter will do this IF the folder referenced in the FROMFILE is the same folder as identified in the DIR parameter in the CRTIMGCLG command)

CD Images

  • If you are copying a CD to the catalog, use the following command:
    • ADDIMGCLGE IMGCLG(YourImageCatalogNameHere) FROMDEV(YourOpticalDevice NameHere)
    • 'Load' the image catalog into your virtual drive: LODIMGCLG IMGCLG(PTFCATALOG) DEV(OPTVRT01)

.ISO files

  • If you are copying an uploaded ISO image to the catalog, use the following command:
    • ADDIMGCLGE IMGCLG(PTFCATALOG) FROMFILE('/fixes/TheUploaded.ISOFileNameHere') TOFILE(*FROMFILE)

You can convert a CD into a .iso with commercial products like Roxio or free ware like ISO Recorder (for Windows).

Linux systems can convert discs to .iso with the command

  cat /dev/scd0 > /home/test.iso

Ubuntu comes pre-loaded with Brasero, a GUI utility that can carry out virtually any task involving optical media including creating ISO images.

Catalogs

Work With

    • Work with the contents of the image catalog WRKIMGCLGE PTFCATALOG (if you need to change something like the order of the images)
    • 'Load' the image catalog into your virtual drive: LODIMGCLG IMGCLG(PTFCATALOG) DEV(OPTVRT01)

Verify

    • Verify that all is well with the loaded catalog: VFYIMGCLG IMGCLG(PTFCATALOG) TYPE(*PTF) SORT(*YES)

Using a Catalog

Loading PTFs

Run your PTF option as follows, using the Virtual Optical drive ...

  • GO PTF
  • option 8 (Install program temporary fix package)
                 Install Options for Program Temporary Fixes 
                                                         System:   GDI 

Type choices, press Enter.

 
  Device  . . . . . . . . .   OPTVRT01     Name, *SERVICE 
 
  Automatic IPL . . . . . .   N            Y=Yes 
                                           N=No

You can load as many image catalogs as you want (as space permits) so that you could create a series of image catalogs for sequential loading as follows: Create the directories for the image catalog:

md '/fixes' 
md '/fixes/cume' 
md '/fixes/SF99529' 
md '/fixes/SF99269'

Create the image catalogs:

CRTIMGCLG IMGCLG(CUME) DIR('/fixes/cume') 
CRTIMGCLG IMGCLG(SF99529) DIR('/fixes/SF99529') 
CRTIMGCLG IMGCLG(SF99269) DIR('/fixes/SF99269' ...

Add image catalog entries for each as listed above.

Then you just run multiple ...

  • LODIMGCLG IMGCLG(CUME) DEV(OPTVRT01) OPTION(*LOAD)
  • GO PTF
  • Option 8
  • no ipl
  • LODIMGCLG IMGCLG(CUME) DEV(OPTVRT01) OPTION(*UNLOAD)
  • LODIMGCLG IMGCLG(SF99529) DEV(OPTVRT01) OPTION(*LOAD)
  • GO PTF
  • Option 8
  • no ipl
  • LODIMGCLG IMGCLG(SF99529) DEV(OPTVRT01) OPTION(*UNLOAD)

... And so on.

Loading Other Software

Use LODRUN DEV(OPTVRT01) after mounting the particular image in the catalog you want to use.

Note: you have to manually change the mounted image (from another session) when a "mount next CD" prompt appears. Image catalogs will not automatically advance from one entry to the next, as they do for PTFs.

Categories