VA FileMan V. 22.0 Programmer Manual Banner


 

Main Chapter Getting Started Manual Advanced User Manual

Extract Tool API


EN^DIAXU: Extract Data

The extract tool has been enhanced and this has resulted in a number of changes to the output variables of the EN^DIAXU entry point.

This entry point extracts data specified in the EXTRACT template for a single entry and moves that data to a destination file. The source entry may be deleted after the extract process is completed.

If you need to extract in batches (more than one entry), you should use the EXTRACT^DIAXU entry point instead.

Input Variables
DIAXF

(Required) The number of the file that contains the source entry.

DIAXT

(Required) The EXTRACT template name enclosed in brackets in the source file that contains specifications of data to be extracted.

DIAXFE

(Required) Internal entry number of the source entry from which data will be extracted.

DIAXDEL

(Optional) This variable, if defined, tells the program to delete the source entry. If not defined, the source entry is unchanged.

Output Variables (Successful Extracts)

If the extract process was completed and the data was successfully moved to the destination file, the variables are returned as follows:

DIAXDA

Internal entry number of entry created in the destination file.

In addition to DIAXDA,

  ^TMP("DIAXU",$J,"RESULT",DIAXF,DIAXFE)=DIAXDA

is returned. New/Updated with VA FileMan V. 22.0

DIAXNTC

No longer returned. For batch processing of extracts, you should use the EXTRACT^DIAXU entry point instead of this one. New/Updated with VA FileMan V. 22.0

DIAXFE

No longer killed upon exit. New/Updated with VA FileMan V. 22.0

DIAXF

Not killed.

DIAXT

Not killed.

DIAXDEL

Not killed.

Output Variables (If an Error Occurs)

If an error occurs during the extract process, the following variable and global array are returned instead:

DIERR

Contains the following two ^-pieces of information:

  1. Number of errors generated during the call, and

  2. Total number of lines of the error messages

In addition, the following "RESULT","ERR" node is returned:

  ^TMP("DIAXU",$J,"RESULT","ERR",file#,ien)

For example,

  ^TMP("DIAXU",$J,"RESULT","ERR",662001,5)

No longer indicates the total number of errors encountered during the extract process. New/Updated with VA FileMan V. 22.0

(array in ^TMP)

Error information is returned in ^TMP("DIERR",$J), in the same format that error information is returned for DBS calls. New/Updated with VA FileMan V. 22.0

Please refer to the "How to Use the Database Server" section for a complete description of this array.

DIAXDA

Not defined.

All input variables

Left defined.

Error Codes Returned

This entry point calls $$FIND1^DIC, LIST^DIC, UPDATE^DIE, $$GET1^DIQ, and GETS^DIQ; any errors returned by these entry points can also be returned by EN^DIAXU.

In addition, the following errors may be returned:

201 An input variable is missing or invalid.
601 The entry does not exist.

 


Reviewed/Updated: March 10, 2007