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

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.

Type
*QUAL
Required
Yes
Case
Uppercase
*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

Type
*NAME
Required
No
Length
10
Case
Uppercase

Library Library

Type
*NAME
Required
No
Default
*LIBL
Length
10
Case
Uppercase

Suggested / special values: *LIBL, *CURLIB

OBJTYPE Object type

Specifies the object type of the object to be moved. This is a required parameter.

Type
*CHAR
Required
Yes
Length
7
Case
Uppercase

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.

Type
*NAME
Required
Yes
Length
10
Case
Uppercase

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.

Type
*NAME
Required
No
Default
*
Length
10
Case
Uppercase

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.

Type
*NAME
Required
No
Default
*ASPDEV
Length
10
Case
Uppercase

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.

IBM command documentation

Generated from os/cl/catalog/MOVOBJ.json and os/cl/help/MOVOBJ.json.