Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Package Installable Object (PKGINSOBJ) command saves a copy of one or more objects of any file system and the associated name of the target library, folder or path where they must be created into an installable object. It also creates a distribution catalog entry and loads the installable object that contains the saved objects into the distribution repository.
Restrictions:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
GLBNAME | Global name | Element list | Required, Positional 1 |
Element 1: Global name token 1 | Character value, *NETID | ||
Element 2: Global name token 2 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 3: Global name token 3 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 4: Global name token 4 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 5: Global name token 5 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 6: Global name token 6 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 7: Global name token 7 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 8: Global name token 8 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
Element 9: Global name token 9 | Character value, *DATE, *TIME, *NETID, *CPNAME | ||
OBJ | Objects | Values (up to 300 repetitions): Element list | Optional, Positional 2 |
Element 1: Name | Path name, * | ||
Element 2: Include or omit | *INCLUDE, *OMIT | ||
Element 3: Install to | Path name, *SAME | ||
SUBTREE | Directory subtree | *ALL, *DIR, *OBJ | Optional |
TGTRLS | Target release | *CURRENT, *PRV, V5R2M0, V5R3M0, V5R4M0 | Optional |
AUTL | Authorization list | Name, QCQRPSAUTL | Optional |
Top |
Specifies the token values of the global name. The global name is the name by which the object is known in a system network architecture (SNA) network. The global name can be a maximum of 65-n characters in length, where n is the number of tokens. A maximum of 9 tokens can be specified and each token can be a maximum of 16 characters in length.
Valid tokens consist of uppercase letters A through Z and numbers 0 through 9. The special characters #, $, or @ may be used. In multi-lingual networks, language translation may make the value not valid when the special characters are used. Use of these characters is not recommended.
Element 1: Token 1
Elements 2-9: Tokens 2-9
Top |
Specifies the objects to package and where they will be installed. A maximum of 300 object patterns can be specified.
Element 1: Object Name
Element 2: Include or Omit
The second element specifies whether names that match the pattern should be included or omitted from the operation.
Element 3: Install to
Specify where the object will be installed.
Top |
Specifies whether the directory subtrees are included in the save operation.
Note:
When *OBJ is specified in the SUBTREE parameter and install-to is *SAME, the object name pattern must exist in the managed system in order to be installed.
Top |
Specifies the release of the operating system on which you intend to use the objects.
Top |
Specifies the name of the authorization list of the objects.
Top |
Example 1: Packaging All Objects in Current Directory and Subdirectories
PKGINSOBJ GLBNAME(PACKAGE CURRENT DIRECTORY REF 001) OBJ(('*' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all the objects in the current directory and its subdirectories. When installed, the packaged objects are created in the current directory of the user under which the install request runs. The default OBJ value can be used. The current directory is resolved during the packaging.
Example 2: Packaging All Objects in Current Directory
PKGINSOBJ GLBNAME(PACKAGE CURRENT DIRECTORY NO SUBDIR REF 002) OBJ(('*' *INCLUDE *SAME)) SUBTREE(*OBJ) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all the objects in the current directory but not in the subdirectories. The current directory is resolved during the packaging. The objects are installed in the directory specified in the path name that must already exist in the managed system at the time of the installing.
Example 3: Packaging All Objects in Specified Directory
PKGINSOBJ GLBNAME(PACKAGE A DIRECTORY OMITTING REF 001) OBJ(('/A' *INCLUDE *SAME)) ('/A/B/C' *OMIT)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all the objects in directory /A and its subdirectories, except those in directory /A/B/C. If the directory does not already exist, when the objects are installed, the directory /A is created including its subdirectories and their objects.
Example 4: Packaging All Files
PKGINSOBJ GLBNAME(PACKAGE ALL FILES IN MYLIB REF 003) OBJ(('/QSYS.LIB/MYLIB.LIB/*.FILE' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all files in MYLIB. When it is installed, the library MYLIB is created, including its objects.
Example 5: Packaging Object in One Library and Installing Object in Another Library
PKGINSOBJ GLBNAME(RENAMING OBJECTS WHEN INSTALLING REF 001) OBJ(('MyDir/X.PGM' *INCLUDE 'YourDir/Y.PGM')) SUBTREE(*ALL) TGTRLS(*PRV) AUTL(QCQRPSAUTL)
This command packages program X from MyDir and installs the object in YourDir with Y name. The system where it will be installed is in the previous release.
Example 6: Packaging Objects in Different File Systems
PKGINSOBJ GLBNAME(PACKAGE A FILE REF 01) OBJ(('/MyDir/MyFile' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
PKGINSOBJ GLBNAME(PACKAGE A DATABASE REF 01) OBJ(('/QSYS.LIB/MYLIB.LIB/MYFILE.FILE' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
PKGINSOBJ GLBNAME(PACKAGE A DOCUMENT REF 03) OBJ(('/QDLS/MYFLR/MYDOC' *INCLUDE *SAME)) SUBTREE(*OBJ) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages a stream file MyFile, a database file MYFILE, and a document MYDOC.
For the examples that follow, the following directory should be taken into account:
/A/B /A/C /A/D /A/A1 /A/A1/E /A/A1/F /A/A1/G /A/A1/A2 /A/A1/A2/H /A/A1/A2/I /A/A1/A2/J
Example 7: Packaging All Objects from Previous Path Name
PKGINSOBJ GLBNAME(PACKAGE ALL OBJECTS REF 001) OBJ(('../*' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all the objects from the previous path name.
Example 8: Packaging All Objects in the First Level of Each Directory
PKGINSOBJ GLBNAME(PACKAGE FIRST LEVEL OBJECTS REF 001) OBJ(('/A' *INCLUDE *SAME)) SUBTREE(*DIR) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all the objects in the first level of each directory that matches the object name pattern. The objects that are packaged are:
/A/B /A/C /A/D /A/A1 /A/A1/E /A/A1/F /A/A1/G /A/A1/A2
Example 9: Packaging Only Objects in the Directory
PKGINSOBJ GLBNAME(PACKAGE ONLY OBJECTS REF 001) OBJ(('/A' *INCLUDE *SAME)) SUBTREE(*OBJ) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages only the objects in the directory. The objects that are packaged are:
/A/B /A/C /A/D /A/A1
Example 10: Packaging All Objects in the User OTHERUSER Home Directory
PKGINSOBJ GLBNAME(PACKAGE OTHER HOME DIR REF 01) OBJ(('/HOME/OTHERUSER' *INCLUDE *SAME)) SUBTREE(*ALL) TGTRLS(*CURRENT) AUTL(QCQRPSAUTL)
This command packages all objects from the OTHERUSER home directory.
Top |
*ESCAPE Messages
Top |