VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Database Server (DBS) API


FDA^DILF( ): FDA Loader

This procedure can be used to load data into the FDA. It accepts either the traditional DA( ) array or the IENS for specifying the entry. No validation of VALUE is done.

Format
1. FDA^DILF(FILE,IENS,FIELD,FlagS,VALUE,FDA_ROOT,MSG_ROOT)

2. FDA^DILF(FILE,.DA,FIELD,FlagS,VALUE,FDA_ROOT,MSG_ROOT)
Input Parameters
FILE

(Required) File or subfile number.

.DA

(Required for format 2) DA() array containing entry and subentry numbers.

IENS

(Required for format 1) Standard IENS indicating internal entry numbers.

FIELD

(Required) Field number for which data is being loaded into the FDA.

FLAGS

(Optional) Flag to control processing:

R Record identified by IENS or .DA is verified to exist. Do not use the R FLAG if the IENS or DA() array contain placeholder codes instead of actual record numbers.
VALUE

(Required, can be null) Value to which the FDA node will be set. Depending on how the FDA is used, this could be the internal or external value. For word processing fields, this is the root of the array that contains the word processing data. Internal and external values cannot be mixed in a single FDA.

FDA_ROOT

(Required) The root of the FDA in which the new node is loaded.

MSG_ROOT

(Optional) Root into which error, help, and message arrays are put. If this parameter is not passed, these arrays are put into nodes descendent from ^TMP.

Output

Successful completion of this call results in the creation of a node descendent from the root passed in FDA_ROOT. The format of the node is:

    FDA_ROOT(FILE,"IENS",FIELD)=VALUE

For more information on the format of the FDA, see the "Database Server Introduction."

By default, error messages are returned in ^TMP. If MSG_ROOT is passed, messages are returned there.

Example

This example loads the FDA for the first sub-subentry in the second subentry of entry number 4 for field number 4 in subfile number 16200.32 with a value of "NEW DATA" [the FDA is descended from ^TMP("MYDATA",$J)]:

    >S FILE=16200.32,IENS="1,2,4,",FIELD=4,VALUE="NEW DATA",ROOT=
      "^TMP(""MYDATA"",$J)"
    
    >D FDA^DILF(FILE,IENS,FIELD,"",VALUE,ROOT)
    
    >D ^%G
    
    Global ^TMP("MYDATA",$J
            TMP("MYDATA",$J
    ^TMP("MYDATA",736101456,16200.32,"1,2,4,",4) = NEW DATA

Error Codes Returned
202 One of the input parameters is not properly specified.
401 The file does not exist.
501 The field does not exist.
601 The entry does not exist.

 


Reviewed/Updated: March 10, 2007