Example: Displaying a Field's Data Sorted by an Alternate Index
Enterprise Company is delivered with and defined the same in
all Landmark applications. These examples use the -h
option to show the field names and the -F
option
to limit the output to fields of interest.
The following command lists three fields from the Enterprise Company business class (file) in the MySampleHR data area. The fields will be sorted by the default index, or the symbolic key. In this case, Company is the symbolic key.
dbdisplay -h -F Company,EnterpriseGroup,DefaultCountry
MySampleHR EnterpriseCompany
Command output:
Company EnterpriseGroup DefaultCountry
333 WEST USA
1111 EAST USA
2222 EAST USA
The following command lists the same three fields from the Enterprise
Company business class (file) in the MySampleHR data area. This time
an alternate index, ByEnterpriseGroup
, is specified
with the -i
option.
dbdisplay -h -F Company,EnterpriseGroup,DefaultCountry
-i ByEnterpriseGroup MySampleHR EnterpriseCompany
The output now shows the records listed in order by Enterprise Group instead of Company.
Company EnterpriseGroup DefaultCountry
1111 EAST USA
2222 EAST USA
333 WEST USA