IBM Support

Using the QIMGCLG Object to Create an Image Catalog or the QVOIFIMG API to Add Image Catalog Entries

Troubleshooting


Problem

At R610 and above, CRTIMGCLG IMPORT(*YES) can be used to create an image from an image catalog directory where the QIMGCLG object exists. This is useful when FTPing or saving and restoring the images to multiple systems. The Fill Image Catalog (QVOIFIMG) API can be used to find multiple files within an image catalog directory and add them to the specified image catalog.

Resolving The Problem

Starting in R610, a new image catalog object (QIMGCLG) exists as an IFS stream-file (*STMF) object maintained in the image catalog directory. QIMGCLG is a copy of your image catalog information that exists in the QUSRSYS library. This makes the software distribution and catalog creation after moving the image files between systems easier. The new *IMPORT parameter of the Create Image Catalog (CRTIMGCLG) command allows a catalog to be created based on existing catalog information that is located in the QIMGCLG file. Catalog entries will appear as they did in the previous catalog.

This means you can send all of the files in your image-catalog directory to another system and create the image-catalog object in QUSRSYS from QIMGCLG with a single Create Image Catalog (CRTIMGCLG) command. You can use the new Import Image Catalog (IMPORT) parameter as shown:

CRTIMGCLG IMGCLG(image-catalog-name) DIR(image-catalog-directory) IMPORT(*YES)

The catalog name specified on the IMGCLG parameter will be the name of the new catalog in QUSRSYS. All other parameters specified on the command, other than the three listed above, will be ignored. This allows you to set up your catalog on other systems using one CRTIMGCLG command without issuing the ADDIMGCLGE command for each virtual volume in the image-catalog directory.


Notes:
1. If object QIMGCLG *STMF is not in the image catalog directory, CRTIMGCLG IMPORT(*YES) will fail with message:

CPD4F29 - File required for image catalog import not found.

The file referred to in the above message is QIMGCLG. In order for the import to be successful, the QIMGCLG object contents must also include entries for each image catalog file as only those entries will be imported.
2. If the images in the image catalog directory were transferred from the IBM ESS Web site or PTF .iso files were transferred from Fix Central, and CRTIMGCLG IMPORT(*YES) was used, it will fail with CPD4F29. It will fail because the system will look for object QIMGCLG of type *STMF in the directory and it would not be there. CRTIMGCLG creates the QIMGCLG object and ADDIMGCLGE populates info about each image file in it.
The File Image Catalog (QVOIFIMG) API can be used to find multiple files within an image catalog directory and add them to the specified image catalog. To use this functionality, the following PTFs are required (it is R720 base code):

o SI39365 (V5R4)
o SI39364 (V6R1)
o SI39362 (V7R1)

Here is an example of how to use the API:

If a previous catalog exists:
DLTIMGCLG IMGCLG(MYCATALOG) KEEP(*YES)

Create image catalog:
CRTIMGCLG IMGCLG(MYCATALOG) DIR('/MYCATALOGDIR')

Add the images:
CALL PGM(QVOIFIMG) PARM('MYCATALOG' '*ALL' 0)

 

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z000000cvsuAAA","label":"Backup Recovery Install Migration-\u003EImage catalog"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]

Historical Number

624330343

Document Information

Modified date:
30 October 2024

UID

nas8N1011147