Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : DIFF_DEFN

DIFF_DEFN
Compares the definitions of two objects and list the differences. (F)
Invocation
differences = DIFF_DEFN(objecttype, instance1, library1, environment1, location1, instance2, library2, environment2, location2, details)
 
Usage Notes
DIFFDEFN is the version of this tool used on the developer’s workbench.
In the output, the letters D and I indicate which items should be deleted or inserted to make the definition of instance2 match the definition of instance1.

Exceptions
 
Example
The DIFF_DEFN_1 rule compares the definitions of two tables and sends a detailed listing of differences to the message log.

 
RULE EDITOR ===> SCROLL: P
DIFF_DEFN_1;
_ LOCAL DIFFERENCES;
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ DIFFERENCES = DIFF_DEFN('TABLE', 'EMPLOYEES', '', '', '', | 1
_ 'EMPLOYEES_REMOTE', '', '', '', 'Y'); |
_ ---------------------------------------------------------------------------

 
The following message log is produced:

 
------------------------- INFORMATIONAL MESSAGE LOG ---------------------------
COMMAND ===> SCROLL ===> P
SOURCE TABLE C KEYFIELD (NAME) REASON
-------------------------- - --------------------------- ----------------------
FIELDS(EMPLOYEES) D LNAME (KEYTYPE) = S
FIELDS(EMPLOYEES_REMOTE) I LNAME (KEYTYPE) = ---
 
SOURCE TABLE C KEYFIELD (NUMBER) REASON
-------------------------- - --------------------------- ----------------------
PARMS(EMPLOYEES_REMOTE) I 2
 
SOURCE TABLE C KEYFIELD (NAME) REASON
-------------------------- - --------------------------- ----------------------
TABLES D EMPLOYEES
TABLES I EMPLOYEES_REMOTE

 
DIFF_DEFN_2 compares the definitions of two rules and sends an end message indicating whether there are differences. The results are sent to the message log.

 
RULE EDITOR ===> SCROLL: P
DIFF_DEFN_2;
_ LOCAL DIFFERENCES;
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ DIFFERENCES = DIFF_DEFN('RULE', 'DELETE_EMPLOYEE', 'USR40' | 1
_ , '', '', 'NEW_EMPLOYEE', 'USR40', '', '', 'N'); |
_ CALL ENDMSG('ARE THERE DIFFERENCES? ' || DIFFERENCES); | 2
_ ---------------------------------------------------------------------------

 
The following message appears in the end message:
1:44:56  ARE THERE DIFFERENCES? Y

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved