The copyapp commands copy an application, created with Applications-By-Forms or Vision, from one database to another.
The copyapp out command copies information about the application and its objects to an intermediate text file. The copyapp in command transfers the information from the text file into a database. For more information on these commands, see the Forms-based Application Development Tools User Guide.
The copyapp out command has the following format:
copyapp out dbname |vnode::dbname[/server_class] applname [-ddirname]
[-tintfilename] [-lfilename] [-uusername]
Specifies the name of the database. Also specifies the vnode and server_class, if required, as described in Standard Flags and Parameters.
Specifies the name of the application to be copied.
Specifies the directory in which to create the intermediate text file; the default is the current directory.
Specifies the intermediate text file filename; the default file name is iicopyapp.tmp.
Creates a file containing the names of the source files to be copied. For Vision applications, the list includes only custom frames.
Specifies the effective user for the session, as described in Standard Flags and Parameters.
The copyapp in command has the following format:
copyapp in newdbname |vnode::dbname[/server_class] [-nnewapplname] [-ddirname]
intfilename [-lfilename] [-c] [-p] [-q] [-r] [-s[dirname]|-a[dirname]]
[-uusername]
Specifies the name of the database into which the application is to be copied. Also specifies the vnode and server_class, if required, as described in Standard Flags and Parameters.
Specifies the name to be assigned to the application in the new database. The default is the same name as in the old database.
Specifies the directory where the intermediate text file is located; the default is the current directory.
Specifies the name of the intermediate file previously created by the copyapp out. This will be iicopyapp.tmp unless a different intermediate file name was designated with the –t flag of copyapp out.
Creates a file containing a list of source files that were copied (or processed if the –a flag was specified). For Vision applications, the list includes only custom frames.
Specifies that the intermediate text file should be deleted.
Suppresses messages about name conflicts. The default is to display messages.
Specifies that copyapp will be performed as a single transaction. If there is a duplicate name conflict, all changes are rolled back. If you specify the –q flag, copyapp locks system catalogs; for this reason, you should not specify –q when users are connected to the database. In addition, the transaction is logged in the log file; you should be sure that the log file is large enough to accommodate the copyapp transaction.
Specifies that objects with the same name should be replaced (overwritten). By default, duplicate names are not overwritten; instead, the copy is not completed and terminates with an error message.
Specifies a new directory for source files. If dirname is omitted, the current working directory is used as the new application's source directory. This flag transfers 4GL source for custom Vision frames, but does not transfer source for non-custom Vision frames. Instead, it marks these frames as new, and source for these frames is regenerated on the next Go or Image operation.
This flag is intended for Vision applications. You cannot specify both the –a and the –s flags. For Vision applications that contain non-custom frames, be sure to use the -a or –s flag; if you do not, all frames are marked as custom frames.
Specifies a new source directory for the application, but does not copy source files. If dirname is omitted, then the current working directory is used as the new application's source directory. Any Vision frames are marked as new; source for these frames is regenerated on the next Go or Image operation.
This flag is intended for Vision applications. You cannot specify both the –a and the –s flags.
Specifies the effective user for the session, as described in Standard Flags and Parameters.
The following commands 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 source directory for the new application:
copyapp out employee new_emp
copyapp in –a employee2 iicopyapp.tmp