You can compare objects by entering commands on your client computer
command line.
You can use the command line tool to build compare operations
into scripts. These can be combined with other command line tools that are
available for manipulating objects and projects.
The compare command
line tool has the following syntax:
diffapicmdline.exe /lhscd "left_side_connection_details"
/rhscd "right_side_connection_details"
/t difftype /ot output_type
/ol output_location
The command takes the
following arguments:
- left_side_connection_details
- The connection details for the left side of the comparison, that is, the
first object that you want to compare. Enclose the connections details in
double quotation marks. Specify the following details:
- /d=domainname /host=hostname /u=username /p=password project_name object_name
The name of a table definition object must be specified as its data locator
name, not the name that is displayed in the repository tree. The data locator
name is displayed in the table definition properties window.
- right_side_connection_details
- The connection details for the right side of the comparison, that is,
the second object that you want to compare. You must specify full connection
details only if you compare two objects in different projects. Otherwise,
you can specify only the object name. The syntax for the connection details
is the same as for the left_side_connection_details option.
- difftype
- The type of objects to compare. This argument can be one of the following
values:
- Job
- SharedContainer
- Routine
- TableDef
- output_type
- The format of the output of the comparison. The format is always HTML.
- output_location
- The full path for the output file.
On completion the tool returns one of the following codes:
- 0 indicates successful comparison
- 1 indicates an error in the command line
- 2 indicates that the client cannot compare the objects
Example of comparison from the command line
The
following command compares the job exercise1 with the job new_exercise. Both
jobs are located in the project named tutorial. The output is sent to an html
file on the c: drive:
diffapicmdline.exe /lhscd "/d=localhost:9080
/h=R101 /u=billg /p=paddock tutorial exercise1" /rhscd "new_exercise1" /t
job /ot html /ol c:\compare_output.html