VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Database Server (DBS) API


DELIXN^DDMOD: New-Style Index Deleter

This procedure deletes a new-style index definition from the Index file. Optionally, it deletes the data in the index or executes the kill logic for all entries in the file. Compiled input templates that contain one or more of the fields defined in the index are recompiled. If cross-references on the file are compiled, they are recompiled.

DELIXN^DDMOD can be used is the pre-install or post-install routine of a KIDS (Kernel Installation and Distribution System) Build, for example, to delete a new-style index from the installing site.

See DELIX^DDMOD for information on the call to delete a traditional cross-reference definition.

Format
DELIXN^DDMOD(FILE,INDEX,FLAGS,OUTPUT_ROOT,MSG_ROOT)
Input Parameters
FILE (Required) File or subfile number. For whole-file indexes, this is the number of the file at the upper level where the data in the index resides.
INDEX (Required) Index name.
FLAGS

(Optional) Flags to control processing. The possible values are:

K

For Regular indexes, delete the data in the index. For MUMPS indexes, execute the Kill logic for all entries in the file.

W

Write messages to the current device as the index is deleted and cross-references and input templates are recompiled.

OUTPUT_ROOT

(Optional) The name of the array that should receive information about input templates and cross-references that may have been recompiled. See "Output" below. This must be a closed root, either local or global.

MSG_ROOT

(Optional) The name of the array that should receive any error messages. This must be a closed root, either local or global. If not passed, errors are returned descendent from ^TMP("DIERR",$J).

Output
OUTPUT_ROOT

See OUTPUT_ROOT under "Input Parameters."

If a field used in the index is used in any compiled input templates, those input templates are recompiled. Information about the recompiled input templates is stored descendant from OUTPUT_ROOT("DIEZ"):

OUTPUT_ROOT("DIEZ",input template #) = 
input template name ^ file # ^ 
compiled routine name

If cross-references for the file are compiled, they are recompiled, and the compiled routine name is stored in OUTPUT_ROOT("DIKZ"):

OUTPUT_ROOT("DIKZ") = compiled routine name
Examples

Example 1

In this example, the new-style "G" index defined on file #16200 is deleted. The "K" flag indicates that the entire ^DIZ(16200,"G") index should be removed from the file.

    >D DELIXN^DDMOD(16200,"G","K","MYOUT")

    >ZW MYOUT
    MYOUT("DIEZ",94)=ZZ TEST^16200^ZZIT
    MYOUT("DIEZ",100)=ZZ TEST A^16200^ZZITA
    MYOUT("DIKZ")=ZZCR

The MYOUT output array indicates that a field or fields used in the deleted index are also used in the compiled input templates ZZ TEST (#94) and ZZ TEST 2 (#100). Those two input templates were recompiled. Cross-references on file #16200 were also recompiled under the ZZCR namespace.

Example 2

In this example, the whole-file regular index (the "J" index) is deleted. The fields in the index come from fields in a multiple, subfile #16200.075, but the whole-file index resides at the top-level file #16200. The "K" flag indicates that the entire ^DIZ(16200,"J") index should be removed, and the "W" flag indicates that messages should be printed to the current device.

    >D DELIXN^DDMOD(16200,"J","KW","MYOUT")

    Removing index ...
    Deleting index definition ...


    Compiling ZZ TEST Input Template of File 16200....
    'ZZIT' ROUTINE FILED....
    'ZZIT1' ROUTINE FILED.


    Compiling ZZ TEST A Input Template of File 16200....
    'ZZITA' ROUTINE FILED....
    'ZZITA' ROUTINE FILED.

    Compiling Cross-Reference(s) 16200 of File 16200.

    ...SORRY, JUST A MOMENT PLEASE...


    'ZZCR1' ROUTINE FILED.
    'ZZCR2' ROUTINE FILED.
    'ZZCR3' ROUTINE FILED.
    'ZZCR4' ROUTINE FILED.
    'ZZCR5' ROUTINE FILED.
    'ZZCR6' ROUTINE FILED.
    'ZZCR7' ROUTINE FILED.
    'ZZCR8' ROUTINE FILED.
    'ZZCR9' ROUTINE FILED.
    'ZZCR10' ROUTINE FILED.
    'ZZCR' ROUTINE FILED.
Error Codes Returned
202 The specified parameter is missing or invalid.
301 The passed flags are incorrect.

 


Reviewed/Updated: March 14, 2007