The following ZOM commands are available in Zim Object Manager:
Categoria: ZIM User Documentation
ZOMDiff
Compares the object descriptions in the Object Dictionary with object descriptions that have been imported from elsewhere.
Syntax
ZOMDiff […]
Options
;sh | Treat the Shadow Dictionary as the baseline for comparing objects. |
;r! | Do not recompute the status of the differences. Issue the report assuming the results to be current. |
;d | This specifies that the output is to be written to the indicated document. The document must be already created. If the ;d option is omitted, it indicates that the output is to be written to the screen. |
;a | If a document name is specified, the ;a option indicates that the output is to be appended to the end of the document. If the ;a option is omitted, it indicates that the output is to replace the contents of the document specified in ;d option. |
;b | If a document name is specified, the ;b option indicates that you would like to browse the document file after the action is completed. The ;b option does not take effect if the ;d option was not used to specify an output document. |
;w | If a document name was not specified, the ;w option sets pause on while the information is being listed to the screen. The ;w option does not take effect if output is directed to a document using the ;d option. |
Comments
This service compares the contents of the standard Object Dictionary and the Shadow Object Dictionary and reports on how they differ. By default, the Object Dictionary is assumed to be the baseline for comparison, but this can be reversed by using the ‘;sh’ option. A sample report is shown below:
Zim Object Manager
Object Dictionary Differences Report
***Changed Objects in the Dictionary
Document _$Customers zim
Variable i zim
***New Objects in the Dictionary
Directory TestDir Zim
Document diffout Zim
***Deleted Objects from the Dictionary
Variable c1 zim
***Renamed Objects in the Dictionary
Role csts Customers zim (was called: custs)
***Moved Objects in the Dictionary
Document diagout TestDir (was in: Zim)
Document infoout TestDir (was in: Zim)
New objects are defined as objects which exist in the actual dictionary that do not exist in the Shadow Dictionary. Changed objects are defined as objects which have had some of their characteristics changed. For example, a variable whose size has changed. Renamed objects are defined as objects which have matching object keys, but are have different object names. Moved objects are defined as objects which have matching object keys, but are defined to be in different Zim directories.
Example
The following command lists the difference report to the screen with pause mode on.
ZOMDiff ;w
The following command puts the difference report in the document “DiffRpt,” and brings up the document browser on the report.
ZOMDiff ;d DiffRpt ;b
ZOMConfig
Enables user to alter the configuration of the ZOM services.
Syntax
ZOMConfig
Comments
This command brings up an option screen which enables the configuration of ZOM to be edited. ZOM configurations are stored in the registry. The options are
Display Mode | When this option is set to Window, the ZOM status window is displayed while ZOM utilities are being executed. If set to Serial, ZOM status information is displayed a line at a time. If set to None, no status information is displayed. |
Error Logging | When this option is turned on, ZOM maintains an activity log file as it executes its actions, including the relevant sections of the errors.trc file. It can slow ZOM operations as the log file grows. You can either turn the option off or regularly clear the errors.trc file by executing the commands: set output errtrace set output terminal |
Dependency Trace | ZOM maintains an online cross-reference of the dependencies among the objects in your application. This enables many of the powerful features of ZOM, but requires a reasonably large amount of disk space, and slows ZOM operations. Turning off the dependency tracing option saves disk space and speeds ZOM, but disables explosion and implosion operations, and disables ZOM’s display of cross reference information. Note: If you have been running with dependency information turned off, and then decide to turn it on, the dependency information is not automatically loaded for all objects at that time. You must turn dependency on, and then touch all the objects to be certain that the dependency database is up to date, using the following command: ZOMTouch * |
Default Zim Directory | ZOM requires that all objects be assigned an explicit DirName. This is done by actually putting a value in the DirName field for the object, rather than leaving it $null or blank. If ZOM encounters blank or $null DirNames, it uses this value as the DirName, and puts the dirname in the Object Dictionary on your behalf. |
Conventions On | If ZOM Conventions are on, ZOM sets two properties on your behalf if certain conditions are met:
|
Explode Level | The explosion level determines the extent of actions ZOM undertakes automatically on your behalf on objects which depend on objects you directly manipulate. For example, if you destroy the EntitySet Employees, what should ZOM do to the Relationships and Roles which depend on Employees for their existence? Explode level can be set to either 0 or 1. Explosion level 0 defeats all dependency actions. Explosion level 1 touches objects that depend on objects which are recreated, renamed, moved, erased or destroyed. Explode levels greater than 0 rely on dependency tracking to be on in order to work. |
New Keyword | This is a keyword assigned to all newly registered objects. It is a convenient way to keep track of which objects are new to your environment since you last reset this keyword. Throughout this document, this keyword is assumed to be the value “$new”. To reset the keyword so no objects are flagged as new, enter ZOMSet +k $new ;k! $new |
Changed Keyword | This is a keyword that is assigned to all objects which have an action applied to them which implies they have been changed in some way. These actions include such commands as ZOMCreate, ZOMReCreate, ZOMReName, ZOMMove, ZOMErase, ZOMDelete, ZOMCompile and ZOMUnCompile. It is a convenient way to keep track of which objects have been manipulated in your environment since you last reset this keyword. Throughout this document, this keyword is assumed to be the value “$changed”. To reset the keyword so no objects are flagged as changed, enter ZOMSet +k $changed ;k! $changed |
Environment Code | The Environment Code is used to co-ordinate multiple development environments in a team context. Refer to Team Development Projects and ZOM for more information about the environment code. If you are not coordinating programming teams or working at more than one development site, this field can be left blank. ZOM randomizes an environment code for you. |
Express Mode | Certain operations such as ZOMExport can operate in either a set-oriented fashion (express mode is on) or a record-at-a-time fashion. In the former, the command performs more quickly. However, you do not see a separate status displayed for each object as it is processed nor is a separate log entry made for each object. This information is available when express mode is off. |
ZOMDiagnose
Report on any improper or unusual object descriptions in the Object Dictionary.
Syntax
ZOMDiagnose […]
Options
;d | This specifies that the output is to be written to the indicated document. The document must be already created. If the ;d option is omitted, it indicates that the output is to be written to the screen. |
;a | If a document name is specified, the ;a option indicates that the output is to be appended to the end of the document. If the ;a option is omitted, it indicates that the output is to replace the contents of the document specified in ;d option. |
;b | If a document name is specified, the ;b option indicates that you would like to browse the document file after the action is completed. The ;b option does not take effect if the ;d option was not used to specify an output document. |
;w | If a document name was not specified, the ;w option sets pause on while the information is being listed to the screen. The ;w option does not take effect if output is directed to a document using the ;d option. |
Comments
This service examines the object descriptions in the Object Dictionary and report any unusual conditions. Sample output is shown below:
ZOM Diagnose Report
********************************************************
*** Documents duplicating filenames of other documents
********************************************************
DirName DocName
Zim halt $console
Zim terminal $console
Zim start zimprof
Zim zimprof zimprof
********************************************************
*** Non unique use of Field SNs within OwnerName
********************************************************
DirName OwnerName FieldName SN
zim Customers IndType 100
zim Customers Name 100
zim FilledBy Amount 100
zim FilledBy UKFilledBy 100
zim Require Amount 100
zim Require UKRequire 100
********************************************************
*** Fields without Owners
********************************************************
DirName OwnerName FieldName
Zim Testent Field1
********************************************************
*** Dfs without Displays
********************************************************
DirName DisplayName FormDirName FormName
Zim testdisp zim xxxxxxxx
********************************************************
*** Dfs without Forms
********************************************************
DirName DisplayName FormDirName FormName
Zim testdisp zim xxxxxxxx
Examples
The following command lists the diagnosis report to the screen with pause mode on.
ZOMDiagnose ;w
The following command puts the diagnosis report in the document “DiagRpt,” and brings up the document browser on the report.
ZOMDiagnose ;d DiagRpt ;b
ZOMList
Lists information on selected objects.
Syntax
ZOMList object specification [option…]
Options
;k | Assigns a keyword to the selected object(s). If the keyword is already assigned, this assignment is ignored. If “!” is specified, the keyword assignment is removed for the object(s). |
;p | Sets the specified user-designated property for the selected object(s). If “!” is indicated, the specified property is reset for the selected object(s). |
;d | Specifies that the output is to be written to the indicated document. The document must be already created. If the ;d option is omitted, it indicates that the output is to be written to the screen. |
;v | Sets the Verbose option. Additional object properties are reported. |
;vi | Sets the Information Verbose option. Object dependency information is reported. |
;vk | Sets the Keyword Verbose option. All keywords assigned to the selected objects are reported. |
;sh | Lists the objects from the Shadow Object Dictionary, rather than the Object Dictionary. |
;a | If a document name is specified, the ;a option indicates that the output is to be appended to the end of the document. If the ;a option is omitted, it indicates that the output is to replace the contents of the document specified in ;d option. |
;b | If a document name is specified, the ;b option indicates that you would like to browse the document file after the action is completed. The ;b option does not take effect if the ;d option was not used to specify an output document. |
;w | If a document name was not specified, the ;w option sets pause on while the information is being listed to the screen. The ;w option does not take effect if output is directed to a document using the ;d option. |
Comments
This lists information about the objects specified.
Non-Verbose Option
If you do not use the verbose option (;v), ZOMList lists the object’s name, type, owner name and directory, as shown in the following example:
ObjectName ObjectType DirName OwnerName
Customers EntitySet zim
FilledBy Relationship zim
Supplier$SDB Document zim
Verbose Option
A verbose listing is produces by including the verbose option (;v). A sample listing is shown below:
ObjectName ObjectType DirName
Customers EntitySet ZIM zim0100
A CH DS D E l.l m N r s (1.1091)
FilledBy Relationship ZIM zim0109
A CH DS D E l.l m N r s (1.1756)
Supplier$SDB Document ZIM
A ch ce D E l.l m N r s (1.1852)
The extra two lines of output per object provide information about the property settings of the object. The second line, shown in isolation below, lists these properties as abbreviations. If the property is set, then the abbreviation is shown in uppercase. If it is false, it is shown in lowercase.The third line reveals several details about the object which can be useful when planning data distribution, as shown in the example below:
Zim0100 (1.1174)
The information shown includes:
This is the actual operating system file which maps onto the object. This is shown for EntitySets, relationships with fields, and directories. It is useful when constructing your areas.zim and dirs.zim files. | |
(#.#) | These are Zim internal numbers which uniquely identify the object. Normally, you do not use these numbers, but they are made available should the Zim technical support group need to know their values. |
Verbose Information Option
The output from ZOMList using the “verbose information” option (;vi) for the object Customers is shown below. The information includes: the output from ZOMList with the verbose option set, the list of keywords associated with the object, a brief summary of the Object Dictionary information describing the object, a list of any fields which the object depends on, a list of any objects depended on, and a list of all objects which depend on it.
********************************************************
ObjectName ObjectType DirName
Customers EntitySet ZIM zim0100
A CH DS D E l.l m N r s (1.1091)
Keywords:
$Changed
$new
Object Dictionary Information:
30 FirstName ZIM alpha 20 0 no no no
35 LastName ZIM alpha 20 0 no yes no
40 CC ZIM int 2 0 yes uni no
45 Salutation ZIM alpha 10 0 no no no
Depends on objects:
Flag ObjectName ObjectType OwnerName DirName
D ZIM Directory ZIM
Is depended on by objects:
Flag ObjectName ObjectType OwnerName DirName
I Issue Relationship ZIM
I ShippedTo Relationship ZIM
O Custs Role Customers ZIM
O Customer$SSH Set ZIM
Sample ZOMList ;vi Output
Examples
The following command lists the object “Customers” to the screen with pause mode on.
ZOMList Customers ;w
The following command puts the verbose listing for the objects keyworded by “Sales_System” in the document “ListRpt,” and brings up the document browser on the report.
ZOMList +k Sales_System ;d ListRpt ;b ;v
The following command lists the information report for the object “Customers” to the screen with pause mode on.
ZOMList Customers ;vi ;w
The following command puts the information report for the objects keyworded by “Sales_System” in the document “InfoRpt,” and brings up the document browser on the report.
ZOMList +k Sales_System ;vi ;d InfoRpt ;b
The following example lists all the keywords associated with all Form objects.
ZOMList +t Form ;vk
ZOMStatistics
Produces a statistical report on selected objects.
Syntax
ZOMStatistics object specification [option…]
Options
;k | The ;k option is used to assign a keyword to the selected object(s). If the keyword is already assigned, this assignment is ignored. If “!” is specified, the keyword assignment is removed for the object(s). |
;p | Set the specified user-designated property for the selected object(s). If “!” is indicated, the specified property is reset for the selected object(s). |
;d | This specifies that the output is to be written to the indicated document. The document must be already created. If the ;d option is omitted, it indicates that the output is to be written to the screen. |
;a | If a document name is specified, the ;a option indicates that the output is to be appended to the end of the document. If the ;a option is omitted, it indicates that the output is to replace the contents of the document specified in ;d option. |
;b | If a document name is specified, the ;b option indicates that you would like to browse the document file after the action is completed. The ;b option does not take effect if the ;d option was not used to specify an output document. |
;w | If a document name was not specified, the ;w option sets pause on while the information is being listed to the screen. The ;w option does not take effect if output is directed to a document using the ;d option. |
Comments
This service computes and reports statistics for all objects selected by the object selection criteria. A sample report is shown below:
ZOM Statistics Report
Object Existence Statistics
===========================
Existing 392
Corrupt 0
NotExisting 0
Defined 391
NotDefined 1
Neither 0
Object Type Statistics
======================
Directories 1
Entity Sets 9
Relationships 6
Roles: 15
Documents: 84
Forms: 57
Displays: 16
Windows: 29
Variables: 37
Constants: 133
Named Sets: 5
Operational Statistics
======================
Active: 392
NotActive: 0
Locked: 0
Directory Locked: 0
Not Locked: 392
Data Save: 12
No Data Save: 0
Not DataSaveAble: 380
Selected: 0
Not Selected: 392
Program Statistics
==================
Programs: 29
(ignore warnings): 0
Macros: 0
Docs Not Programs:55
Pgms with Errors: 0
Need Compile: 0
Need UnCompile: 0
Keyword Statistics
==================
Number of Keywords: 2
Number of objects in each keyword:
$changed: 4
$new: 392
Metric Statistics
=================
Program Metrics
Number of Pgms: 29
Total Lines of Code: 8291
Average Lines of Code: 285.9
Min Lines of Code: 9
Max Lines of Code: 806
Database Table Metrics
Number of Tbls: 12
Total Records: 397
Average Records: 33.1
Min Records: 1
Max Records: 142
Example
The following command puts the statistics report for the objects keyworded by “Sales_System” in the document “StatsRpt,” and brings up the document browser on the report.
ZOMStatistics +k Sales_System ;d StatsRpt ;b
Pausing Output
The “w” option is used to wait between pages of output produced by a ZOM service.
For example, the following command lists information on all the objects named “Inventory” to the screen and waits for the user to press Enter after every page of output:
ZOMList Inventory ;w
Processing Options
Processing options are used to set object status properties and to modify the behavior of the service being invoked. Each ZOM service specifies the processing options that apply. For more information, see the Reference Guide. However, there are some processing options that apply generally to all ZOM services and these options are described in the following topics.
Redirecting Output
The “d” option is used to redirect the output of a ZOM service to a document. For example, the following lists information on all the objects named “Inventory” to the document ListOutputDoc:
ZOMList Inventory ;d ListOutputDoc
In this case, the contents of ListOutputDoc are overwritten. ListOutputDoc must be an existing document object.
If you want to append the output onto the end of the document, you would use the “a” option as well:
ZOMList Inventory ;d ListOutputDoc ;a
Assigning Keywords
You can also use processing options to set and reset keywords for your objects. The option syntax is similar to the selection syntax for keywords. You specify the processing option “;k” followed by the keyword. For example, the following command assigns the keyword “Customer_Forms” to all Form objects with names starting with “fCust”:
ZOMSet fCust* ^t Form ;k Customer_Forms
You can remove a keyword assignment by using the exclamation point (!). For example,
ZOMSet +t Ent ;k Tables!
removes the “Tables” keyword from all EntitySet objects.