Copy DST Repository Object (CPYDSTRPSO)

The Copy Distribution Repository Object (CPYDSTRPSO) command is used to copy an object residing in the distribution repository to a library or folder. The object type of the object specified must match the information in the distribution repository.

Parameters

Keyword Description Choices Notes
GLBNAME Global name Element list Required, Positional 1
Element 1: Global name token 1 Character value, *NETID, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 2: Global name token 2 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 3: Global name token 3 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 4: Global name token 4 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 5: Global name token 5 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 6: Global name token 6 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 7: Global name token 7 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 8: Global name token 8 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 9: Global name token 9 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
Element 10: Global name token 10 Character value, *ANY, *HIGHEST, *LOWEST, *NETID, *CPNAME, *SERVER, *TARGET, *MDDATE, *MDTIME
OBJ Object Qualified object name Optional, Positional 2
Qualifier 1: Object Name
Qualifier 2: Library Name, *LIBL, *CURLIB
MBR Member Name, *ALL, *FIRST Optional, Positional 3
DLO Document library object Character value Optional, Positional 4
FLR Folder Character value Optional, Positional 5
STMF Stream file Path name Optional, Positional 6
REPLACE Replace or add existing data *YES, *ADD, *NO Optional

Global name (GLBNAME)

Specifies the tokens of the global name used to find the unique catalog entry to be copied.

A global name should consist of at least two tokens.

This is a required parameter.

The possible values for token 1 are:

*NETID
The first global name token value is a network ID generated by the command from the network attributes.
global-name-token 1
Specify the first token of the global name.

The first token must be the registered enterprise ID or network ID. The values of tokens 2 through 10 are assigned by the authority identified by the name in the first token.

The possible values for tokens 2 through 10 are:

*ANY
The corresponding token value is ignored.
*HIGHEST
The catalog entry with the highest corresponding token value is selected. The version attribute of the token must be: *ORDCHAR, *ORDDATE, *ORDDEC, or *ORDTIME.
*LOWEST
The catalog entry with the lowest corresponding token value is selected. The version attribute of the token must be: *ORDCHAR, *ORDDATE, *ORDDEC, or *ORDTIME.
*NETID
The global name token n value is a network ID. This value is generated from the network attributes.
*CPNAME
The global name token value is a control point name. This value is generated from the network attributes.
*SERVER
This token is stored within the change request activity with the value &SERVER, and replaced by the short name of the change control server when the object is distributed.
*TARGET
This token is stored within the change request activity with the value &TARGET, and replaced by the short name of the target when the object is distributed.
*MDDATE
This token is stored within the change request activity with the value &DATE, and replaced when distributed by the date the object was last modified.
*MDTIME
This token is stored within the change request activity with the value &TIME, and replaced when distributed by the time the object was last modified.
global-name-token
Specify a token of the global name. This field is left adjusted and padded on the right with blanks.

Object (OBJ)

Specifies the object and library into which the repository object is copied. The distribution repository object cannot be copied into the QTEMP library.

The name of the repository object can be qualified by one of the following library values:

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library to be searched.
object-name
Specify the name of the object into which the repository object is copied.

Member (MBR)

Specifies the file member name into which the repository object is copied. This value is valid when the distribution repository object type is a file.

*ALL
The entire file is copied into the file specified on the OBJ parameter. This value is not valid for object type *FILEDATA.
*FIRST
The first member in the file receives the member. If *FIRST is specified and a member does not exist, a member is created with the name of the file specified on the OBJ parameter.
member-name
Specify the name of the file member into which the data is copied.

Document library object (DLO)

Specifies the document name into which the distribution repository object is copied. The document name and the folder path must be specified to copy a document. Only folder name (FLR parameter) is required to copy a folder. This parameter is valid only when the distribution repository object being copied is a document.

Folder (FLR)

Specifies the folder name into which the distribution repository object is copied. This parameter is required when the distribution repository object being copied is a document or a folder.

folder-name
Specifies the name of the folder path in which the documents are copied (for object type *DOC) or folder name is to be copied (for object type *FLR).

Stream file (STMF)

Specifies the stream file into which the distribution repository object is copied.

