VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Classic VA FileMan API


ENALL^DIK: Reindex

Reindexing Quick Reference

Entry Point Reindexes Entries Reindexes Xrefs Executes Logic
EN^DIK 1 Some or all for 1 field KILL then SET
EN1^DIK 1 Some or all for 1 field SET
EN2^DIK 1 Some or all for 1 field KILL
ENALL^DIK All Some or all for 1 field SET
ENALL2^DIK All Some or all for 1 field KILL
IX^DIK 1 All KILL then SET
IX1^DIK 1 All SET
IX2^DIK 1 All KILL
IXALL^DIK All All SET
IXALL2^DIK All All KILL

ENALL^DIK reindexes all entries in a file for the cross-references on a specific field. It may also be used to reindex all entries within a single subfile, that is a subfile corresponding to only one of the file's entries. ENALL^DIK only executes the SET logic.

Before reindexing, you should be familiar with the effects of all relevant cross-references that could be fired (including bulletins, triggers, and MUMPS-type).

NOTE: IXALL^DIK, IXALL2^DIK, ENALL^DIK, ENALL2^DIK, and the Re-Index File option on the Utility Functions menu set the 3rd piece of the 0 node of the file's global root (the file header) to the last internal entry number used in the file. They set the 4th piece to the total number of entries in the file.

Input Variables
DIK

If you are reindexing an entry at the top level of a file, set DIK to the global root of the file.

If you are reindexing subentries, set DIK to the full global root leading to the subentry, including all intervening subscripts and the terminating comma, up to  but not including the IEN of the subfile entry.

DA(1..n)

If you are reindexing entries in a subfile, set up DA as an array, where DA(1) is the entry number at the next higher file level,...DA(n) is the entry number at the file's top level. Since ENALL^DIK reindexes all entries at a given file level, don't set the unsubscripted DA node.

DIK(1)

Use the field number (to get all indexes) or the field number and specific cross-references separated by up-arrows as shown below:

    S DIK(1)="FLD#" ;Just the field number to get all indexes.

OR:

    ;Field number followed by x-ref name or number.
    S DIK(1)="FLD#^INDEX" 
    ;See the examples below:

    S DIK(1)=".01^B"
    S DIK(1)=".01^B^C"
    S DIK(1)=".01^1^2"
    D ENALL^DIK

 


Reviewed/Updated: March 8, 2007