This statement cancels any “copy pending” state in the spaces after a foreign copy. Changes the database status after PREPARE-FOREIGN-COPY with physical closure of the database files.
Scope of validity
DBH administration
See also
DBH administration statement PREPARE-FOREIGN-COPY on "PREPARE-FOREIGN-COPY"
DBH administration statement BEGIN-LOCK-SEQUENCE on "BEGIN-LOCK-SEQUENCE"
DBH administration statement END-LOCK-SEQUENCE on "END-LOCK-SEQUENCE"
Function
Use the END-FOREIGN-COPY statement to cancel any “copy pending” state which has been created by placing a utility statement preceding the foreign copy.
If the database is in the CLOSED status as a result of PREPARE-FOREIGN-COPY with physical closure of the database, the database is checked. If the database if unchanged, it is assigned the ACTIVE status. If the database has been changed, it is assigned the FREE status and its resources are released.
If the statement is issued in a lock sequence, the locks on the database entries and spaces are not canceled until the lock sequence is terminated. Lock sequences can be opened with BEGIN-LOCK-SEQUENCE and terminated with END-LOCK-SEQUENCE.
The statement END-FOREIGN-COPY can also be specified without the prior statement PREPARE-FOREIGN-COPY. If END-FOREIGN-COPY is not preceded by the statement PREPARE-FOREIGN-COPY, the “copy pending” state will be cancelled from all catalog spaces.
If a preceding PREPARE-FOREIGN-COPY statement is used in the same administration session, the statement END-FOREIGN-COPY will only be active in the spaces entered in the PREPARE-FOREIGN-COPY statement.
If several PREPARE-FOREIGN-COPY statements have been specified, END-FOREIGN-COPY only acts on the last PREPARE-FOREIGN-COPY statement specified.
END-FOREIGN-COPY | ||||||||||||||||||||
|
Operands
SELECT =
Specifies whether the entry is identified by means of the logical or physical name.
SELECT = *LOGICAL(...)
Selects the database in whose space the “copy pending” state is to be canceled.
CATALOG-NAME =
<filename 1..18 without-cat-user-gen-vers>
Logical name of the database
SELECT = *PHYSICAL(...)
Selects the database in whose space the “copy pending” state is to be canceled.
PHYS-CATALOG-NAME =
<filename 1..18 without-cat-user-gen-vers>
Physical name of the database
Administration command in ISP format and at the CALL DML interface
The FCOPY,END administration command corresponds to the END-FOREIGN-COPY administration statement here.
FCOPY,E[ND],name
name ::= {C[ATALOG]=catalog-name|P[HYSICAL-NAME]=physical-name}
You can specify the logical name of the database in catalog-name using up to 18 characters.
You can specify the physical name of the database in physical-name using up to 18 characters.