VA FileMan V. 22.0 Getting Started HTML Manual Banner


 

Main Chapter Getting Started Manual Programmer Manual

Extract Tool


Create Extract Template Option (5 of 9)

When selecting destination fields for data to be extracted into, keep in mind that the INPUT transforms of the destination fields are executed for each field value. For an extracted record, the value of each field in the record is tested against the INPUT transform of its destination field. If any field fails the INPUT transform, the extract for the entire record will fail. Make sure the INPUT transforms on the destination fields are appropriate for the data you will be extracting.

NOTE: If you are extracting a Subrecord using the EXTRACT^DIAXU entry point and its FILING_LEVEL parameter, and a value fails the INPUT transform, only the extract of the Subrecord will fail.

When you are ready to build an EXTRACT template, you must select the Create Extract Template option. Using this option, you will identify not only the field you wish to extract from the source file but also its corresponding field in the destination file. The EXTRACT template is the only type of PRINT template used in the Update Destination File option.

Building an EXTRACT template requires entering valid field numbers or field names at the "EXTRACT FIELD" prompt. Since VA FileMan stores EXTRACT templates in the PRINT TEMPLATE file (#.4), this option uses the term "PRINT TEMPLATE" instead of "EXTRACT TEMPLATE" in the dialogue. For each extract field that you identify in the source file, at the "MAP TO" field prompt, enter the destination file field name or field number that will receive the data. Only those fields defined in the EXTRACT template will appear in the destination file.

Keep in mind that the value of each field in an extracted record is tested against the INPUT transform of its destination field. If any value fails its destination field's INPUT transform, the extract for the entire record will fail. Make sure the INPUT transforms on the destination fields are appropriate for the data you will be extracting.

NOTE: If you are extracting a Subrecord using the EXTRACT^DIAXU entry point and its FILING_LEVEL parameter, and a value fails the INPUT transform, only the extract of the Subrecord will fail.

When you arrive at the "STORE EXTRACT LOGIC IN TEMPLATE:" prompt, enter the name that you wish to assign to your new EXTRACT template. To edit an existing EXTRACT template, on the other hand, simply enter its name at the "FIRST EXTRACT FIELD:" prompt -- using the following format:

      "[Extract templatename"

Here is a sample of the dialogue that you will encounter when you are ready to build an EXTRACT template:

Select EXTRACT OPTION:  CREATE EXTRACT TEMPLATE
 
This option lets you build a template where you specify fields to extract and
their corresponding mapping in the destination file. 

For more detailed description of requirements on the destination file, please
see your VA FileMan User Manual.

OUTPUT FROM WHAT FILE: CHANGE   (956 entries)
DESTINATION FILE: CHANGE EXTRACT   (0 entries)

FIRST EXTRACT CHANGE FIELD: .01   NO.
MAP NO. TO CHANGE EXTRACT FIELD: .01   NO.

 THEN EXTRACT CHANGE FIELD: VERSION
 MAP VERSION TO CHANGE EXTRACT FIELD: VERSION

 THEN EXTRACT CHANGE FIELD: PROGRAMMER
 MAP PROGRAMMER TO CHANGE EXTRACT FIELD: PROGRAMMER

STORE EXTRACT LOGIC IN TEMPLATE: CHANGE EXTRACT
  Are you adding 'CHANGE EXTRACT' as a new PRINT TEMPLATE?  No// YES   (Yes)

While you are creating your EXTRACT template, VA FileMan performs a few validation checks. Inspecting the extract field and its corresponding field in the destination file, VA FileMan checks to see if both fields are compatible in several important areas, including Data Type, minimum length, maximum length, minimum values, maximum values.

If a discrepancy exists, VA FileMan will display an error message such as the following statement:

    PROGRAMMER field in CHANGE EXTRACT file should have a maximum 
    length of at least 30 characters.

After VA FileMan displays an error message about your destination field, you can continue building your template. You will not, however, be able to update the destination file until you have corrected the problem.

Here is the warning that you will see when any source field and its corresponding destination field fail one of the validation checks:

    THE DESTINATION FILE DATA DICTIONARY SHOULD BE MODIFIED PRIOR TO 
    ANY MOVEMENT OF EXTRACT DATA! 

At any "MAP 'FIELD NAME' TO 'FILE NAME' FIELD:" prompt, entering two question marks (" ??") yields a list of the selectable fields in the destination file. The list gets shorter as fields are selected to ensure that no two extract fields map information to a single field in the destination file.

 


Reviewed/Updated: March 4, 2007