Retrieve Image Catalog (RTVIMGCLG)
Where allowed to run: Compiled CL program or interpreted REXX (*BPGM *IPGM *BREXX *IREXX) Threadsafe: No |
Parameters Examples Error messages |
The Retrieve Image Catalog (RTVIMGCLG) command is used in a CL procedure to retrieve the name of the image catalog loaded in a virtual device, or to retrieve the name of the virtual device where an image catalog is loaded.
Restrictions:
- The following authorities are required to retrieve the name of the virtual device an image catalog is loaded in:
- Execute (*EXECUTE) authority to library QUSRSYS.
- Use (*USE) authority to the image catalog.
- Use (*USE) authority to the device is required to retrieve the name of the image catalog loaded in a virtual device.
- This command is valid only in a compiled CL procedure.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
IMGCLG | Image catalog | Name | Optional |
DEV | Virtual device | Name | Optional |
DEVLOD | CL var for DEVLOD (10) | Character value | Optional |
IMGCLGLOD | CL var for IMGCLGLOD (10) | Character value | Optional |
Top |
Image catalog (IMGCLG)
Specifies the image catalog whose associated virtual device name is to be retrieved.
Note: A value must be specified for this parameter or the Virtual device (DEV) parameter.
- name
- Specify the name of the image catalog.
Top |
Virtual device (DEV)
Specify the virtual device whose associated image catalog name is to be retrieved.
Note: A value must be specified for this parameter or the Virtual device (IMGCLG) parameter.
- name
- Specify the name of the virtual device.
Top |
CL var for DEVLOD (10) (DEVLOD)
Specifies the name of the CL variable that receives the name of the current virtual device for which the specified image catalog is loaded. You must specify a CL variable declared as TYPE(*CHAR) with a minimum length of 10 characters. A value of *NONE will be returned if the name specified for the Image catalog (IMGCLG) parameter is not associated with a virtual device.
Top |
CL var for IMGCLGLOD (10) (IMGCLGLOD)
Specifies the name of the CL variable that receives the name of the image catalog currently loaded for the specified virtual device. You must specify a CL variable declared as TYPE(*CHAR) with a minimum length of 10 characters. A value of *NONE will be returned if the name specified for the Virtual device (DEV) parameter is not associated with an image catalog.
Top |
Examples
Example 1: Retrieving the Loaded Virtual Device Name
DCL VAR(&MYLODDEV) TYPE(*CHAR) LEN(10) RTVIMGCLG IMGCLG(MYCLG) DEVLOD(&MYLODDEV)
This command will retrieve the name of the loaded virtual device associated with image catalog MYCLG.
Example 2: Retrieving the Image Catalog Loaded in a Virtual Device
DCL VAR(&MYCLGLOD) TYPE(*CHAR) LEN(10) RTVIMGCLG DEV(OPTVRT01) IMGCLGLOD(&MYCLGLOD)
This command will retrieve the name of the image catalog associated with virtual device OPTVRT01.
Top |
Error messages
*ESCAPE Messages
- CPFBC45
- Image catalog &1 not found.
- CPF9802
- Not authorized to object &2 in &3.
- CPF9820
- Not authorized to use library &1.
- CPF9825
- Not authorized to device &1.
Top |