Main BASIS Page
Main Advantage Page
This Issue's Table of Contents

Convert With Ease Using BASIS Utilities

Data Server At Your Service Table of Contents Solutions Showcase: Scaling The Internet Everest With The Basic Web Utility
By Jim Douglas

As a consultant to BASIS, Jim brings more than 15 years of experience developing and supporting Business Basic solutions.

BBx®, the language behind the PRO/5® and Visual PRO/5® products, belongs to a family of similar languages known generically as Business Basic. These languages, which date back to the early 1970s, all share a common core syntax. They've diverged in the past several years, especially in how they address the requirements of GUI environments like Microsoft Windows. But legacy applications, which are typically character oriented, can be moved to BBx with a minimum of difficulty.

Why Convert?

If your application is working well enough as is, why would you want to put in the time, effort and expense to move it to BBx? One of the most pressing reasons, especially now that we're into 1999, is the Year 2000 issue. Some older Business Basic dialects do not correctly handle dates past 1999. For example, Thoroughbred Basic versions 8.2.0 through 8.3.0 will refuse to load after December 31, 1999 (see www.tbred.com/year2000.html).

Editor's note: You can find the BASIS Year 2000 compliance statement and other Year 2000 information on the BASIS Web site at www.basis.com/year2000.

THE NEW FEATURES: The conversion utilities have been reviewed and significantly enhanced for PRO/5® and Visual PRO/5®. Here are some of the most important new features:
  • Conversion utilities have been added for current versions of MAI OpenBASIC, Thoroughbred Basic and ProvideX. Detailed conversion notes are included for these systems. These notes detail sample code and suggested strategies for handling conversions that must be done manually.
  • File list support has been added to all BXSND programs.
  • Programs as large as 1 MB can now be converted. The previous limit was 64 KB.
  • In some cases, Year 2000 will be the main reason for converting your legacy Business Basic systems to BBx (PRO/5 or Visual PRO/5), but it's by no means the only reason. In most cases, you'll experience increased reliability and improved performance when you move your business systems from an old - possibly obsolete or unsupported - platform to a modern UNIX, Linux or Windows machine.

    Another good reason to move to BBx is to take advantage of features that aren't available on the legacy system. Maybe you need the ability to work with large files (up to 4GB). Or you might want to interface with the Internet in general.

    Or maybe you want to be able to integrate your legacy application with Windows or UNIX-based programs. There are many good reasons to move your applications to BBx.

    The Conversion Process

    Once you've decided to move your legacy Business Basic application to BBx, how do you get started? The key is the BASIS conversion utilities, which are included free with both PRO/5 and Visual PRO/5 and which are available from the BASIS Web site at www.basis.com/products/utilities.html. A detailed description of the conversion process is available in the file convert.txt in the utility distribution, but here's a brief overview:

    1. The first thing to do is decide how to move your programs and data files from the legacy system to the new system. There are two possibilities: a serial (port-to-port) connection or putting the information on a removable storage device that can be moved between systems (typically, a tape cartridge).

    2. The conversion process uses a program called BXSND on the legacy system and another program called BXRCV on the BBx system. There's only one BXRCV program, written in BBx. Several versions of the BXSND program exist, each written in a specific dialect of Business Basic. These programs are supplied in text form in a series of files named LISTING.*. For example, LISTING.OB is the BXSND program for MAI OpenBASIC.

      Once you have BXSND running on the legacy system, you'll need to give it a list of the programs and data files that you want to transfer. All of the BXSND programs can accept a list of programs and data files keyed in manually, but it may be easier to put this list in a separate text file instead. The BXSND programs assume that any file that ends in .f is a "filelist" file containing a list of files that needs to be transferred.

    3. After BXSND has the list of programs and files it needs, the files are sent directly to a running BXRCV program (if you're using a serial connection) or to an intermediate file (if you're planning to use common media).

    4. Finally, the BXRCV program reads the legacy programs and data files (either directly from the BXSND program or from the intermediate file BXSND created) and stores them on your new system as BBx programs and data files.

    But storing the programs and data files is only the first part of the conversion process. This is where the real conversion work starts. We'll talk about programs and data files separately.

    Converting Programs

    The various Business Basic dialects are similar, but they're not identical. BXRCV takes care of most of the differences that can be handled with simple substitutions. These substitutions vary from onedialect to another; you can find them listed in the convert.txt file. For MAI OpenBASIC, Thoroughbred Basic and ProvideX, substitutions are listed in the conversion notes (see the files ob.txt, tbd.txt and pvx.txt). These conversion notes also describe changes that cannot be handled automatically by BXRCV and must be done manually.

    After you've transferred your program files, you should scan them for syntax errors. Some verbs and functions can't be automatically converted to BBx and will remain in the program as syntax errors. The PRO/5 and Visual PRO/5 standard utility program _search will list all lines with syntax errors when you perform any search and replace operation. This listing can be used as a reference to tell you where the programs need to be modified to conform to the new system's syntax rules. Various statements will show verbs and functions with question marks, like FID?( or TSK?(. The question mark is inserted by BXRCV wherever it detects a verb or function that will probably require manual adjustment. This forces the line to appear as a syntax error in listings, which brings it to your immediate attention.

    Most versions of Business Basic come with utility programs that perform system-level tasks. For both technical and legal reasons, these programs can't be moved to BBx. If the application uses any vendor-supplied utility programs, you'll need to review the code and find, or create, equivalent programs. Also, if a program file is protected (saved in a format that disables access to the source code), it can't be transferred to a new system.

    Converting Data Files

    Most data files convert without any special effort. (MAI OpenBASIC MULTI files are a special case; see the ob.txt conversion notes for details.) In most cases, BXSND and BXRCV convert the files to their closest BBx equivalent. If the data files use only printable characters, you're probably free and clear. Any data files that use binary data (typically using the BIN() or PCK() functions) will need to be carefully reviewed, especially when moving from systems that used high order ASCII (printable characters in the range $A0$ through $FE$ as opposed to $20$ through $7E$).

    This new package of conversion utilities is included with PRO/5 and Visual PRO/5. You can also visit the Conversions page on the BASIS web site at www.basis.com/conversions.

    Data Server At Your Service Table of Contents Solutions Showcase: Scaling The Internet Everest With The Basic Web Utility

     
     
    Copyright 1999, BASIS International Ltd. All rights reserved.
    Terms of Use
    .