Home page  
Help >
COPY for Definitions
Version 7.11
COPY for Definitions

Definition types, referred to below as "deftypes," are:

M -Menus G -GUI Reports
P -Procedures U -GUI Reports
R -Reports Q -Queries (Macros)
S -Screens RD -Record Descriptions
H -Help definitions

Form1:Definition-to-Definition
COPY deftype [FROM] defname1 [TO] defname2

Form2:Definition-to-File
COPY deftype [FROM] defname [TO] *filename

Form3:File-to-Definition
COPY deftype [FROM] *filename [TO] defname

Form4:Definition in another Catalog to Definition in current Catalog
COPY deftype [FROM] defname (full-path-AI-name) [TO] defname

Notation standards Options Answers

Options:
E -If an error occurs, do not abort the procedure
R -(Form 2 only) Suppress overstore notification
X -Suppress the command response
Y -Do not alter the command answer cells

Answers:
Ctl.Ans1 =1 if successful, 0 if not
Ctl.Ans2 =Zero
Ctl.Ans3 =Zero

Notes:
FROM and TO are optional and are allowed for readability. The source of the copy is always name1 and the target is always name2.

If name2 did not previously exist it is created by the COPY command.

Note the asterisks immediatly in front of (no blank) the file names in forms 2 and 3. That is how we know they are files and not definition names in the Catalog. The file names can be full path names. If the path is omitted, the current directory is assumed.

When COPY is executed in a procedure there is no overstore notification when the target is a definition name.

Use of the E option means if an error occurs, do not print an error message and do not terminate the current procedure. The application must check the %status variable to determine success or failure.

Copying definitions from another Catalog

Form 4 allows you to copy a definition that exists in another Catalog into your own. Just supply the full path name of the Application Interface where the source definition is known. This name is included in parenthesis just after the source definition name. There is a space between the source name and the parenthetical insert that contains the AI name.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.