Toolkit for Conversion from BBx®

BBx® Conversion Toolkit (*conv.bbx/gui_cv)

The GUI_CV utility has been designed to convert BBx1/2/3/4, Pro/5 and Vpro5 programs and files to PxPlus without the need for a BBx® executable on the computer that will be performing the conversion.

GUI_CV will convert all BBx® data files that were available in BBx/4 (DIRECT, SORT, MKEYED, INDEXED and STRING). Data files that were added to later BASIS products cannot be converted to PxPlus by means of this program. XKEYED files and +2GB files should be converted using the PxPlus *conv.bbx/CV program (which does require a working BASIS executable).

Although GUI_CV will convert all program levels up to BBj (but not including BBj), special care has to be taken when converting a TAOS generated program. See Program Options below.

Settings on the Opening Screen

Log File Options Folder Tab

File Options Folder Tab

Program Options Folder Tab

Opening Screen

The following settings can be made on the Opening Screen:

Test for errors without converting

By selecting Test for errors without converting, you can step through the entire conversion process to produce an exception report (log file) in advance without actually converting any of the programs or files. The exception report can then be analysed to determine if there will be any compatibility issues.

Input programs/files

Enter the parent directory for the BBx® programs and data files. You can then click the [Resolve] button to force GUI_CV to scan that directory and all sub-directories for all files. Once these are displayed in the listbox, you can select individual files and remove them from the list of programs/files to convert by clicking the [Remove] button.

Output directory

Enter the PxPlus output directory. You must select a directory different from the input directory (the conversion program will not allow the input and output directory to be the same). GUI_CV will re-create the entire tree structure as it exists in the input directory.

Path & name of log file

The log file is useful to determine the overall status of the conversion. It is a flat ASCII file that can be accessed with any text editor or word processor. The log will contain any error or warning messages generated by the conversion. It can also provide a complete list of all files and programs converted. If you do not want the converter to write a log file, you must leave this field empty.

Log File Options

The following are the conversion logging settings that can be set in the Log File Options folder tab:

Log name of converted file

This will store all names of the converted programs/files into the log file.

Log pgm lines that contain $0A$

Will list each and every program line that contains $0A$ into the log file.

Log files with non-ascii characters

Will write the name of the data file into the log file when a non-ascii character was found in any of the records of that file. Non-ascii in this context are all characters with a value less than a space or greater than a tilde in the ASCII table (all characters below 0x20 and above 0x7E).

Log record with non-ascii characters

See Log files with non-ascii characters. The difference here is that each and every RECORD that contains non-ascii data will be written to the log file.

Append to log file

Will append error and warning messages to the end of the log file. Not selecting this setting will cause an existing log file to be overwritten.

Log item(s)

You can select individual program functions/directives that should be written into the log file in case the converter encounters them.

File Options

The following are the data file conversion options that can be set in the File Options folder tab:

VARIABLE length record files

The conversion will create all of the KEYED files using variable length records, which will reduce disk space requirements and increase file performance.

No maximum record count

Will create all KEYED files with no preset limit to the number of records in a file.

Don't convert STRING files

All STRING (non-BBx® files) will be skipped during conversion.

Create files with $0A$ separator

All KEYED files will be created with a $0A$ field separator instead if the standard $8A$ separator and GUI_CV will no longer replace $0A$ in data records by $8A$ (the data records will remain unchanged).

In addition, select the Use $0A$ in Direct/Mkeyed/Indexed setting on the Program Options tab to change the BBx® file creation verbs to create files with a $0A$ field separator.

Oem to Ansi conversion in data files

Setting this option will cause the converter to replace the DOS native character set with Windows characters.

Important Note:
Do not set this option if you know your data contains either binary or high-ASCII (umlaut) data.

Add indices after conversion

All multi-keyed files will be created with the primary key only. Only after converting all data will GUI_CV add the secondary keys to the file. This will result in a huge performance gain when converting larger files or files with a large number of secondary keys.

Use direct BBx® file access if available

