APPENDIX B - FORMATTING ASCII EXPORT FIELDS
Virtually all files in HiFinance can be exported to ASCII. This is a standard format understood by all utility programs, such as Spreadsheets, Databases and Word-processors. This gives you the flexibility to format reports, etc. in ways not otherwise available in HiFinance.
ASCII files are defined as flat files containing only uncompressed, alphanumeric data, one record per line with <CR> or <CR> <LF> at the end of each line. Within this structure it is still possible to choose the format of each field. Each program within HiFinance allows you to access a screen, which sets the defaults for these options. The screen is always accessed by <F9> and is global to all ASCII programs.
It is advised that you give the export file a name ending in .CSV to make programs such as Excel automatically understand the format. It is possible to call them what you like but you have to go through extra steps to import them into programs like Excel. The default name is normally the data file name with .CSV replacing .DAT and the directory initially defaults to your normal data directory. You can change it from this, as required.
When using DOS based installations (including MS-Windows) you should limit the names of directories to 8 characters without any imbedded spaces. This is a limitation in some version of Windows but is not a limitation in Unix. If HiFinance finds that the operating system rejects the name, an error will be displayed and you will need to start the export procedure again. In either case, do not imbed spaces. HiFinance will truncate any characters after the first space it finds as spaces confuse most operating systems - even the ones that purport to work correctly with long file names (including Windows and Unix).
It is not advisable to save the export into the root directory. This can clutter the file system and cause errors in other programs. Create a new directory (folder) and save the export to that. Eg a valid but poor name would be c:\EXPORT.csv a better name would be c:\dload\EXPORT.csv. Remember to create c:\dload first.
Typically the screen will appear as follows:
The list of options is as follows:
FILE NAME This field contains the name of the file you wish to create. The default name is #<FILENAME>.CSV (where # is replaced by the data directory name, eg. H:\HF4DATA\COMP1\ and <FILENAME> is normally the source filename as it exists in the data directory.). However, this can be changed to any valid DOS (or UNIX) path name. Be very careful if you enter a name suffixed by DAT, KEY, BAT, EXE or COM as it is possible to overwrite normal files used by HiFinance. In a DOS environment, it is also possible to choose a name such as PRN or COM1 so that the export will be sent directly to a printer or a communications port. HiFinance will automatically truncate the name from the first space encountered, so do not leave embedded spaces or leading spaces in the name. HiFinance will warn you if the file you are about to create already exists.
SURROUND ALPHA FIELDS WITH QUOTATION MARKS Some applications require quotation marks " around alpha-numeric fields, eg. names. To force HiFinance to do this, enter a Y here.
SURROUND NUMERIC FIELDS WITH QUOTATION MARKS Some applications require quotation marks " around numeric fields, eg. dollar values. To force HiFinance to do this, enter a Y.
SEPARATE FIELDS WITH A SPACE If it is necessary to leave a space between fields, enter Y here, otherwise HiFinance will not leave spaces between export fields. This function is sometimes referred to as space delimited. It is rarely used by itself.
SEPARATE FIELDS WITH A COMMA Most word-processor and spreadsheet programs require a comma between each successive field. This is referred to as comma delimited. If your application does not require a comma, enter N here.
REMOVE REDUNDANT SPACES FROM ALPHA FIELDS Word-processors normally accept alphanumeric fields blindly. This can leave unnecessary spaces in a mail merge. To avoid this, enter Y here. HiFinance will then remove all leading and trailing spaces from alphanumeric fields when they are export. This procedure is more time consuming and should not be used if it is not required. Furthermore, some older spreadsheet programs, eg. LOTUS V2.2 become confused by varying field lengths. For these programs, you must always answer N.
REMOVE REDUNDANT SPACES FROM NUMERIC FIELDS This question is similar to the previous one but relates to numeric fields only, eg. dollar values. As with the previous question, you should normally answer Y for word-processors and N for spreadsheets.
SHOW ALL DIGITS IN DATE FIELDS Certain spreadsheet programs, eg Excel V7 and above, have a bug that causes them to read 1/01/2001 as an alpha-field rather than as a date. To work around this bug, HiFinance can be told to export the field with all leading digits exposed, ie 01/01/2001. If you experience this problem, answer Y in for this option, otherwise it is preferable to leave it as N.
INCLUDE HEADING IN FIRST LINE OF EXPORT If you intend to use the output for mail-merge purposes, it is preferable to head each output with the name of the field. HiFinance will export a unique, and consistent, name for you to use, if you enter a Y here. For spreadsheet programs, the headings do not usually get in the way.
EXPORT LONG NAMES IN HEADINGS This option is only relevant if you have answered Y to the previous field. The screen that follows this one in the export program is a list of all possible fields. These appear as short (maximum 20 characters) name, which is the normal name, and a sometimes much longer, more descriptive name. For instance, period dates may have LAST YEAR BALANCE 5 as the short name and BALANCE NOVEMBER OF LAST-YEAR as the long name. Typically you would use the short name in exports because the heading will not change from export to export. If you wish to export the long name, answer Y here. Note that if you intend to use the ASCII IMPORT function, you should use the short name option.
Note that the options you choose are specific to the file you are exporting, and your USERCODE. You can thus choose specific export options for, say General Ledger Transactions and different options for Creditor Transactions. Also, the options you choose (eg file name) are independent of anyone else logging in with another USERCODE. It should also be noted that your choices are saved and become the initial choices (for you) next time you wish to export the same file.