COPY [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
COPY
Copies a database.
Syntax
COPY OldBaseName [ NewBaseName] [(REPLACE)]
Parameters
OldBaseName is the name of the existing database to be copied.
The OldBaseName can be fully qualified using the MPE
XL file name conventions of Name.Group.Account.
NewBaseName is the name of the new copy of the database. The
NewBaseName can only be qualified with the MPE XL
Group name. If this parameter is omitted, the
OldBaseName is used, and the database is placed in
the logon group.account. The same file capability in
the target group is required.
(REPLACE) allows you to overwrite an existing database with the
same name as NewBaseName. In interactive mode, if
this parameter is omitted, you are prompted with a
REPLACE confirmation. In batch mode, you are not
prompted.
Description
Use this command to copy a database. The COPY command copies a database
from any account and places it in any group within the current logon
account; therefore, you must log on to the system as the database creator
in the account where the database copy will reside.
The COPY command cannot be issued while a change file is open, that is,
after a BASE command is issued. The copying process must be done
independently from all other DBChange Plus restructuring.
Security
To successfully copy a database, you must have the following MPE XL
security capabilities:
Table 10-3. Required MPE XL Security Capabilities
--------------------------------------------------------------------------------------------
| | |
| Copying Ability | MPE XL Security |
| | |
--------------------------------------------------------------------------------------------
| | |
| Copying any database from any account | SM or [OP+PM] |
| | |
--------------------------------------------------------------------------------------------
| | |
| Copying any database from within the logon account | AM |
| | |
--------------------------------------------------------------------------------------------
| | |
| Copying any database created by user | Creator |
| | |
--------------------------------------------------------------------------------------------
When copying a database from another account with only OP+PM
capabilities, you must first pass MPE XL security or have the database
released.
Example
:hello kelly.testacct.testgrp
:dbcplus
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
FRI, JUN 15, 1990, 3:00 PM
>copy orders.shipping.database
copy ORDERS.SHIPPING.DATABASE ==> ORDERS.TESTGRP.TESTACCT [y/N]? y
Database ORDERS.TESTGRP.TESTACCT already exists. Replace [y/N]? y
HP36386 (A.00.00) DBALTER (c) COPYRIGHT Hewlett-Packard Co. 1985
Data set DATE-MASTER : successfully copied.
Data set CUSTOMER : successfully copied.
Data set SUP-MASTER : successfully copied.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
In this example, the database ORDERS is copied from the SHIPPING
account and DATABASE group to the current logon group and account
(TESTGRP.TESTACCT). You are prompted to proceed with the copy and whether
or not to replace the existing ORDERS database. DBAPLUS is automatically
invoked to complete the copying process, and the DBChange prompt is
returned.
MPE/iX 5.0 Documentation