Chapter 14 - Sorting Item Names
This chapter describes the sorting features in STDA. Using these features, you can perform complex sorting operations on StreetTalk item names. To further refine sorting, you can also specify character sets based on geographical location.
By default, STDA sorts StreetTalk user names on the last section of the item name:
Alfred Z. Alvarez@finance@WCTUS
Bob A.Smith@Admin@WCTUS
Iggy M. Zachary@engineering@WCTUS
This method of sorting works well with proper names, which typically follow a first, middle, and last name order, but is not flexible enough to sort names in some other languages or for specialized network designations.
To make sorting more flexible, you can customize STDA sorting in two ways:
Specify the position of the sections you want to sort on. This sort is done through the SORT keyword, which is entered in the Display folder of the Properties sheet (StreetTalk Explorer) or the STDA Specify Sort Order screen (MSERVICE). Ignore specific character patterns within the item part of StreetTalk names. This sort is done through the IGNORE keyword, which is entered in the Display folder of the Properties sheet (StreetTalk Explorer) or the STDA Specify Sort Order screen (MSERVICE).
In addition, you can specify a character set to make location-dependent sorting more accurate.
Note: Sorting requirements for one STDA service are not passed to other STDA services on your network. You must specify sorting parameters for each service separately.
Sorts on up to three sections can be made from either end of the StreetTalk item name using the SORT keyword. In addition, you can sort up to three sections in a StreetTalk item name at the same time.
Note: To edit the sorting order of a master or satellite STDA service, you must belong to the AdminList of the group to which the service belongs.
Using the IGNORE keyword, you can ignore up to 20 character patterns in any item name. IGNORE parameters are case sensitive. Therefore, if you want to ignore Jr. or Sr. in ordering an STDA database, but are not sure that all users will enter names using the same format, specify an IGNORE that looks like this:
IGNORE
Users: Jr.
Users: Sr.
Users: jr.
Users: sr.
Users: jr
Users: sr
Users: JR.
Users: SR.
Users: Jr
Users: Sr
Users: JR
Users: SR
This list contains the most common usages of both Sr. and Jr.
Both SORT and IGNORE arguments apply to names specified by Inclusion lists.
A specified sort affects only the order in which objects are stored in the STDA database. It does not affect their appearance in STDA client programs.
Example Sample Sorting Order
If you specify a sorting order in which all names are sorted on the first letter of the last name, the name Herbert A Jones Jr. still appears on the screen as Herbert A Jones Jr. It does not appear as Jones Herbert A Jr.
What does change when you specify a particular sort order is the order of each object name in relation to other names in STDA. For example, if you sort the following list by middle initial:
Charles A Victor
Herbert V Jones Jr
Alice B Fox
Richard A Jones
An STDA client program displays the list as:
Charles A Victor
Richard A Jones
Alice B Fox
Herbert V Jones Jr
Note that STDA sorts the unused pieces of the object from left to right.
Formatting Sort and Ignore Parameters
From the Display folder (StreetTalk Explorer) or Specify STDA Sort Order screen (MSERVICE), you can sort independently on all six STDA classes (Users, Lists, Nicks, File, Print, Other) and the specifier ALL. You can explicitly sort on a name pattern using the SORT keyword or ignore any item name that matches a specified pattern using the IGNORE keyword.
The default sort order for StreetTalk users is:
1. First field back (Last name - 1B)
2. First field forward (First name - 1F)
3. Second field forward (Middle initial - 2F)
This order is expressed as (1B, 1F, 2F) in the STDA sorting syntax, where "B" represents a sort from the back of an item (in this case, the last name), and "F" represents the front of the item.
For all other classes the default sort order is:
1. First field forward
2. Second field forward
3. Third field forward
This order is expressed as (1F, 2F, 3F) in the STDA sorting syntax.
Using the SORT Keyword
SORT arguments have the following format:
SORT
class: x[F] [B]
where class is the STDA class and x is a number from 1 to 15 that defines the position in an object name of the section you want to sort on.
The letters F and B specify which end of the item name to begin the sort. Use F to sort from the front of an item and B to sort from the back.
For example, if you specify:
SORT
Users:1B
STDA sorts on the last field of the StreetTalk item name.
Using the IGNORE Keyword
IGNORE arguments have the following format:
IGNORE
class:string
Where class is the STDA class and string is the character pattern you want ignored in the sort; that is, ignore it, but do the usual sorting.
For a character pattern to be ignored when the sort list is processed, the first letter of the IGNORE pattern must be either the first letter of the item name, or preceded by a space character. For example, in the StreetTalk name Herbert A Jones Jr@finance@WCTUS, you can specify that Herbert, A, or Jones but not Herb, Bert, or Jon be ignored.
A section is only ignored if: 1) it matches an IGNORE entry, and 2) the last letter of the ignore pattern is followed by a space or an at-sign (@).
Rules for Using Sort and Ignore
The following rules apply to all STDA classes when configuring sort precedence and ignore strings in STDA from the Specify STDA Sort Order screen.
You must enter the keyword SORT, in upper- or lower-case letters, on a line by itself in the Specify STDA Sort Order screen before you can specify a sorting precedence. List your precedents one SORT argument per line.
Before you can ignore sections of a name in a sort, you must enter the keyword IGNORE, in upper- or lower-case letters, on a line by itself in the Display Sort Order Folder (Banyan management tool) or Specify STDA Sort Order screen (system prompt). List your precedents one IGNORE argument per line.
Sorts on item parts are executed from top to bottom, in the order they are entered into the Display Sort Order Folder (Banyan management tool) or Specify STDA Sort Order screen (system prompt). You may enter up to three fields on which to sort.
For example, if you entered the following syntax:
SORT
Users: 1B
Users: 2B
Users: 3B
If you sort on a name with five fields like:
Maria de Jesus Salinas Garza
The names sort on the first, second, and third fields from the back in that order. In the example, Garza would be sorted first, Salinas would be sorted second, and Jesus would be sorted third.
Changing the syntax to:
SORT
Users: 3F
Users: 1B
Users: 2B
sorts Jesus first, Garza second, and Salinas third.
Different classes of STDA item fields can be entered out of their normal order without affecting their execution sequence. For example, entering the syntax:
SORT
Lists: 1F
Users: 1B
Lists: 2B
Users: 3B
sorts users in this order:
Users: 1B
Users: 3B
and sorts lists in this order:
Lists: 1F
Lists: 2B
You can sort up to three fields of any item name. Normal (default) sorting order takes precedence on any parts that are not affected by your specified sort order.
For example, suppose you have the following name:
Maria de Jesus Salinas Garza
If you specify a customized sort order such as:
SORT
Users: 1B
Users: 3B
Users: 2B
The last three parts are affected by this sort order. The other sections, Maria de, are sorted normally, from left to right.
Using IGNORE, you can ignore up to 20 character patterns of any class, in an item name. You can specify them in any order without affecting the sort order. IGNORE is case sensitive. An STDA service's SORT and IGNORE keywords must appear together in a single list in the Display Folder (Banyan management tool) or Specify STDA Sort Order screen (MSERVICE). Specify SORT and IGNORE characteristics for each STDA service that you want affected. SORT and IGNORE characteristics are not inherited from the STDA download server.
Any sorting order you specify affects keysearch features because the default sorting mode for STDA clients is based on the last name of the item.
Example Patronymic Searches
If you keysearch the name Maria de Jesus Salinas Garza using the default sort order, it would come before the name Abimael Diaz Guzman when you performed a keysearch from an STDA client on Guzman. In fact, the patronymic Diaz should precede the patronymic Garza. If you specify this sort order:
SORT
Users: 2B
Users: 1B
Guzman would come before Garza when you performed a keysearch.
Each time you specify the sorting order of an STDA database using SORT and IGNORE, a sorting key is constructed based on the order you specify and on the character patterns you want ignored.
The STDA service applies these keys each time a database is rebuilt. STDA clients also use sorting keys that support keysearch access to the database.
Sorting keys are unique to individual STDA services and other STDA services do not inherit them when they download.
To sort the list below on the last name:
Ann R. Jones@Sales
Alan H. Jones@IS
Arthur A. T. Simmons Jr.@Finance
Richard Anderson Sr.@IS
use the syntax:
SORT
Users: 1B
IGNORE
Users: Jr.
Users: Sr.
The sorting key based on this syntax first discards character patterns matching Jr. and Sr. Then it applies the sorting order 1B to create the final key shown in Figure 14-1.
When you rebuild the STDA database to reflect the new sort order, you get the following list:
Richard J. Anderson Sr.@IS
Ann R. Jones@Sales
James H. Jones@IS
Arthur A.T. Simmons Jr.@Finance
If two users share a last name, as they do in this list, the list is sorted on the section immediately following the last section in the key. In this case, with two Jones entries in the list, Ann R. Jones comes before James H. Jones.
Sorting Names in Other Languages
In some languages, such as Spanish, the father's last name, or patronymic, is not the last part in an item name. Because of this convention, sorting on last names in Spanish and other languages requires more complex combinations of SORT and IGNORE arguments.
To sort on Salinas in the list below:
Carlos Salinas de la Garza
Maria de Jesus Salinas de Portillo
Juan Salinas Lopez Garza
Pablo Arquez Spinoza
You need to filter `de' and `la' with the following syntax:
SORT
Users: 2BIGNORE
Users: de
Users: la
This syntax produces the key shown in Figure 14-2.
This key ignores `de' and `la,' and sorts on the second field from the back. Rebuilding the database to reflect the new sort order produces the following list:
Pablo Arquez Spinoza
Juan Salinas Lopez Garza
Carlos Salinas de la Garza
Maria de Jesus Salinas Portillo
To refine the ordering of names in this list further, you could sort on users' patronymic and birth names with the following syntax:
SORT
Users: 2B
Users: 1BIGNORE
Users: de
Users: la
This syntax ignores `de' and `la' , and sorts the list first on the second section from the back and then on the first.
Rebuilding the database to reflect the new sort order produces the following list:
Pablo Arquez Spinoza
Juan Salinas Lopez de Portillo
Carlos Salinas de la Garza
Maria de Jesus Salinas Garza
From StreetTalk Explorer:
1. If you know the STDA name, right-click the STDA service in the right pane and select Properties from the shortcut menu.
To locate the STDA service for a particular group, enter *@groupname@servers in the Browse field and press ENTER, then click the Services icon. Right-click the STDA service you want in the right pane and select Properties from the shortcut menu.
2 Click the Display tab.
3. Click the Sort by list radio button.
4. Click New.
5. Select the Class from the Class drop-down list.
6. Select the Sort order by clicking one of the radio buttons in the Sort By list.
7. If you want to ignore parts of item names, click the Ignore list radio button and follow the same procedure as above by clicking the New button and selecting Class from the drop-down list and entering an Ignore Field. Click Apply or click OK if you are done.
You can also import a list created with a text editor by selecting Read from File or export a list by selecting Write to File to write the screen contents to a file on the disk. If you are not on the Adminlist of the group the STDA belongs to, these buttons are not visible.
8. When you finish entering your Sorting Order, click Apply or OK.
From the System Prompt:
1. Enter MSERVICE at the command line. The Manage Services menu appears.
2. Select the STDA master or satellite service. The Manage A Service menu appears.
3. Select CONTROL the service. The Control A Service menu appears.
4. Select CONFIGURE service. The Configure STDA Service menu appears.
5. Select CONFIGURE STDA display. The Specify STDA Sort Order menu appears.
6. Select SPECIFY sorting order.
7. Following the rules described earlier in this chapter, enter your sorting order. Edit your entries using standard keys such as DEL and BACKSPACE.
You can also import a list created with a text editor by either pressing F4, or pressing F2 to write the screen contents to a file on the disk.
8. When you finish entering your sorting order, press F10. The list is processed for formatting.
If the list contains any formatting errors, error messages appear and the cursor moves to the error's location in the list. Correct any errors and press F10 again.
If the list has no errors, you return to the Configure STDA Service menu. From this screen, you can rebuild the database immediately or let the rebuild occur when normally scheduled.
In addition to specifying rule-based ordering for item names, you can also apply location-specific ASCII-character sets to the sorting order of names displayed in STDA. All international releases of Banyan networking software include country-specific ASCII character collation tables. The tables contain specific character sets that reconcile international versions of Banyan software with the language representations and customs of the countries where they are used.
By default, the location is set to the language version of Banyan networking software specified in the STDA service you are configuring. If the server has only one language version, the location is automatically set to that version. If more than one language version is installed, but none is specified, the location is set to USA.
If more than one language version is installed, you can specify the location through STDA configuration program. Each time you specify a new location, the character sequence of the new collation table associated with that location is applied to the established sorting orders.
While they may share many characters, individual collation tables can vary based on unique characters in the tables or the ordering of identical characters in different tables. These differences, when applied to the sorting of StreetTalk items, can cause subtle changes in the ordering, consistent with the language customs of the location.
After you specify sorting rules for StreetTalk item names in the STDA configuration menus, the item names are also sorted based on the order of characters in the collation table specified in the location menu.
Example Effects of Collation Tables
In the NORWAY table shown in Figure 14-4, the character a comes before the character å and å comes before the character b. After sorting orders are applied, item names that start with a come before those that start with å, and so on, regardless of the order you specified in STDA sort order menus.
Using a different collating table can significantly alter the sorting order. The characters ¥ and ¢ in the NORWAY collation table shown in Figure 15-4 have no equivalents in the SPAIN collation table shown in Figure 15-5. Item names that begin with ¥ in the Norway collation table appear between entries that begin ô and ö in the database of a service that uses the SPAIN collation table.
This arrangement displaces the items that begin with ò and all the items after them in the STDA display that uses the SPAIN table, Figure 14-5, to sort its names.
Most servers have only the English (USA) language version installed, but several other versions can be installed simultaneously.
From StreetTalk Explorer:
All language versions appear in the drop-down list of the Display folder of the STDA Service window.
From the System Prompt:
All language versions appear in the Specify Location editing screen. You can also enter the SHOWREVS command at the DOS or OS/2 prompt to determine the number of language versions on a server.
Use the following command format for SHOWREVS:
SHOWREVS [servername]
The language versions on the server specified by servername appears. A list of all language versions for DOS and OS/2 clients installed on the target server appears. More information on SHOWREVS is available in the Server Operations Guide and the Command Reference.
From StreetTalk Explorer:
1. If you know the STDA name, right-click the STDA service in the right pane and select Properties from the shortcut menu.
To locate the STDA service for a particular group, enter *@groupname@servers in the Browse field and press ENTER, then click the Services icon. Right-click the STDA service you want in the right pane and select Properties from the shortcut menu.
2 Click the Display tab.
5. Select the Location drop-down list. Depending on the number of language versions installed, you see between one and four of the available locations listed.
6. Select a location. Click on Apply or OK.
From the System Prompt:
1. Enter MSERVICE or MANAGE at the command line. The Manage Services menu appears.
2. Select the STDA service you want to manage. The Manage A Service menu appears.
3. Select CONTROL the service. The Control A Service menu appears.
4. The service name and the server on which the service is located appear in the Control A Service menu. Select CONFIGURE service from this menu. The Configure STDA Service menu appears
5. Configure STDA Service Menu Screen
6. Select Configure STDA display. The Configure STDA menu, appears.
7. Select SPECIFY location. The Specify Location menu appears. Depending on the number of language versions installed, you see between one and four of the available locations listed.
8. Use the arrow keys to select a location. Press ENTER to return to the Configure STDA Display menu.