Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
Top |
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 |
Top |
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:
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:
Top |
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:
Top |
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.
Top |
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.
Top |
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.
Top |
Specifies the stream file into which the distribution repository object is copied.
Top |
Specifies whether existing data is replaced or add records to the file members.
Top |
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.
Top |
*ESCAPE Messages
Top |