object-path-name
Specifies the path name of the stream file into which the data is copied. The length of the path name can be up to 5000 characters. This parameter can be specified only when the distribution repository object being copied contains a stream file (*STMF), a file data (*FILEDATA), or a non-supported i5/OS object type. Additional information about path names is in the Integrated File System Introduction book.

Replace or add existing data (REPLACE)

Specifies whether existing data is replaced or add records to the file members.

*NO
Existing objects remain unchanged. New objects are created with the data.
*YES
Existing objects are replaced with the new data. New objects are created and the user is given the proper authority to the object.
*ADD
Existing members are added to the new records after the existing members. When a target file member does not exist, it will be created. The file that contains the members must exist.

Examples

Example 1: Copying a Distribution Repository File

CPYDSTRPSO   GLBNAME(ABC *LOWEST *HIGHEST *ANY ROLLM)
             OBJ(*LIBL/MYFILE)  REPLACE(*YES)

This command copies a file from the distribution repository to the local object MYFILE. The file must meet the search criteria for the global name specified. If the object exists, it is replaced. If more than one catalog entry matches, the request is rejected.

Example 2: Copying a Distribution Repository Document

CPYDSTRPSO   GLBNAME(NETID *LOWEST *HIGHEST *ANY ROLLM)
             DLO(STATUS)  FLR(MNPS1/SALES.APR)  REPLACE(*NO)

This command copies a document from the distribution repository to the document STATUS in folder path MNPS1/SALES.APR. The document must meet the search criteria for the global name specified. If the document exists, the copy is rejected. If the document is new, it is created. The folder path must already exist. If more than one catalog entry matches the search criteria, the request is rejected.

Example 3: Copying a Distribution Repository Folder

CPYDSTRPSO   GLBNAME(NETID *LOWEST *HIGHEST *ANY ROLLM)
             FLR(MNPS1/SALES.APR)  REPLACE(*YES)

This command copies a folder from the distribution repository to the folder MNPS1/SALES.APR. The folder must meet the search criteria for the global name specified. If the folder exists, it is replaced with the new information. If the folder does not exist it is created. If more than one catalog entry matches the search criteria, the request is rejected.

Example 4: Copying a Stream File to the Root File System

CPYDSTRPSO   GLBNAME(STREAM FILE EXAMPLE)
             STMF('/Dir1/Dir2/Dir3/UsrFile')
             REPLACE(*YES)

This command copies an object residing in the distribution repository to a stream file specified in the object path name. If the stream file exists, it is replaced with the new information. If the stream file does not exist, it is created. If more than one catalog entry matches the search criteria, the request is rejected.

Example 5: Adding Members When Copying a File

CPYDSTRPSO   GLBNAME(ADD FILE MEMBERS)  OBJ(MYLIB/MYFILE)
             MBR(MYMBR)  REPLACE(*ADD)

This command adds records to the MYLIB/MYFILE/MYMBR member.

Error messages

*ESCAPE Messages

