| Create Duplicate Object (CRTDUPOBJ) command in AS400 |
Introduction
The CRTDUPOBJ command allows us to copy an exact replica of an object from one library to the other. We can copy a single or the group of objects using this CRTDUPOBJ command. Please note that the new object must be renamed if it is going to be created in the same library in which the original object resides.
You can copy a group of objects by specifying generic names or by names starting with some letter let's say TEST* or you can specify *ALL or specify more than one object type.
CRTDUPOBJ command parameters
Create Duplicate Object (CRTDUPOBJ)
Type choices, press Enter.
From object . . . . . . . . . . OBJ
From library . . . . . . . . . . FROMLIB
Object type . . . . . . . . . . OBJTYPE
+ for more values
To library . . . . . . . . . . . TOLIB *FROMLIB
New object . . . . . . . . . . . NEWOBJ *OBJ
From ASP device . . . . . . . . ASPDEV *
To ASP device . . . . . . . . . TOASPDEV *ASPDEV
Duplicate data . . . . . . . . . DATA *NO
Duplicate constraints . . . . . CST *YES
Duplicate triggers . . . . . . . TRG *YES
Duplicate file identifiers . . . FILEID *NO
Duplicate access control . . . . ACCCTL *ALL
Duplicate data . . . . . . . . . DATA *NO
CRTDUPOBJ command on Logical File
There are two cases possible when copying a logical file from one library to the other.