copyapp in Command--Copy an Application into a Database
To copy an application into a database, issue the following command at the system prompt.
This command has the following syntax:
copyapp in [-c] [-ddirname] [-nnewapplname] [-p] [-q] [-r]
[-s[dirname]|-a[dirname]] [-uusername]
newdbname intfilename [-lfilename]
-c
Deletes (cleans up) the intermediate file
-ddirname
Indicates that the intermediate file is in the named directory. Provide the full directory name. Default: the current directory.
-nnewapplname
Gives the application the specified new name in the new database. Default: keep the same name.
-p
Suppresses messages about name conflicts. Default: issue message upon finding a name conflict.
-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
Requests that ABF pretend you are the user with login name username. You must be a privileged user to use this flag.
Transfers ownership of the application and application components to username.
If you are using Enterprise Access Products (formerly Gateways), see 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 ABF applications, copies 4GL source files.
For Vision applications, copies only 4GL source files for Custom frames. 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 to be copied into
intfilename
Specifies the name of the intermediate file
-lfilename
Creates a file containing a list of the names of the source files. For Vision applications, the list includes only Custom frames.
If -s is specified the source files in this list were copied. If -a is specified, the source files in this lists were not copied.
As an example of the copyapp command, suppose 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 a text file called sales.tmp:
copyapp out -tsales.tmp accounts sales
Once 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 newdb sales.tmp
Last modified date: 08/14/2024