VA FileMan V. 22.2 Advanced User HTML Manual Banner


 

Main Chapter Getting Started Manual Programmer Manual

File Utilities


Cross-Reference a Field or File

There are seven types of Traditional cross-references and two types of New-Style cross-references available. Generally, a cross-reference in VA FileMan specifies that some action is performed when the field's value is entered, changed, or deleted. For several types of cross-references, the action consists of putting the value into a list -- an index used when looking up an entry or when sorting. The regular cross-reference is used for sorting and for lookup; you can limit it to sorting only. The KWIC, mnemonic, and SOUNDEX cross-references are also used for lookup.

You can sort a file on any field (except a WORD-PROCESSING-type field) whether or not a cross-reference exists for the field. However, sorting is done more quickly and efficiently if a regular cross-reference exists on the field.

When a file is created, a Traditional cross-reference on the NAME (#.01) field is automatically established. You can add or delete cross-references at any time using the Cross-Reference a Field or File [DIXREF] option on the Utility Functions [DIUTILITY] menu. This option can also be used to enter a description of a cross-reference and to prevent the cross-reference from being deleted.

You can create a cross-reference on a Multiple field, a Multiple's subfields, or on any other field type except a WORD-PROCESSING-type field. For example, the PATIENT file contains the AGE AT ONSET subfield in the DIAGNOSIS Multiple. If you create a regular cross-reference for a field in a Multiple, you can choose in what context the cross-reference will be used. You might want to cross-reference the whole file by AGE AT ONSET (so that a report sorted by AGE AT ONSET could be produced efficiently). Alternately, you might want to cross-reference only an individual patient's diagnoses by onset age (so that a lookup of diagnosis could be done using AGE AT ONSET).


Types of Traditional Cross-references
Cross-reference Type Description
REGULAR The field value is sorted and stored in the cross-reference. The regular cross-reference is used for sorting. If you wish, it will be used when looking up entries also. The cross-reference that is automatically created on the NAME field (#.01 field) when a file is created is a regular cross-reference; this is the "B" cross-reference.
KWIC Key Word in Context -- each word of three or more letters in the field value becomes a separate cross-reference. A space is considered the primary word separator. For example, KING LEAR can be looked up under either KING or LEAR. Uppercase or lowercase two letter words such as IN, AN, OR, and IS are not considered key text. The words THE, AND, THEN, FOR, FROM, OTHER, THAN, WITH, THEIR, SOME, and THIS (upper- or lowercase) are not considered key text. Quotation marks are also not considered key text.

You can also specify that KWIC separates words at most punctuation marks except quotation marks (e.g., KING-LEAR , KING/LEAR, etc., will be found with LEAR). A list of punctuation marks is presented for your selection.

MNEMONIC The field's values are cross-referenced along with the NAME (#.01) field cross-reference (so that, for example, the MAIDEN NAME field's values are found along with NAME values in any lookup). Typically, the cross-reference on the NAME field is searched first when doing a lookup.
MUMPS Those with programmer access can create special cross-references by putting M code into the SET and KILL logic of a cross-reference. You can use the M code entered to accomplish any task that must be done when the value in a field is entered, changed, or deleted.
SOUNDEX The field's value is transformed into a four-character string representing its phonetic properties. That string becomes the cross-reference. For example, soundex transformation would access GONZALEZ, GONZELES, Gonzales, and Gonsalless as equivalents; entry of any one of these forms looks up all the others automatically.
TRIGGER Whenever the field is updated, a different field can be automatically updated at the same time. See the "Trigger Cross-references" chapter of the "VA FileMan Programmer Manual" for more details.
BULLETIN Whenever a field is updated, a MailMan message is sent notifying specified users that an update has occurred. The Bulletin cross-reference is only available when VA FileMan is installed with MailMan.


Edit a Traditional Cross-reference

To edit a Traditional cross-reference, identify the field or subfield you wish to edit. VA FileMan will display the type of cross-references on the field and offer you the choices of Edit, Delete, or Create. Select Edit at this prompt and you will have the opportunity to edit or add a No Deletion message and to enter a description of the cross-reference.

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// 

MODIFY WHAT FILE: TEST

Select FIELD: .01   NAME

CURRENT CROSS-REFERENCE IS REGULAR 'B' INDEX OF FILE

Choose E (Edit)/D (Delete)/C (Create): E

NO DELETION MESSAGE: NO, DON'T DELETE THIS X-REF!

This FREE TEXT message indicates that the cross-reference cannot be deleted. As long as a message is retained, the cross-reference cannot be deleted. The user will see this message whenever an attempt is made to delete the cross-reference.

DESCRIPTION:   
1>Used for look-up on and sorting by name.
2>

The description appears in a standard DD listing.

NOTE: It is important to describe cross-references that are unusual or especially critical. Consider describing all MUMPS, trigger, and bulletin cross-references.


Create a Traditional Cross-reference

If you'd like to create a Traditional cross-reference for a field, proceed in the following manner:

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// 

MODIFY WHAT FILE: TEST

Select FIELD: 1   DATE

NO CURRENT CROSS-REFERENCE
WANT TO CREATE A NEW CROSS-REFERENCE FOR THIS FIELD?  NO// YES

CROSS-REFERENCE NUMBER:   1//  

Select TYPE OF INDEXING:  REGULAR//   
WANT CROSS-REFERENCE TO BE USED FOR LOOKUP AS WELL AS FOR SORTING?
  YES// 

NO DELETION MESSAGE: 
DESCRIPTION:  
1>Lookup and sorting can be done by date using this Regular
2>cross-reference.
3>

Delete a Traditional Cross-reference

The following dialogue shows how to delete a Traditional cross-reference:

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// 

MODIFY WHAT FILE: TEST

Select FIELD: 1   DATE

CURRENT CROSS-REFERENCE IS REGULAR 'C' INDEX OF FILE

Choose E (Edit)/D (Delete)/C (Create): D
Are you sure that you want to delete the CROSS-REFERENCE? NO// YES   ...OK

New-Style Cross-references

Two types of New-Style cross-references are available: Regular and MUMPS. They are like their Traditional cross-reference counterparts, but New-Style cross-references offer some unique advantages:


Edit a New-Style Cross-reference

To edit a New-Style cross-reference, identify the file or subfile you wish to edit. VA FileMan will display the cross-references on the file and offer you the choices of Edit, Delete, or Create:

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// NEW
MODIFY WHAT FILE: TEST
Select Subfile: 

Current Indexes on file #16026:
  75     'COMP' index
  85     'XR202' index
  106    'H' index
  116    'AC' index
  141    'C' index

Choose E (Edit)/D (Delete)/C (Create): EDIT

Which Index do you wish to edit? C

NOTE: The numbers displayed to the left of each cross-reference are the Internal Entry Number of the cross-reference stored in the INDEX file.

You will then be taken into a ScreenMan form where you can edit the properties of the New-Style cross-reference, as shown below:

ScreenMan Form when editing a New/Updated with VA FileMan V. 22.0-Style Cross-reference.

NOTE: As of Patch DI*22*167, the form's first page also includes a DO NOT REINDEX field (just below USE). Set it to a value such as NO RE-INDEXING ALLOWED to mark the index "Do Not Re-Index," or leave it blank. See the "Limits on Reindexing Files" section for which cross-reference types support this marking and how the reindex APIs treat it.

NOTE: For additional help, enter a single question mark ("?") or two question marks ("??") at any prompt.


Create a New-Style Cross-reference

To create a New-Style cross-reference, proceed in the following manner:

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// NEW
MODIFY WHAT FILE: TEST
Select Subfile: 

Current Indexes on file #16026:
  75     'COMP' index
  85     'XR202' index
  106    'H' index
  116    'AC' index
  141    'C' index

Choose E (Edit)/D (Delete)/C (Create): CREATE
Want to create a new Index for this file? No// YES

Type of index: REGULAR// 

Want index to be used for Lookup & Sorting
  or Sorting Only: LOOKUP & SORTING// 

Index Name: J// 

NOTE: The numbers displayed to the left of each cross-reference are the Internal Entry Number of the cross-reference stored in the INDEX file.

You will then be taken into a ScreenMan form where you can edit the properties of the New-Style cross-reference, as shown below:

ScreenMan Form when creating a New/Updated with VA FileMan V. 22.0-Style cross-reference.

NOTE: As of Patch DI*22*167, the form's first page also includes a DO NOT REINDEX field (just below USE) that you can fill in to mark the new index "Do Not Re-Index." See the "Limits on Reindexing Files" section.

NOTE: For additional help, enter a single question mark ("?") or two question marks ("??") at any prompt.


Delete a New-Style Cross-reference

The following dialogue shows you how to delete a New-Style cross-reference:

Select OPTION: UTILITY FUNCTIONS
Select Utility Functions Option: CROSS-REFERENCE A FIELD OR FILE

What type of cross-reference (Traditional or New)? Traditional// NEW
MODIFY WHAT FILE: TEST
Select Subfile: 

Current Indexes on file #16026:
  75     'COMP' index
  85     'XR202' index
  106    'H' index
  116    'AC' index
  141    'C' index

Choose E (Edit)/D (Delete)/C (Create): DELETE

Which Index do you wish to delete? 141   C
Are you sure you want to delete the index definition? No// YES

  Index definition deleted.

Do you want to delete the data in the old index now? YES// 
  Removing old index ...  DONE!

 


Limits on Reindexing Files

There are some files that should not be reindexed. When such files are inadvertently reindexed, it can cause major problems and necessitate restores from backups. Before Patch DI*22*167, there was no way to prevent such files from being reindexed, except for putting "DO NOT RE-INDEX" in the file description -- which was ineffective. The Re-Index File [DIRDEX] option is a powerful, useful tool, but it can cause a lot of damage when one is not paying attention.

Patch DI*22*167 allows individual cross-references to be marked "Do Not Re-Index," and the Re-Index File [DIRDEX] option respects that. APIs that perform reindexing also respect "Do Not Re-Index," with the following exceptions:

REF: For more information on these APIs, see the VA FileMan Developer's Guide.

Traditional regular cross-references (e.g., B and C cross-references) are always reindexed and cannot be marked "Do Not Re-Index." All other cross-references can be marked "Do Not Re-Index," because reindexing them might cause problems. The following cross-reference types can be marked "Do Not Re-Index":

To mark a cross-reference "Do Not Re-Index," use the Cross-Reference a Field or File [DIXREF] option under the Utility Functions [DIUTILITY] menu (see the Edit a Traditional Cross-reference and Edit a New-Style Cross-reference sections above).

CAUTION: "Do Not Re-Index" can only be undone by KILLing the NOREINDEX node in the DD.

 


Reviewed/Updated: June 2026