VA FileMan V. 22.0 Getting Started HTML Manual Banner


Main Chapter Getting Started Manual Programmer Manual

Import and Export Tools

4. Choose Entries/Export Data

In the final step to export data, use the Export Data option to select which entries from the file to export, and then perform the export.

First, choose which entries to export with a "SEARCH" dialogue; then choose the order of the exported entries with a "SORT BY" dialogue (you are not given the "SORT BY" dialogue, if you are exporting fields from Subfiles.) Finally, specify the device to send the exported data to.

During either the Search or Sort process, you can use previously created SEARCH and SORT templates. Those templates need not have been originally made during a data export; however, SORT templates that contain unacceptable qualifiers should not be used. At the "SORT BY:" prompt, you can only use the following subset of sort qualifiers:

Sort Qualifiers Description
' To not sort. Used when you want to use the "FROM … TO" dialogue to restrict the entries to be exported.
- To sort in reverse order.
;Ln To sort on the first n-characters only.
;TXT To sort following strict ASCII sorting sequence.

The "Print" and "Search" chapters of the "VA FileMan Getting Started Manual" contain more detailed information about searching and sorting.

Export Example

Here is an example of an export using the "PATIENT TO 123" EXPORT template created in Step 3. You begin by identifying the file and the EXPORT template that you want to use for the export. Do not enclose the template's name with brackets. Again, you can delete the EXPORT template after a successful export, if you want.

Because there is a Multiple involved, you are told that you will not have the opportunity to sort. Then, you are given the opportunity to search the file for entries to export.



Choose an EXPORT template: PATIENT TO 123     **EXPORT**
                         (OCT 30, 1992@15:08) USER #7  FILE #99002

Do you want to delete the PATIENT TO 123 template
after the data export is complete?
Enter Yes or No: NO// 

Since you are exporting fields from multiples,
a sort will be done automatically.
You will not have the opportunity to sort the data before export.

Do you want to SEARCH for entries to be exported? NO// YES

  -A- LESS THAN DATE: 1980   (1980)


IF: A//   DATE OF BIRTH LESS THAN 1980 (1980)


If Multiples had not been involved, you would now be able to respond to the SORT BY dialogue. You can do the same things with sort here that you can do when using the Print File Entries option.

What Device to Send Export Data To

After you complete the sort dialogue, you are immediately given the "DEVICE:" prompt. Choose what device the exported data should be sent to:


If you press the Enter/Return key at the "DEVICE:" prompt, the export output will be displayed on your screen. Sending the formatted export data to the screen allows you to use a PC-based screen capture to put the data into a file. This file would be a readable ASCII file on that computer. This method of transferring the data into a file is a simple one that will often be successful and convenient, especially if the importing application is on the same PC.

When using a screen capture to create a file from the exported data, you must consider the peculiarities of your communication and terminal emulation software. Your communication application, for example, may intercept certain control characters (like the <TAB>, ASCII 9) and convert them into something else. This may cause the import to fail. Also, your terminal emulation may automatically "break" lines at 80 characters by inserting an unwanted carriage return or line feed. When emulating VT-100 and other ANSI terminals, you can avoid this last problem by turning wraparound mode off.

CAUTION: When exporting data to your terminal's screen, there will be no page breaks. Therefore, there is no graceful way to interrupt the export once it has begun.

Sending Export Data to a Host File

Having data printed on-screen is of little use, if you are using a terminal with no screen-capture capabilities. An alternative is to send the data to a file on the host system, for example, to a VMS file if you are using DSM. Another advantage to sending data to a Host file is that only the exported data will be in the file. (Often, screen captures will unavoidably contain extraneous parts of the user's dialogue prior to or after the export.) To export your data to a file, at the "DEVICE:" prompt, send your export output to an HFS-type device.

Your IRM should be able to help you, if you're not sure how to use HFS devices. The "Kernel Systems Manual" also describes how to send output to Host files, including how to set up and use HFS-type devices.

When a Host file is created, you must move that ASCII file to the computer on which the importing application resides. A file transfer protocol, such as KERMIT or XMODEM, can be used to move this file.

The export can be queued, if it is not sent to the screen. Queuing the export is recommended for large files and for complex sorts of the data.

NOTE -- On HFS Device Setup on OpenVMS Systems: DSM for OpenVMS requires that you add a command parameter to the OPEN command, if you export records longer than 512 characters to a Host file. The parameter is RECORDSIZE=nnnn, where "nnnn" is greater than the longest record that you are exporting. If you are using Kernel's DEVICE file (#3.5), the OPEN PARAMETER field for the HFS device you are using should be edited to look like "(NEW:RECORDSIZE=nnnn)".

Sample Output

The data below has been prepared for import by Lotus 1-2-3, so it need not be easily read by people. However, you can see that text fields are surrounded by quotes; empty text fields consist just of two quotes (""). A space is in between each field's value. Numeric values have no quotes. If a field defined as numeric in the VA FileMan data dictionary has no value, a zero (0) is output because this format has SUBSTITUTE FOR NULL set to "0".

"YELLOW,TOMMY" "m" "" "FLU" 0 


Reviewed/Updated: March 4, 2007