VA FileMan V. 22.0 Getting Started HTML Manual Banner


 

Main Chapter Getting Started Manual Programmer Manual

Import and Export Tools


Define Foreign File Format Option

VA FileMan ...                                        [DIUSER]
      Other Options ...                                  [DIOTHER]
        Data Export to Foreign Format ...       [DDXP EXPORT MENU]
          Define Foreign File Format          [DDXP DEFINE FORMAT]
            **> Locked with DDXP-DEFINE

All exports depend on a Foreign Format. In addition, you can use Foreign Formats for imports as well. Usually, you will be able to use an existing format to properly format your data for export or import.

To find out what formats exist on your system, see the "Print Format Documentation" section. If no existing format meets your needs, use the Define Foreign File Format option to create a new one. You can use the Define Foreign File Format option to:

If you are using the Export Tool through Kernel's menu system, you need the DDXP-DEFINE key to use the Define Foreign File Format option.

The following is an example of making a new format from an existing one:

The Define Foreign File Format option is the first one on the Data Export to Foreign Format submenu:

 
Select OPTION: OTHER OPTIONS
Select OTHER OPTION: DATA EXPORT TO FOREIGN FORMAT  

Select DATA EXPORT TO FOREIGN FORMAT OPTION: DEFINE FOREIGN FILE FORMAT

You are first asked for the name of a format. If you want to create a new format from scratch, enter a new name. You will be presented with the ScreenMan form used to define a Foreign Format (see below).

NOTE: Whenever you are asked to choose a FOREIGN FORMAT, you can reply with either the format's NAME or one of its OTHER NAMES.

Here, an existing format's name is given:

 
Select FOREIGN FORMAT: 123 IMPORT NUMBERS

123 IMPORT NUMBERS foreign format has been used to create an Export Template.
Therefore, its definition cannot be changed.

This format has already been used to create an EXPORT template. Since that template relies on the information in the FOREIGN FORMAT file's entry at the time the template was created, you cannot modify this format. Instead, you are given the option of seeing what is in the format:

 
Do you want to see the contents of 123 IMPORT NUMBERS format? NO// YES

NAME: 123 IMPORT NUMBERS                FIELD DELIMITER: 032
  MAXIMUM OUTPUT LENGTH: 0              FORMAT USED?: YES
  QUOTE NON-NUMERIC FIELDS?: YES        PROMPT FOR DATA TYPE?: YES
  SEND LAST FIELD DELIMITER?: YES       SUBSTITUTE FOR NULL: 0
 DESCRIPTION:  This format exports data for use with LOTUS 1-2-3
 spreadsheets.  Non-numeric fields will be in quotes.  Each field
 will be separated by a space.  A 0 will be exported for null-
 valued numeric fields in the primary file.
 USAGE NOTES:  To import into 1-2-3, choose FILE->IMPORT->NUMBERS.

As this example shows, the FORMAT USED? field is YES. This indicates that the format has been used to create an EXPORT template.

Whether you ask to see the contents of the format or not, you are next given the chance to make a copy of the format in order to modify it. You enter a name for the new format that does not yet exist in the FOREIGN FORMAT file:

 
Do you want to use 123 IMPORT NUMBERS as the basis
for a new format?  NO// YES   (Yes)

Name for new FOREIGN FORMAT: CLONE 123 IMPORT NUMBERS

  Are you adding 'CLONE 123 IMPORT NUMBERS' as 
    a new FOREIGN FORMAT (the 22ND)?  No// Y   (Yes)

When the new format has been created, you are given the opportunity to modify it. The ScreenMan form that follows is used for editing Foreign Formats:

Example of a Foreign File Format Form (page 1).

The meaning of the fields on this page of the form is described in the "FOREIGN FORMAT File Attributes Reference" section. You are presented with the same form whether you are modifying an existing format or creating one from scratch.

NOTE: It is important to always create and edit formats using the Data Export options because validity checks on the relationships between the various fields are built into the ScreenMan form. If you enter inconsistent data, you will be alerted when you try to exit the form.

There is a second page of the form that contains documenting information about the format. The second page allows you to enter a description and usage notes for the format. You can also enter other names for the format (in a Multiple); these other names can then be used to reference the format anywhere in the Export or Import Tools.

Here is what the second page looks like with the Multiple's "pop-up" window opened:

Example of a Foreign File Format Form (popup, page 2).

After you have completed and filed the ScreenMan forms, you are returned to the Data Export submenu. You can now use the new format to create an EXPORT template or do an import.

 


Reviewed/Updated: March 4, 2007