VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Global File Structure


Attribute Dictionary: File Characteristics Nodes

Certain file characteristics are kept in the subtree descendent from ^DD(filenumber,0,. These characteristics with their subscripted location and brief explanation are:

Global Node Meaning
^DD(filenumber,0,"ACT") Post-Action
^DD(filenumber,0,"DDA") Data Dictionary Audit
^DD(filenumber,0,"DIC") Special Lookup
^DD(filenumber,0,"ID",field) Field identifiers
^DD(filenumber,0,"ID","WRITE") Write identifiers
^DD(filenumber,0,"IX",x-ref name,(sub)filenumber,field) Cross-references
^DD(filenumber,0,"SCR") Screens
^DD(filenumber,0,"VR") Version Number
^DD(filenumber,0,"VRPK") Distribution Package
^DD(filenumber,0,"VRRV") Package Revision Data

Post-Action
    ^DD(filenumber,0,"ACT")

After an entry has been selected, some action can be taken to examine or verify the selection. This executable code is stored at this global location. If you decide that the entry should not be selected, set Y=-1. See the "Advanced File Definition" chapter.


Data Dictionary Audit
    ^DD(filenumber,0,"DDA")

This node is set to "Y" if auditing is turned on for the data dictionary. The node is either nonexistent, null, or set to "N" if data dictionary auditing is not on.


Special Lookup
    ^DD(filenumber,0,"DIC")

A special lookup program can be written to facilitate selection from a particular file. If such a program is to be used, its name is stored at this location.

NOTE: The lookup program reference cannot be a labeled entry point to a routine. The routine's name is stored without the up-arrow (^); it cannot begin with DI. See the "Advanced File Definition" chapter.


Field Identifiers
    ^DD(filenumber,0,"ID",field)

Field Identifiers are defined using the FileMan Identifier option. The value at the node is a WRITE statement. If the identifier is to be used only to ask fields when a new entry is added, then the statement will only write null; otherwise, it will contain the code to write the external value of the field. An "I" is added to the second piece of the File Header when you add a field identifier, (as described in the "File Header" topic).

NOTE: WRITE statements in the FileMan-generated field identifier nodes are not executed when VA FileMan is in silent mode. Since FileMan generates the Field Identifier nodes, it knows their format. So in silent mode, FileMan places what would have been Written into an array instead for use by DBS calls. So Field Identifier nodes, although they contain WRITE statements, are compatible with GUI applications (in contrast to Write Identifier nodes).


Write Identifiers
    ^DD(filenumber,0,"ID","ASTRING")
    ^DD(filenumber,0,"ID","W1")
    ^DD(filenumber,0,"ID","W2")
    ^DD(filenumber,0,"ID","WRITE1")

You can use M code to define addtional custom identifier text to be displayed along with field identifiers. To do this, add "write identifier" node(s) one level descendent from ^DD(filenumber,0,"ID"). The write identifier nodes you add must be subscripted with strings that begin with an uppercase alphabetic character.

Set the value of each write identifier node to the M code that will produce the desired output. Write out your output using either the EN^DDIOL entry point (preferred) or the M WRITE command (not compatible with access to your file by GUI applications). In your M code for each write identifier node, you can refer to the following values which will be defined at the time the node is executed:

Y Current record number
Naked Reference Set to the 0-node of the entry

Write identifiers are displayed after any field identifiers are displayed. If there is more than one write identifier, they are displayed in the collating order of the write identifier subscripts.

Since you must hard-set any "WRITE" nodes, you must also add an "I" (if one isn't already there) to the second piece of the File Header.


Cross-references
    ^DD(filenumber,0,"IX",x-ref name,(sub)filenumber,field)

For cross-references, this node is set equal to null.

In Version 22 of FileMan, a new INDEX file has been introduced as an alternate way to define indexes on a file. The information is descendent from ^DD("IX". See a description under the "INDEX FILE" section.


Screens
    ^DD(filenumber,0,"SCR")

If you want to screen access to entries in a file, set the screen code into this node. The screen should be written like a screen put into the local variable DIC("S") for an ^DIC call. The code in this node is executed for each entry in the screened file. If $T=0 is returned when the node is executed, the entry being screened is unavailable for lookups, prints, inquiries, searches, or other actions.

In order for the screen in this global to be used, you must put a lower-case "s" into the second piece of the file's header following the file number, (as described in the "File Header" topic).


Version Number
    ^DD(filenumber,0,"VR")

This node is created during an INIT built by the VA FileMan package distribution routine (DIFROM) or an installation using the Kernel Installation and Distribution System (KIDS). It contains the current version number for the package that distributes this file. This node and the Distribution Package node are updated for any file sent by a KIDS installation. The only time these nodes are not updated is when a partial DD is sent. (For additional information, see the KIDS section in the Kernel Systems Manual, beginning with V. 8.0.)


Distribution Package
    ^DD(filenumber,0,"VRPK")

This node is created during an installation using the Kernel Installation and Distribution System (KIDS). It contains the name of the package that distributes this file. The only time this is not updated is when a partial DD is sent. (For additional information, see the KIDS section in the Kernel Systems Manual, beginning with V. 8.0.)


Package Revision Data
    ^DD(filenumber,0,"VRRV")

This optional node, if present, is created during an installation using the Kernel Installation and Distribution System (KIDS). The node is defined by the developer who distributes the package. It may contain patch or other package revision information used to designate the version of the file that is installed at the site. Updating this node is done in the KIDS Post Install Routine (formerly the POST-INIT with DIFROM/INITS) using PRD^DILFD(). (For additional information, see the KIDS section in the Kernel Systems Manual, beginning with V. 8.0.

 


Reviewed/Updated: March 10, 2007