3. Thoroughbred Basic Conversion Utilities
The following sections contain descriptions of Thoroughbred Basic Conversion Utilities.
*CNVT86 - Convert Level 6 DIRECT and SORT Files
Section titled “*CNVT86 - Convert Level 6 DIRECT and SORT Files”Purpose
The utility is used to convert Level 6 DIRECT and SORT files to Level 7. You must run this utility when:
- Upgrading files generated on a Level 6 system that does not use the Motorola chip. (This does not apply to files moved by Thoroughbred FILEMOVE, or an equivalent program, which rebuilds the files on a record-by-record basis.)
- Error 7 conditions occur for various other reasons (e.g., power failure, killed processes, etc.)
This program changes the format of Level 6 Thoroughbred Basic files so that Level 7 can read them. If Level 6 DIRECT or SORT files are opened under Level 7 without this conversion, the files are unreadable and a Thoroughbred Basic file error results. The format of files other than DIRECT or SORT files are compatible with Level 7 and do not need this conversion. To convert programs, use the *CNVTFP utility.
Procedure
To run this utility from Thoroughbred Basic Console Mode, type:
RUN “*CNVT86” and press Enter.
To select this utility from the Thoroughbred Basic Utilities Menu, type:
*CNVT86 and press Enter.
The following message is displayed:
SELECT PRINTER: xx xx: (where xx is a configured printer)
Make your printer selection from the list of available printers displayed in the prompt. Printers displayed in background mode are currently being used by another task and, therefore, are unavailable. If the requested printer cannot be opened, the user is prompted to make another selection. If only one printer is configured that printer is automatically selected.
DISC NAME OR NUMBER:
Type the name or number of the disk that contains the files to be converted. After you do this the program scans the specified directory for DIRECT and SORT files that are in Level 6 Thoroughbred Basic format. A warning message appears when DIRECT or SORT files are located:
- WARNING:
- This program writes on all DIRECT and SORT files in the chosen directory. Once started the program should not be interrupted. Hit CR to continue.
After you press Enter, the system performs the following procedures:
-
Scans for DIRECT/SORT Files - You may select conversion of all DIRECT/SORT files in a given directory; or conversion of those individual files, which you name.
-
Converts (Swaps) File Pointers - The utility performs a byte-swap conversion in the key-block pointer area of DIRECT and SORT files. (If a file has already been converted, the byte swapping is skipped, and the Deleted Key Block Pointers are scanned. Refer to step 3).
-
Scans Deleted Key Block Pointers After Conversion - After byte swapping is complete; the Deleted Key Block pointers are scanned. This has usually been the problem with Err=7’s in the field, since Thoroughbred Basic Level 7.3 also scans these pointers. If the utility detects file corruption in the deleted key block pointers, the system terminates the conversion and lists the file as corrupted.
-
Attempts to Reconstruct Corrupted Files by READ RECORD/ WRITE RECORD - The utility then tries to construct a new file by copying the old file using READ RECORD/WRITE RECORD. This process requires that the hard disk has an available unused area at least equal to the size of the file being rebuilt. If corruption has occurred in any area other than the key block pointers, the new file may be missing some records. Otherwise, the new file will be intact.
In this process, the file is copied to a new file. Once copied, the old file is moved to an unused directory. The name of this directory is _ERROR7. The old file is moved into a subdirectory of this directory, which is designated by the disk number.
For example, if you select disk 2 for the conversion, you can find the old files in directory
_ERROR7/2. After converting the file, the hard copy shows how many records have been copied. If the number of records and the number of records read do not match, there could be file corruption. The hard copy notifies the user of a mismatch, or file corruption. -
Reads/Counts Records When Deleted Key Blocks Are Correct - If the Deleted Key Block pointers are found to be good, the file is read and the number of records in the file is counted. If the number of records used and the number of records read do not match there could be file corruption. The hard copy notifies the user of a mismatch or file corruption.
If *CNVT86 locates files that have already been converted from Level 6 format to Level 7, an Already Converted message is printed with the corresponding file name in the table.
After conversion the program prompts:
DONE. (CR) TO CONTINUE, (F4) TO END
Press Enter to run the program again or press F4 to return to the Utility Menu. Repeat the procedure for all directories.
Pressing Escape during the conversion will allow you to abort the procedure.
Error Messages
xxxxxxxx CANNOT BE OPENED FOR CONVERSION.
The file-name specified for the transfer is currently being used by another task. Have the task release the file and try again.
- NOT ENOUGH MEMORY TO RUN THIS UTILITY...MODIFY IPL FILE
- You must have at least a 30K partition to use this utility. Modify the IPL file accordingly.
- NUMBER OF RECORDS MISMATCH
- The number of records read do not match the number of records used defined in the file header. Check to see if the file is corrupted.
- PRINTER IN USE
- The requested printer is off-line (i.e., not turned on, out of paper, out of toner, etc.). Correct the problem and try again, select another printer, or press F4 to exit.
*CNVTCGV - Convert CGV from B1 to B2 BASIC
Section titled “*CNVTCGV - Convert CGV from B1 to B2 BASIC”Purpose
The CGV function enables you to create and maintain global string variables. The function’s executable code was changed for Thoroughbred Basic 8.1B2. If you have used the CGV function for Thoroughbred Basic programs prior to the release of Thoroughbred Basic 8.1B2 you may need to use the *CNVTCGV utility to affect the code changes. If you do not run this utility, the older code will set the value of your defined global variables to the null character. The *CNVTCGV utility will have no effect on programs that do not contain the CGV function.
Procedure
- To run this utility from Thoroughbred Basic Console Mode type
- RUN "*CNVTCGV" and press Enter.
- To run this utility from the Thoroughbred Basic Utilities Menu type
- *CNVTCGV and press Enter.
The *CNVTCGV utility begins with the following message:
DISC NAME OR NUMBER:
Type the name or number of a directory that contains Thoroughbred Basic programs that use the CGV utility. Press Enter. The following message will be displayed:
DISC ID: dirname(n)
ENTER FILENAME OR MASK: (@) FOR ALL, (CR) TO END
________________
Take one of the following actions:
- Type the name of a file in the dirname directory that contains at least one CGV function specification and press Enter. The underscores will redisplay so you can type the name of another file or type masking characters to select a subset of files. After you have finished typing in the names of all the files that contain CGV function specifications press Enter.
- Type masking characters to select a subset of files in the dirname directory and press Enter. The underscores will redisplay so you can type another set of masking characters or the name of a file. The *CNVTCGV utility will not affect files that do not contain at least one CGV function specification. Press Enter.
- Type @ (at sign) to check all the files in the dirname directory. The *CNVTCGV utility will not affect files that do not contain at least one CGV function specification. Press Enter.
Mask Characters
Each digit in the numeric value that is output must match up with a mask character. The mask characters determine the output. You can specify more mask characters than there are digits in the numeric value.
An insignificant zero is a leading or trailing zero. A floating character is output at the rightmost leading zero.
- 0
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a 0.
- #
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- 9
- Same as #. Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- .
- Outputs a decimal point between digits. If the number is zero and 0 is not used in the mask, outputs a space.
- ,
- Outputs a comma between digits if the digit to the left is a significant digit; can only be used to the left of the decimal point.
- $
- Outputs a floating dollar sign.
- Outputs an asterisk when the digit is a leading zero.
- Outputs a minus sign if the number is negative, or a space if the number is zero or positive. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- +
- Outputs a plus sign if the number is positive, a minus sign if the number is negative, or a space if the number is zero. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- CR
- Outputs a CR (to indicate a credit) if the number is negative, or 2 spaces if the number is zero or positive. This mask character must be placed at the right of the mask.
- DR
- Outputs CR (to indicate a debit) if the number is positive, a CR if the number is negative, or 2 spaces if the number is zero. This mask character must be placed at the right of the mask.
- (
- Outputs a left parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the left of the mask.
- )
- Outputs a right parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the right of the mask.
- B
- Outputs a space (Blank).
- ????
- Any characters other than the mask characters are output in the specified positions.
After you select the files you want to check and press Enter the following message will be displayed:
SEARCHING DIRECTORY
The *CNVTCGV utility is searching through the directory you selected for the files you specified. If it finds a file that contains at least one CGV function specification, the following message will display:
CONVERTING progname
The *CNVTCGV utility is making sure that your Thoroughbred Basic 8.1 program will use CGV function code from Thoroughbred Basic 8.1B2.
After the programs are converted, the *CVNTCGV utility will return you to the first message. You can convert other files or leave the *CNVTCGV utility.
Error Messages
ERROR 1 CONVERTING program CR TO CONTINUE, F4 TO END
An error occurred when the *CNVTCGV utility tried to convert the progname file. In many cases, the error was generated because the program was created under a higher release level than Thoroughbred Basic 8.1B2. The *CNVTCGV utility does not affect the program.
*CNVTDKC - Adjust Deleted Keyblock Chain For Level 7
Section titled “*CNVTDKC - Adjust Deleted Keyblock Chain For Level 7”Purpose
The *CNVTDKC utility upgrades files created under Thoroughbred Basic Level 6.x to Thoroughbred Basic Level 7. This utility is also known as *CVDKC.
Procedure
- To run this utility from Thoroughbred Basic Console Mode type
- RUN "*CNVTDKC" and press Enter.
- To run this utility from the Thoroughbred Basic Utilities Menu type
- *CNVTDKC and press Enter.
The *CNVTDKC utility begins with the following message:
THIS PROGRAM WILL SEARCH FOR AND OPTIONALLY UPGRADE FILES FROM
BASIC LEVEL 6 FORMAT TO BASIC LEVEL 7 FORMAT.
BEFORE A FILE IS CONVERTED, IT IS CHECKED TO ENSURE THAT
IT IS A LEVEL 6 TYPE FILE AND THAT THE FILE DOES NOT SEEM
TO BE CORRUPTED. THE STATUS IS PRINTED AND THEN THE
FILE WILL BE CONVERTED IF THAT OPTION WAS SELECTED
CR WHEN READY
Press Enter. The following message will be displayed:
DISC NAME OR NUMBER:
Type the name or number of a directory that contains Thoroughbred Basic 6 files and press Enter. The following message will be displayed:
DISC ID: dirname(n)
ENTER FILENAME OR MASK: (@) FOR ALL, (CR) TO END
________________
Take one of the following actions:
- Type the name of a file in the dirname directory that contains a Thoroughbred Basic 6 file and press Enter. The underscores will redisplay so you can type the name of another file or type masking characters to select a subset of files. After you have finished typing in the names of all Thoroughbred Basic 6 files press Enter.
- Type masking characters to select a subset of files in the dirname directory and press Enter. The underscores will redisplay so you can type another set of masking characters or the name of a file. The *CNVTDKC utility only affects Thoroughbred Basic 6 files. Press Enter.
- Type @ (at sign) to select all the files in the dirname directory. The *CNVTDKC utility only affects Thoroughbred Basic 6 files. Press Enter.
Mask Characters
Each digit in the numeric value that is output must match up with a mask character. The mask characters determine the output. You can specify more mask characters than there are digits in the numeric value.
An insignificant zero is a leading or trailing zero. A floating character is output at the rightmost leading zero.
- 0
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a 0.
- #
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- 9
- Same as #. Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- .
- Outputs a decimal point between digits. If the number is zero and 0 is not used in the mask, outputs a space.
- ,
- Outputs a comma between digits if the digit to the left is a significant digit; can only be used to the left of the decimal point.
- $
- Outputs a floating dollar sign.
- Outputs an asterisk when the digit is a leading zero.
- Outputs a minus sign if the number is negative, or a space if the number is zero or positive. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- +
- Outputs a plus sign if the number is positive, a minus sign if the number is negative, or a space if the number is zero. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- CR
- Outputs a CR (to indicate a credit) if the number is negative, or 2 spaces if the number is zero or positive. This mask character must be placed at the right of the mask.
- DR
- Outputs CR (to indicate a debit) if the number is positive, a CR if the number is negative, or 2 spaces if the number is zero. This mask character must be placed at the right of the mask.
- (
- Outputs a left parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the left of the mask.
- )
- Outputs a right parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the right of the mask.
- B
- Outputs a space (Blank).
- ????
- Any characters other than the mask characters are output in the specified positions.
After you select the files you want to check and press Enter the following message will be displayed:
SEARCHING DIRECTORY
The *CNVTDKC utility searches through the directory you selected for the files you specified and displays the name of each file it checks. After the files are converted, the *CNVTDKC utility will return you to the Thoroughbred Basic Utilities Menu.
*CNVTERM - Convert 7.4 TCONFIG to TCONFIG8
Section titled “*CNVTERM - Convert 7.4 TCONFIG to TCONFIG8”Purpose
This utility allows you to convert an existing Level 7.4 TCONFIG table into a Level 8.0 TCONFIG8.
- WARNING:
- This procedure erases the existing TCONFIG8. If the existing TCONFIG8 has been modified, make a note of the changes so that you will be able to add those changes to the new TCONFIG8.
Procedure
To run this utility from Thoroughbred Basic Console Mode, type:
RUN “*CNVTERM” and press Enter.
To run this utility from the Thoroughbred Basic Utilities Menu, type:
*CNVTERM and press Enter.
The system prompts:
WARNING! THIS PROGRAM WILL ERASE CURRENT TCONFIG8! CONTINUE? (Y/N)
Type Y and press Enter to continue with the procedure or Type N and press Enter to exit the utility. If you select Y, the utility erases the existing TCONFIG8 and proceeds to convert the Level 7.4 TCONFIG into a TCONFIG8 file. If the Level 7.4 TCONFIG has already been converted, the system prompts:
TABLE xxxxxxxx ALREADY CONVERTED!
The system returns to the beginning of the utility.
*CVDKC - Adjust Deleted Keyblock Chain For Level 7
Section titled “*CVDKC - Adjust Deleted Keyblock Chain For Level 7”Purpose
The *CVDKC utility upgrades files created under Thoroughbred Basic Level 6.x to Thoroughbred Basic Level 7. This utility is also known as *CNVTDKC.
Procedure
To run this utility from Thoroughbred Basic Console Mode type:
RUN “*CVDKC” and press Enter.
To run this utility from the Thoroughbred Basic Utilities Menu type:
*CVDKC and press Enter.
The *CVDKC utility begins with the following message:
THIS PROGRAM WILL SEARCH FOR AND OPTIONALLY UPGRADE FILES FROM
BASIC LEVEL 6 FORMAT TO BASIC LEVEL 7 FORMAT.
BEFORE A FILE IS CONVERTED, IT IS CHECKED TO ENSURE THAT
IT IS A LEVEL 6 TYPE FILE AND THAT THE FILE DOES NOT SEEM
TO BE CORRUPTED. THE STATUS IS PRINTED AND THEN THE
FILE WILL BE CONVERTED IF THAT OPTION WAS SELECTED
CR WHEN READY
Press Enter. The following message will be displayed:
DISC NAME OR NUMBER:
Type the name or number of a directory that contains Thoroughbred Basic 6 files and press the Enter key. The following message will be displayed:
DISC ID: dirname(n)
ENTER FILENAME OR MASK: (@) FOR ALL, (CR) TO END
________________
Take one of the following actions:
- Type the name of a file in the dirname directory that contains a Thoroughbred Basic 6 file and press Enter. The underscores will redisplay so you can type the name of another file or type masking characters to select a subset of files. After you have finished typing in the names of all Thoroughbred Basic 6 files press Enter.
- Type masking characters to select a subset of files in the dirname directory and press Enter. The underscores will redisplay so you can type another set of masking characters or the name of a file. The *CVDKC utility only affects Thoroughbred Basic 6 files. Press Enter.
- Type @ (at sign) to select all the files in the dirname directory. The *CVDKC utility only affects Thoroughbred Basic 6 files. Press Enter.
Mask Characters
Each digit in the numeric value that is output must match up with a mask character. The mask characters determine the output. You can specify more mask characters than there are digits in the numeric value.
An insignificant zero is a leading or trailing zero. A floating character is output at the rightmost leading zero.
- 0
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a 0.
- #
- Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- 9
- Same as #. Outputs a digit from 0 to 9. When the digit is an insignificant zero, outputs a space.
- .
- Outputs a decimal point between digits. If the number is zero and 0 is not used in the mask, outputs a space.
- ,
- Outputs a comma between digits if the digit to the left is a significant digit; can only be used to the left of the decimal point.
- $
- Outputs a floating dollar sign.
- Outputs an asterisk when the digit is a leading zero.
- Outputs a minus sign if the number is negative, or a space if the number is zero or positive. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- +
- Outputs a plus sign if the number is positive, a minus sign if the number is negative, or a space if the number is zero. The mask character can be placed at the left or right of the mask. If placed to the left, it is a floating character.
- CR
- Outputs a CR (to indicate a credit) if the number is negative, or 2 spaces if the number is zero or positive. This mask character must be placed at the right of the mask.
- DR
- Outputs CR (to indicate a debit) if the number is positive, a CR if the number is negative, or 2 spaces if the number is zero. This mask character must be placed at the right of the mask.
- (
- Outputs a left parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the left of the mask.
- )
- Outputs a right parenthesis if the number is negative, or a space if the number is zero or positive. This mask character must be placed at the right of the mask.
- B
- Outputs a space (Blank).
- ????
- Any characters other than the mask characters are output in the specified positions.
After you select the files, you want to check and press Enter the following message will be displayed:
SEARCHING DIRECTORY
The *CVDKC utility searches through the directory you selected for the files you specified and displays the name of each file it checks. After the files are converted, the *CVDKC utility will return you to the Thoroughbred Basic Utilities Menu.
*PROG8 - Convert Level 7 to 8 Utility
Section titled “*PROG8 - Convert Level 7 to 8 Utility”Purpose
The *PROG8 Utility converts existing Level 7 programs to Thoroughbred Basic Level 8 (including CALLed Public Programs). This utility changes the format of the existing program to a format that Level 8 can read and execute.
When a simple Level 7 program is loaded and saved in Level 8, it is automatically converted. (Please Note: The automatic convert is VERY slow.) However, if Level 8 CALLs a Level 7 program, an error is returned. These programs must be converted separately. We recommend that you use the *PROG8 Utility for conversion if there are:
- More than one program to be converted
- A CALL to a Public Program
When a Level 7 program is run on Level 8 the program is converted; however, the conversion is not saved unless the program is saved under Level 8.
Note: The programs being converted must be in listable form (i.e., not encrypted).
Procedure
To access this utility from Thoroughbred Basic Console Mode, type:
RUN “*PROG8” and press Enter.
To select this utility from the Thoroughbred Basic Utilities Menu, type:
*PROG8 and press Enter.
The system prompts:
DISC NAME OR NUMBER:
Type the name or number of the directory to be converted and press Enter.
ENTER FILENAME OR MASK; @ FOR ALL, <CR> TO END:
Type up to 48 file names or masks and press Enter or type @ and press Enter to list all the names in the directory. If a specified file does not exist on the disk, or if a file does not match the selected type, the name is rejected. After entering each name or mask, press Enter once. After you have entered all the names or masks, press Enter again to continue with the procedure. To exit the utility, press F4.
HARD COPY (Y/N):
If a hard copy is selected, the system provides two listings. The first is a listing of the programs in the directory that have already been converted. The second is a listing of the programs that received an error while trying to convert. If an error is received during the conversion process, the conversion is stopped. If you type Y and press Enter to the previous prompt, the following prompt is displayed:
SELECT PRINTER: xx xx (where xx is a configured printer)
Make your selection from the list of available printers displayed in the prompt. Printers displayed in background mode are currently being used by another task and, therefore, are unavailable. If the requested printer cannot be opened, the user is prompted to make another selection. If only one printer is configured this question is not asked.
Error Messages
- CAN'T CONVERT "program-name" - ENCRYPTED
- The specified program has been encrypted. This program must be unencrypted under Level 7 before the conversion process can be run.
- ERROR 0
- The permissions set for this program may not allow changes. Check the permissions and make any necessary changes before running the conversion again.
ERROR XX HAS OCCURRED <CR> TO CONTINUE OR <F4> TO END.
The program being converted contains an error. Press Enter to skip this program name and continue to convert the rest of the directory or press F4 to end conversion procedure.
Note: The program that contained the error has not been converted.
- INSUFFICIENT SPACE FOR WORK FILE ON DISC XX
- There is not enough room on the specified disk to run the conversion. Make room in this directory or move the programs to another directory before trying to run *PROG8.
- PROGRAMS NOT FOUND
- The program names specified do not exist in the specified directory. Check the program names and locations.
From the Thoroughbred Basic Utilities, version 8.9.1. Open this page in the PDF