CL Command Reference - MOVDOC
CL Command List > MOVDOC Reference
Description:
The Move Document (MOVDOC) command changes the path the system uses to search for a document. The document is not physically moved to another location of auxiliary storage, and a new object is not created.
Restrictions:
. You must be enrolled in the System Directory and have all (*ALL) authority to the document being moved and have change (*CHANGE) authority to both the FROM and TO folders (if applicable).
. To move a document to or from a folder, the user must have *CHANGE authority to the folder.
. Documents cannot be moved between folders that reside in different auxiliary storage pools (ASPs).
Examples:
Example 1: Adding a Folderless Document
MOVDOC FROMDOC(*SYSOBJNAM) FROMFLR(*NONE) TOFLR(FLR1)
RENAME(DOC1) SYSOBJNAM(CNTR192366)
This command, whose system object name is CNTR192366, adds a folderless document to FLR1 and names it DOC1.
Example 2: Moving a Document and Keeping its Name
MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(FLR2)
RENAME(*SAME)
This command moves DOC1 from FLR1 to FLR2 and keeps the name DOC1.
Example 3: Moving and Renaming a Document
MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(FLR2)
RENAME(DOC2)
This command moves DOC1 from FLR1 to FLR2 and renames it DOC2.
Example 4: Moving a Document and Making It Folderless
MOVDOC FROMDOC(DOC1) FROMFLR(FLR1) TOFLR(*NONE)
This command moves DOC1 from FLR1 and changes it to a folderless document.