Compress Object (CPROBJ)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Compress Object (CPROBJ) command allows you to compress programs, panel groups, menus, display files, printer files, modules, and service programs.

Restrictions:

  1. The user must have *OBJMGT authority to the object specified and *EXECUTE authority to the library containing the object.
  2. Objects that were saved with storage freed cannot be compressed or decompressed.
  3. Objects that are compressed cannot be saved for a release prior to Version 2, Release 1 of the operating system.
  4. Programs without a valid validation value are not compressed.
  5. Programs that were created before Version 1, Release 3 of the operating system and have not been retranslated (using the Change Program (CHGPGM) command) can not be compressed because no validation value has been generated.
  6. A program, service program, or module that was created prior to Version 3, Release 6 of the operating system must be retranslated before the object can be compressed. Retranslate the object using the CHGPGM, CHGSRVPGM, or CHGMOD commands.
  7. To compress a system program, the user must end all active subsystems.
  8. To prevent abnormal end of a program, the program must not be running in the system when it is compressed.
Top

Parameters

Keyword Description Choices Notes
OBJ Object Qualified object name Required, Positional 1
Qualifier 1: Object Generic name, name, *ALL
Qualifier 2: Library Name, *LIBL, *CURLIB, *ALL, *ALLUSR, *USRLIBL
OBJTYPE Object type Values (up to 6 repetitions): *ALL, *FILE, *MENU, *MODULE, *PGM, *PNLGRP, *SRVPGM Required, Positional 2
DAYS Days unused 1-366, *NONE Optional
PGMOPT Program option *ALL, *OBS Optional
Top

Object (OBJ)

Specifies the name and library of the object to be compressed.

This is a required parameter.

The possible values are:

*ALL
All objects in the specified library of the object type specified on the Object type prompt (OBJTYPE parameter) are compressed.
generic*-object-name
Specify the generic name of the object to be compressed. A generic name is a character string that contains one or more characters followed by an asterisk (*).
object-name
Specify the name of the object to be compressed.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*USRLIBL
If a current library entry exists in the library list for the current thread, the current library and the libraries in the user portion of the library list are searched. If there is no current library entry, only the libraries in the user portion of the library list are searched.
*CURLIB
Only the current library is searched. If no current library entry exists in the library list, QGPL is used.
*ALL
All libraries in the system, including QSYS, are searched.
*ALLUSR
All user libraries are searched. All libraries with names that do not begin with the letter Q are searched except for the following:

#CGULIB     #DSULIB     #SEULIB
#COBLIB     #RPGLIB
#DFULIB     #SDALIB

Although the following Qxxx libraries are provided by IBM, they typically contain user data that changes frequently. Therefore, these libraries are considered user libraries and are also searched:

QDSNX       QRCLxxxxx   QUSRDIRDB   QUSRVI
QGPL        QSRVAGT     QUSRIJS     QUSRVxRxMx
QGPL38      QSYS2       QUSRINFSKR
QMGTC       QSYS2xxxxx  QUSRNOTES
QMGTC2      QS36F       QUSROND
QMPGDATA    QUSER38     QUSRPOSGS
QMQMDATA    QUSRADSM    QUSRPOSSA
QMQMPROC    QUSRBRM     QUSRPYMSVR
QPFRDATA    QUSRDIRCF   QUSRRDARS
QRCL        QUSRDIRCL   QUSRSYS

  1. 'xxxxx' is the number of a primary auxiliary storage pool (ASP).
  2. A different library name, in the format QUSRVxRxMx, can be created by the user for each previous release supported by IBM to contain any user commands to be compiled in a CL program for the previous release. For the QUSRVxRxMx user library, VxRxMx is the version, release, and modification level of a previous release that IBM continues to support.
library-name
Specify the name of the library to be searched.
Top

Object type (OBJTYPE)

Specifies the type of object to be compressed. You can specify *ALL, or you can specify one or more of the other possible values.

This is a required parameter.

You can enter multiple values for this parameter.

The possible values are:

*ALL
All menus, panel groups, display and printer device files, programs, modules, and service programs with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*FILE
Display and printer device files with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*MENU
Menus with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*MODULE
Modules with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*PNLGRP
Panel groups with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*PGM
Programs with the name and library specified on the Object prompt (OBJ parameter) are compressed.
*SRVPGM
Service programs with the name and library specified on the Object prompt (OBJ parameter) are compressed.
Top

Days unused (DAYS)

Specifies the number of days the object has not been used or changed. If the object has not been used or changed for more than the specified number of days, it is compressed. If it has been used or changed, it is left decompressed.

The possible values are:

*NONE
The object is compressed regardless of the number of days it has not been used or changed.
1-366
Specify the number of days. Valid values range from 1 through 366.
Top

Program option (PGMOPT)

Specifies whether the entire program or service program or only the observability tables are compressed.

The possible values are:

*ALL
The entire program or service program (instruction stream and observability tables) is compressed.
*OBS
Only the observability tables are compressed.
Top

Examples

CPROBJ   OBJ(QGPL/*ALL)  OBJTYPE(*FILE)

This command compresses all display and printer files in library QGPL.

Top

Error messages

*ESCAPE Messages

CPF2110
Library &1 not found.
CPF2113
Cannot allocate library &1.
CPF2176
Library &1 damaged.
CPF3B01
Cannot compress or decompress object &1 in &2.
CPF3B02
Cannot compress or decompress file &1 in &2.
CPF3B03
No objects compressed.
CPF3B04
&1 objects compressed; &3 not compressed; &8 not included.
CPF3B08
Cannot allocate object &1 in &2.
CPF3B09
Not all subsystems ended.
CPF3B10
Cannot compress object &1 in &2 type *&3.
CPF3B11
Cannot compress object &1 in &2 type *&3.
CPF8108
Device file or save file &4 in &9 damaged.
CPF812E
Module &4 in &9 damaged.
CPF8129
Program &4 in &9 damaged.
CPF813D
Service program &4 in &9 damaged.
CPF8150
Panel group &4 in &9 damaged.
CPF8151
Menu &4 in &9 damaged.
CPF9570
Error occurred creating or accessing debug data.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9804
Object &2 in library &3 damaged.
CPF9806
Cannot perform function for object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9811
Program &1 in library &2 not found.
CPF9812
File &1 in library &2 not found.
CPF9821
Not authorized to program &1 in library &2.
CPF9822
Not authorized to file &1 in library &2.
CPF9838
User profile storage limit exceeded.
Top