VA FileMan V. 22.0 Getting Started HTML Manual Banner


 

Main Chapter Getting Started Manual Programmer Manual

Import and Export Tools


3. Create Export Template Option

The next step to export data is to create an EXPORT template with the Create Export Template option. The EXPORT template combines the SELECTED EXPORT FIELDS template (created in Step 2) with a FOREIGN FORMAT (see Step 1).

Besides choosing a SELECTED EXPORT FIELDS template and a FOREIGN FORMAT, you will be asked for any additional information that is needed to fully define the export. If you do not supply the requested information, the EXPORT template cannot be created. Values in the FOREIGN FORMAT entry you choose determine whether or not you will be prompted for more information.

The following table indicates which values for which FOREIGN FORMAT fields will result in prompts:

FOREIGN FORMAT Field Value Information Required
FIELD DELIMITER "ASK" The character or characters to separate fields.
RECORD DELIMITER "ASK" The character or characters to separate records.
RECORD LENGTH FIXED? "1" or "YES" The number of characters in each field to be exported.
NEED FOREIGN FIELD NAMES? "1" or "YES" The name of each field recognized by the importing application.
MAXIMUM OUTPUT LENGTH "Ø" The maximum number of characters on each line of output, usually the longest possible exported record.
PROMPT FOR DATA TYPE? "1" or "YES" The DATA TYPE of each exported field; possible choices are FREE TEXT, NUMERIC, or DATE/TIME.

In the example below, the file and field specifications in the SELECTED EXPORT FIELDS template example from Step 2 are combined with the 123 Import Numbers FOREIGN FORMAT:

 
Select DATA EXPORT TO FOREIGN FORMAT OPTION: CREATE EXPORT TEMPLATE

OUTPUT FROM WHAT FILE: PATIENT   (10 entries)

Enter SELECTED EXPORT FIELDS Template: PATIENT TEST   
**SELECTED EXPORT FIELDS**  (OCT 30, 1992@11:32) USER #7  FILE #99002

Do you want to see the fields stored in the PATIENT TEST template?
Enter Yes or No: NO// YES

FIRST PRINT FIELD: NAME// 
THEN PRINT FIELD: INTERNAL(SEX)// 
THEN PRINT FIELD: $E(RELIGION:CLASSIFICATION,1,5)// 
THEN PRINT FIELD: DIAGNOSIS// 
  THEN PRINT DIAGNOSIS SUB-FIELD: DIAGNOSIS// 
  THEN PRINT DIAGNOSIS SUB-FIELD: AGE AT ONSET// 
  THEN PRINT DIAGNOSIS SUB-FIELD: // 
THEN PRINT FIELD: // 

Do you want to use this template?
Enter Yes or No: YES// 

Do you want to delete the PATIENT TEST template
after the export template is created?
Enter Yes or No: NO// 

When asked if you want the SELECTED EXPORT FIELDS template deleted, answer YES only if you know you won't need the template again. If an EXPORT template is not successfully created, the SELECTED EXPORT FIELDS template will not be deleted.

Next, identify the FOREIGN FORMAT to use, and name the EXPORT template that you're creating. You can't overwrite an existing PRINT template:

 
Select FOREIGN FORMAT: 123 IMPORT NUMBERS  **DISTRIBUTED BY VA FILEMAN**

Enter name for EXPORT Template: PATIENT TO 123
  Are you adding 'PATIENT TO 123' as 
    a new PRINT TEMPLATE (the 197TH)?  No// Y   (Yes)

After you choose the EXPORT template name, you are prompted for any additional information needed. In this example, the format does require additional information: the DATA TYPE for each field (in this situation the defaults derived by the Export Tool are correct) and the maximum length of each record:

 
Enter the data types of the fields being exported below.

Do you want to continue?
Enter Yes or No: YES// 

NAME: FREE TEXT//   FREE TEXT
INTERNAL(SEX): FREE TEXT//   FREE TEXT  
$E(RELIGION:CLASSIFICATION,1,5): FREE TEXT//   FREE TEXT  
DIAGNOSIS in DIAGNOSIS subfile: FREE TEXT//   FREE TEXT  
AGE AT ONSET in DIAGNOSIS subfile: NUMERIC//   NUMERIC

Enter the maximum length of a physical record that can be exported.
Enter '^' to stop the creation of an EXPORT template.

MAXIMUM OUTPUT LENGTH: 100

     Export Template created.

The Export Tool checks to make sure that your SELECTED EXPORT FIELDS template does not contain fields from Subfiles (Multiples) that are not descendent from each other. (See the "Exporting Data From Multiples" topic in this section.) If you have not followed that restriction, you will receive an error message. The SELECTED EXPORT FIELDS template would have to be modified.

 


Reviewed/Updated: March 4, 2007