Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Move Object (MOVOBJ) command removes an object from its currently assigned library and places it in a different library. The save and restore information is removed from the object description.
Note: The value of the Create authority (CRTAUT) parameter specified on the Create Library (CRTLIB) command for the to-library is not used. The ownership and public and private authorities of the object remain the same.
When the object type of the object to be moved is an object type which can be journaled, the existence and content of a data area named QDFTJRN in the to-library will determine whether or not journaling is started for the object. With the exception noted below in the considerations for moving an object from QTEMP to a primary or secondary ASP, if the object was journaled in the from-library, it will continue to be journaled in the to-library.
Note: For additional information regarding journaling, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Restrictions:
Note: For additional information regarding journaling, see the Journal Management information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
OBJ | Object | Qualified object name | Required, Positional 1 |
Qualifier 1: Object | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
OBJTYPE | Object type | *ALRTBL, *BNDDIR, *CHTFMT, *CLD, *CLS, *CMD, *CRQD, *CSI, *CSPMAP, *CSPTBL, *DTAARA, *DTAQ, *FCT, *FILE, *FNTRSC, *FNTTBL, *FORMDF, *FTR, *GSS, *IGCDCT, *IGCSRT, *JOBD, *JOBQ, *JRN, *JRNRCV, *LOCALE, *MEDDFN, *MENU, *MGTCOL, *MODULE, *MSGF, *MSGQ, *M36, *M36CFG, *NODGRP, *NODL, *OUTQ, *OVL, *PAGDFN, *PAGSEG, *PDFMAP, *PDG, *PGM, *PNLGRP, *PRDAVL, *PRDDFN, *PRDLOD, *PSFCFG, *QMFORM, *QMQRY, *QRYDFN, *RCT, *SBSD, *SCHIDX, *SPADCT, *SRVPGM, *SSND, *SVRSTG, *TBL, *USRIDX, *USRQ, *USRSPC, *VLDL, *WSCST | Required, Positional 2 |
TOLIB | To library | Name, *CURLIB | Required, Positional 3 |
ASPDEV | From ASP device | Name, *, *CURASPGRP, *SYSBAS | Optional |
TOASPDEV | To ASP device | Name, *ASPDEV, *, *CURASPGRP, *SYSBAS | Optional |
Top |
Specifies the object to be moved to another library.
This is a required parameter.
Qualifier 1: Object
Specify the name of the object to be moved.
Qualifier 2: Library
Top |
Specifies the object type of the object to be moved.
To see a complete list of object types when prompting this command, position the cursor on the field for this parameter and press F4 (Prompt). For a description of the object types, see "Object types" in the CL concepts and reference topic in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
This is a required parameter.
Top |
Specifies the library where the object is to be moved. The library QTEMP cannot be specified.
This is a required parameter.
Top |
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the library containing the object to be moved. If the library resides in an ASP that is not part of the library name space associated with the thread, this parameter must be specified to ensure the correct object is moved. If this parameter is used when *LIBL or *CURLIB is specified for the Library (OBJ) parameter, ASPDEV(*) is the only valid value.
Note: To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
Top |
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the to-library specified for the To library (TOLIB) parameter. If the to-library is in an ASP that is not part of the library name space associated with the thread, this parameter must be specified to ensure the correct object is moved. If this parameter is used when *CURLIB is specified for the TOLIB parameter, either TOASPDEV(*) must be specified or TOASPDEV(*ASPDEV) must be specified and the From ASP device (ASPDEV) parameter must be *.
Note: To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
Top |
Example 1: Moving an Object from the General Purpose Library
MOVOBJ OBJ(QGPL/X) OBJTYPE(*PGM) TOLIB(MY)
The general purpose library (QGPL) is searched for the X program (*PGM) object. The X program object is moved to the MY library. After this command is run, the X program object is no longer in the QGPL library.
Example 2: Moving an Object from a Library in the Library List
MOVOBJ OBJ(*LIBL/Y) OBJTYPE(*FILE) TOLIB(Z) -or- MOVOBJ Y *FILE Z
The library list (*LIBL) is searched for the Y file object. If more than one file object with the same name exists in the libraries making up the library list, the first Y file object found in the library list is moved to the Z library. After this command is run, the Y file object is no longer in the library where it was found.
Example 3: Moving an Object from a Library in an Independent Auxiliary Storage Pool (ASP) to a Library in a different ASP.
MOVOBJ OBJ(INVENTORY/MONTHLY) OBJTYPE(*PGM) TOLIB(WINVENTORY) ASPDEV(SALES) TOASPDEV(WSALES)
The INVENTORY library in the SALES independent auxiliary storage pool (ASP) is searched for the MONTHLY program object. The MONTHLY program object is moved to the WINVENTORY library in the WSALES ASP. After this command is run, the MONTHLY program object is no longer in the INVENTORY library in the SALES ASP. The SALES ASP and the WSALES ASP must have been activated (by varying on the ASP device) and have a status of 'Available'.
Top |
*ESCAPE Messages
Top |