ADDIMGCLGE (Add Image Catalog Entry)

ADDIMGCLGE Command syntax diagram

 

Purpose

The Add Image Catalog Entry (ADDIMGCLGE) command is used to create a virtual optical image in the target directory (as specified by the directory (DIR) parameter on the CRTIMGCLG command). If the optical image is added successfully, the image will be loaded and the image catalog (*IMGCLG) in library QUSRSYS will be updated. Optical images can be added from the following sources:

  1. Physical CD/DVD media (by specifying an optical device containing the CD/DVD image to be added)
  2. An optical image located in a directory on the system

If a file of that name already exists in the target directory, one of the following will occur:

  1. If REPLACE(*NO) is specified, an error message will be issued and the catalog entry in the image catalog will not be replaced.
  2. If REPLACE(*YES) is specified, the catalog entry in the image catalog will be replaced.
  3. If REPLACE(*INSERT) is specified, the catalog entry in the image catalog will be inserted. If a catalog entry already exists at the index specified, the remaining entries will be incremented by one up to the next available index.

If the image does not exist in the target directory, the image is copied and the image catalog is updated with information about this image.

 

Restrictions

  1. You must have *SECADM and *ALLOBJ special authorities to use this command.

 

Required Parameters

IMGCLG
Specifies the name of the image catalog to which the image is to be added.

image-catalog-name: Specify the name of the image catalog to which the image is added.

FROMDEV
Specifies the name of the CD/DVD device from which the optical image is to be copied. A value must be specified for either the FROMDEV or FROMFILE parameter to identify the optical image to be copied.

device-name: Specify the name of the device from which the optical image is to be copied.

FROMFILE
Specifies the path name of the image file to be copied. A value must be specified for either the FROMFILE or FROMDEV parameter to identify the optical image to be copied to the target directory.

'file-name': Specify the path name of the optical image file to be added to the image catalog.

 

Optional Parameters

TOFILE
Specifies the name given to the file that will be copied to the target directory.

*GEN: The file name will be generated from the source image. If the source image is from optical media, the name given to the file will be generated from the volume ID. If the source image is from another directory, the file name will be generated from the file name in the source directory.

*FROMFILE: The file name will be the same name as the source image. If the source image is from optical media, the name given to the file will be the volume ID. If the source image is from another directory, the file will be given the same name as that in the source directory.

'file-name': Specify the file name of the optical image file to be added to the image catalog.

IMGCLGIDX
Specifies the image catalog index to be assigned to the image being added.

*AVAIL: The image catalog index number assigned to the image will be the first sequential number available.

image-catalog-index-number: Specify an index number from 1 to 64.

REPLACE
Specifies the action to take if an catalog entry with the same index number as specified on the IMGCLGIDX parameter already exists in the image catalog.

The possible values are:

*NO: Specify that the existing catalog entry will not be replaced and an error message will be issued.

*YES: Specify that the existing image catalog entry will be replaced.

*INSERT: Specify that the catalog entry specified will be added (or inserted if an existing index number already exists). If the image catalog entry is inserted, the remaining catalog entries will be incremented by one up to the next available index number.

TEXT
Specifies the text that briefly describes the image being loaded.

*GEN: If there is a description for the optical image file being added, the text field will be set to the description, otherwise it will be set to the volume ID of the CD.

'text-description': Specify up to 50 characters of text for this image file.

Examples for ADDIMGCLGE

Example 1: Adding an Image Catalog Entry from CD/DVD Media

ADDIMGCLGE  IMGCLG(MYCLG)  FROMDEV(OPT01)

This command adds the optical image in device OPT01 to the target directory and updates catalog MYCLG.

Example 2: Adding an Image Catalog Entry from a Directory

ADDIMGCLGE  IMGCLG(MYCLG) FROMFILE('/MyDir/MyFile.img')

This command adds the optical image file /MyDir/Myfile.img to the target directory /MyNewDir and updates catalog MYCLG. The target directory is the directory specified on the DIR parameter of the CRTIMGCLG command.

Example 3: Adding an Image Catalog Entry with REPLACE(*INSERT)

ADDIMGCLGE  IMGCLG(MYCLG)  FROMDEV(OPT01)  REPLACE(*INSERT)

This command adds the optical image in device OPT01 to the target directory and, if a catalog entry exists at the specified index, will insert the entry in the catalog and increment the remaining entries up to the next available index.

Error messages for ADDIMGCLGE

*ESCAPE Messages

CPFBC28
Catalog entry not added to image catalog &1.
CPFBC40
Not authorized to command &1.
CPFBC41
&1 command failed.