CPF2111
Library &1 already exists.
CPF2112
Object &1 in &2 type *&3 already exists.
CPF2132
Object &1 already exists in library &2.
CPF2146
Owner of object &1 and object being replaced not the same.
CPF2176
Library &1 damaged.
CPF2232
Not authorized to user profile &1.
CPF2233
No delete authority to user profile &1.
CPF2451
Message queue &1 is allocated to another job.
CPF2802
From-file &1 in &2 not found.
CPF2813
File &1 in &2 not available.
CPF2861
To-file &1 in &2 not found or not created.
CPF2868
Member or label not found or suspended in from-file.
CPF3130
Member &2 already in use.
CPF3204
Cannot find object needed for file &1 in &2.
CPF3218
Cannot allocate object needed for file &1 in &2.
CPF3731
Cannot use &2 &1 in library &3.
CPF3733
&2 &1 in &3 previously damaged.
CPF3737
Save and restore data area &1 not found.
CPF3738
Device &1 used for save or restore is damaged.
CPF3761
Cannot use &2 &1 in &3.
CPF3764
&2 &1 in &3 not found.
CPF3767
Device &1 not found.
CPF3780
Specified file for library &1 not found.
CPF3781
Library &1 not found.
CPF3812
Save file &1 in &2 in use.
CPF4128
Not able to allocate objects needed for file &2 in library &3 member or program device &4.
CPF5729
Not able to allocate object &1.
CPF5813
File &1 in library &2 already exists.
CPF7302
File &1 not created in library &2.
CPF81xx
Damaged object error messages.
CPF8A14
&2 of type &4 not renamed to &3 in folder &1.
CPF8A23
Folder &1 is not empty.
CPF8A75
Not authorized to access folder &1.
CPF8A77
Folder &1 not found.
CPF8A78
Folder &1 in use.
CPF8A80
Document &2 in use in folder &1.
CPF8A82
Document &2 not found in folder &1.
CPF8A83
Not authorized to access document &2 in folder &1.
CPF8A87
Document name &2 not correct.
CPF8A88
Operation not allowed on document &2 in folder &1.
CPF8A89
Document &2 in folder &1 is logically damaged.
CPF8A97
Folder name &1 not correct.
CPF9005
System resource required to complete this request not available.
CPF9006
User not enrolled in system distribution directory.
CPF9009
System requires file &1 in &2 be journaled.
CPF9012
Start of document interchange session not successful for &1.
CPF901F
*AUTL was specified for a user other than *PUBLIC.
CPF9029
Not allowed to specify owner profile &1.
CPF9031
No authority to specify DLO(*ALL).
CPF9032
Document interchange session not started.
CPF903A
Document or folder activity not stopped, requested operation cannot be done.
CPF9048
Ownership of &2 document library objects changed to profile &1; &3 not changed.
CPF9073
No authority to view or change the security of document library object &1.
CPF908A
Requester &1 not enrolled.
CPF908E
&1 objects changed; &2 objects not changed.
CPF909A
Document &2 in folder &1 is damaged.
CPF9095
Folder &1 is damaged.
CPF90B8
No authority to specify a reference object for document library object &1.
CPF9801
Object &2 in library &3 not found.
CPF9803
Cannot allocate object &2 in library &3.
CPF9804
Object &2 in library &3 damaged.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9809
Library &1 cannot be accessed.
CPF9810
Library &1 not found.
CPF9811
Program &1 in library &2 not found.
CPF9812
File &1 in library &2 not found.
CPF9814
Device &1 not found.
CPF9830
Cannot assign library &1.
CPF9831
Cannot assign device &1.
CPF9838
User profile storage limit exceeded.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
MSS0111
Distribution repository object not available.
MSS0114
Not authorized to distribution catalog.
MSS0116
Maximum global name length exceeded.
MSS0117
Global name token &3 not valid. Reason code &4.
MSS011B
Distribution catalog entry not found.
MSS011C
Distribution catalog not available.
MSS011D
More than one distribution catalog entry found.
MSS0123
Internal processing error occurred.
MSS0124
Error while managing distribution catalog.
MSS0125
Distribution catalog damaged.
MSS0151
Distribution repository object not copied.
MSS0153
Distribution repository object does not exist.
MSS0154
Object &1 already exists.
MSS0157
Not authorized to copy repository object.
MSS0158
Document &1 already exists.
MSS0159
Member &1 already exists.
MSS015D
REPLACE(*YES) not valid with specified global name.
MSS015E
Library name required.
MSS015F
Data not copied.
MSS0161
Library QTEMP not valid.
MSS0162
Object types do not match.
MSS0163
Distribution repository object not found.
MSS0164
Record length for file &2 too short.
MSS0165
Object cannot be decompressed.
MSS0166
Folder already exists.
MSS0168
Repository object contains more than one member.
MSS016D
Object could not be decompressed.
MSS016E
MBR(*ALL) not valid with object type &1.
MSS0175
REPLACE(*ADD) only valid for physical files.
MSS019A
Repository object not copied.
MSS01D1
Library must be QSYS.
MSS01D3
Object types do not match.
MSS01D6
Length of global name token &3 not valid.
MSS01D7
Value of global name token &3 not valid.
MSS01D8
Global name not valid.