If the PxPlus executable is using BBx® Keyed File Read, GUI_CV will access the BBx® data through this interface and no longer analyse the binary contents of the BBx® data. This may result in a performance gain during conversion.

Convert SORT files to KEYED files

Converts SORT files to KEYED files.

Program Options

The following are the program options that can be set in the Program Options folder tab:

Oem to Ansi conversion in programs

Setting this option will cause the converter to replace the DOS native character set with Windows characters.

Add '-' in front of 'window' title

The conversion will insert a '-' character in front of a window title so that the title position is compatible with BBx® (this to prevent misalignment with data in the window).

Prefix reserved variables with the prefix below

Selecting this option will cause GUI_CV to prefix all BBx® program variables that are conflicting with PxPlus system variables and/or functions with a prefix of your choice (see below).

By default, GUI_CV will put BB__ in front of the variable name.

Example:

     0010 LET RET=99

will become …

     0010 LET BB__RET=99

Variable prefix

Enter the variable prefix of your choice (see above).

Remove BBx® ERR=20 from source pgm lines

BBx® program code that has a syntax error in the BBx® environment will result in a PxPlus line of code that still has a syntax error on it.

By selecting this option, you can force GUI_CV to re-compile the line with the error that could result in a correct line of code in the PxPlus environment.

Example:

This line of BBx® code:

     0010 *ERR 20
     0010 msgbox a$,"Hallo","!,CANCEL",b$

will convert to PxPlus:

     0010?**ERR= msgbox a$,"Hallo","!,CANCEL",b$

… when this option is not selected.

Setting this option will result in the PxPlus code:

     0010 MSGBOX A$,"Hallo","!,CANCEL",B$

Program specifics

PvxPLUS Template Logic

The standard PxPlus template behaviour is not fully BBx® compatible. By selecting this option, GUI_CV will convert BBx® template code to PvxPLUS templates that should be fully compatible. If you are converting a TAOS generated program, you should enable this setting.

PvxPLUS OPEN Logic

BBx® STRING file handling differs from the standard PvxPLUS behavior. When selecting this option, all OPEN verbs will be converted to OPEN+ verbs in the resulting PvxPLUS programs. A SERIAL PvxPLUS file, opened with OPEN+, will behave just like a BBx® STRING file. OPEN+ will also scan the OPEN options for O_CREATE/TRUNC/RDONLY/... and act accordingly.

Use $0A$ in Direct/Mkeyed/Indexed

PxPlus normally creates files that use field separator $8A$. By selecting this setting, the BBx® file creation verbs DIRECT, MKEYED and INDEXED will be changed to include the ,SEP=$0A$ file option to force creating files that use the $0A$ separator.

In addition, check the Create files with $0A$ separator setting in the File Options tab to convert BBx® files to PxPlus files with a $0A$ separator.

CISAM -> KEYED

Replace all occurrences of CISAM with CREATE TABLE.

INFO( ) -> FN%INFO$( )

Replace the BBx® INFO( ) function with the global PxPlus defined function FN%INFO$( ).

This function can be found in the *conv.bbx/START_UP program along with a number of other settings that you might want to use after converting a BBx® application.

REV -> FN%REV$

Replace the BBx® REV system variable with the global PxPlus defined function FN%REV$.

This function can be found in the *conv.bbx/START_UP program (feel free to change that function to return whatever your BBx® application expects).

SSN -> FN%SSN$

Replace the BBx® SSN system variable with the global PxPlus defined function FN%SSN$.

This function can be found in the *conv.bbx/START_UP program (feel free to change that function to return whatever your BBx® application expects).

SYS -> FN%SYS$

Replace the BBx® SYS system variable with the global PxPlus defined function FN%SYS$.

This function can be found in the *conv.bbx/START_UP program (feel free to change that function to return whatever your BBx® application expects).

 

 

 

Taos, BBx, BBx/4, BBx1/2/3/4, Pro/5, Vpro5 and BBj are registered trademarks of BASIS International Ltd.