Command reference / object
MOVOBJ
Move Object
Removes an object from its currently assigned library and places it in a different library, and removes the save and restore information from the object description. The CRTAUT value of the to-library is not used; the object's ownership and public and private authorities stay the same. Journaling of the object may change based on the to-library's journal inherit rules or the QDFTJRN data area.
Allowed environments: *ALL.
Positional parameters: 3.
Restrictions
- For an object other than *FILE, you need *OBJMGT on the object, *DLT and *READ on the from-library, and *ADD and *READ on the to-library.
- For a *FILE object, you need *OBJMGT and *OBJOPR on the object, *DLT, *ADD, and *EXECUTE on the from-library, and *ADD and *READ on the to-library.
- Libraries, user profiles, edit descriptions, line descriptions, controller descriptions, device descriptions, journals, and journal receivers cannot be moved.
- The system operator message queue QSYSOPR, all work station user message queues, and the system log QHST cannot be moved.
- The to-library must not already contain an object of the same name and type.
- The to-library cannot be QTEMP.
- *USRSPC, *USRIDX, and *USRQ objects can only be moved into libraries permitted by system value QALWUSRDMN, unless created as system domain objects.
- In general, objects cannot move between different ASPs; exceptions include certain save files in a basic user ASP, objects in a secondary ASP moved to the primary ASP's QRPLxxxxx library in the same ASP group, and QTEMP objects moved to a primary or secondary ASP (accomplished by save and restore, with a size limit of under 1 terabyte).
Parameters
OBJ
Object
Specifies the object to be moved to another library. This is a required parameter. Qualifier 1 is the object name; qualifier 2 is the library name.
*LIBL- All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB- The current library for the thread is searched; if none is set, the QGPL library is searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Object
Object
Library
Library
Suggested / special values:
*LIBL, *CURLIB
OBJTYPE
Object type
Specifies the object type of the object to be moved. This is a required parameter.
Allowed values:
*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
TOLIB
To library
Specifies the library where the object is to be moved. The library QTEMP cannot be specified. This is a required parameter.
Suggested / special values:
*CURLIB
*CURLIB- The object is moved to the current library; if no current library exists in the library list, the QGPL library is used.
ASPDEV
From ASP device
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the library containing the object to be moved.
Suggested / special values:
*, *CURASPGRP, *SYSBAS
*- The ASPs currently part of the thread's library name space are searched, including the system ASP, all basic user ASPs, and the thread's ASP group primary and secondary ASPs.
*CURASPGRP- If the thread has an ASP group, its primary and secondary ASPs are searched; the system and basic user ASPs are not. An error is issued if there is no ASP group.
*SYSBAS- The system ASP and all basic user ASPs are searched; no primary or secondary ASPs are searched.
TOASPDEV
To ASP device
Specifies the auxiliary storage pool (ASP) device where storage is allocated for the to-library specified on the TOLIB parameter.
Suggested / special values:
*ASPDEV, *CURASPGRP, *SYSBAS
*ASPDEV- The ASP device specified for the ASPDEV parameter is searched to find the library.
*- The ASPs currently part of the thread's library name space are searched, including the system ASP, all basic user ASPs, and the thread's ASP group primary and secondary ASPs.
*CURASPGRP- If the thread has an ASP group, its primary and secondary ASPs are searched; the system and basic user ASPs are not.
*SYSBAS- The system ASP and all basic user ASPs are searched; no primary or secondary ASPs are searched.
Examples
MOVOBJ OBJ(QGPL/X) OBJTYPE(*PGM) TOLIB(MY)
Searches QGPL for the X program and moves it to the MY library, so it is no longer in QGPL.
MOVOBJ OBJ(INVENTORY/MONTHLY) OBJTYPE(*PGM) TOLIB(WINVENTORY) ASPDEV(SALES) TOASPDEV(WSALES)
Moves the MONTHLY program from the INVENTORY library in the SALES ASP to the WINVENTORY library in the WSALES ASP; both ASPs must be varied on and Available.
Generated from os/cl/catalog/MOVOBJ.json and os/cl/help/MOVOBJ.json.