Was this helpful?
copyapp in Command--Copy an Application into a Database
To copy an application into a database, use the copyapp in command.
This command has the following format:
copyapp in [-c] [-ddirname] [-nnewapplname] [-p] [-q] [-r]
         [-s[dirname ] |-a[dirname ] ] [-uusername]
         newdbname intfilename [-lfilename]
-c
Deletes the intermediate file
-ddirname
Indicates the directory that you have specified for the intermediate file
Provide the full directory pathname. The default is the current directory.
-nnewapplname
Lets you specify a new name for the application in the new database. The default is the same name as in the old database.
-p
Suppress messages about name conflicts. The default is to display messages.
-q
Causes copyapp to quit if there is any name conflict.
When this flag is set, no changes are made to the database if a name conflict is found.
If you specify the -q flag, copyapp is performed as a single transaction. The copyapp transaction locks system catalogs; for this reason, you must not specify -q when users are connected to the database. In addition, the transaction is logged in the log file; you must be sure that the log file is large enough to accommodate the copyapp transaction.
If neither -q or -r is specified and a duplicate name is encountered, the copy is not done and terminates with an error message. In this case, the application can exist in the new database in a partially copied state.
-r
Overwrites components with the same name.
If neither -q or -r is specified and a duplicate name is encountered, the copy is not done and terminates with an error message. In this case, the application can exist in the new database in a partially copied state.
-uusername
Identifies you to Ingres as the user with login name username, and transfers ownership of the application and its components to that user.
To use this option, you must be a privileged user.
If you are using Enterprise Access products, refer to your Enterprise Access documentation before using this parameter.
-s[dirname]
Specifies a new directory for source files. If a directory name is not specified, the current directory is used.
For Custom frames, copies 4GL source files.
For non-custom Vision frames, copyapp transfers no files. The frames are marked as new. The source files for these frames are regenerated at the next Image or Go operation.
Do not use this flag with the -a flag.
-a[dirname]
Specifies a new source directory name for the application, but does not transfer source files. If a directory name is not specified, the current directory is used.
This flag marks Vision (non-custom) frames as new. The source file is regenerated at the first Image or Go operation.
Do not use this flag with the -s flag.
newdbname
Specifies the name of the database into which the application is to be copied
intfilename
Specifies the name of the intermediate file
-lfilename
Creates a file containing a list of the names of source files for Custom frames only.
If -s is specified, the source files in this list (Custom frames) were copied.
If -a is specified, the source files in this list (Custom frames) were not copied.
Example: copyapp out and copyapp in commands
As an example of the copyapp command, assume that you want to move the Sales application from the Accounts database into the Newdb database. The following statement performs the first part of the task, copying the application into an intermediate text file called sales.tmp:
copyapp out -tsales.tmp accounts sales
After copyapp copies the application into the sales.tmp file, you can copy sales.tmp into the Newdb database by executing the following command:
copyapp in -a newdb sales.tmp
Copy the Vision "new_emp" application from the "employee" database to the "employee2" database. Use the default intermediate text file, and use the current working directory as the new application's source directory.
copyapp out employee new_emp
copyapp in -a employee2 iicopyapp.tmp
Last modified date: 08/14/2024