Database File Migration [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation
HP Business BASIC/XL Migration Guide
Database File Migration
This section provides instructions for migrating databases. A database
has two parts:
1. The description of the data structure (known as the root file).
2. The actual data (to be organized according to that root file).
This is true of both IMAGE/260 and TurboIMAGE databases. Thus,
converting an IMAGE/260 data file is a two-part process. First, you
convert the structure, then you convert the data and place it in the
specified structure.
Follow the steps below to migrate a database. You can only migrate one
database at a time.
1. Back up the database using DBSTORE or DUPL (as described in the
IMAGE/260 Programming Manual).
2. Use the DBUNLD program to create BKUP files for the data set
entries. These are the files you move to the HP 3000. You can
find instructions for running this program in the IMAGE/260
Programming Manual.
3. Obtain an unprotected copy of the root file describing the
database. If a copy is not available, use the DBMODS utility on
the HP 260 to print a listing of the database root file to an
unprotected data file. Follow these steps:
a. Enter the command RUN "DBMODS,SYSTEM".
b. On the initial menu, fill in the DATABASE NAME and ROOT FILE
VOLUME (plus a MAINTENANCE WORD, if used).
c. On the main menu, press the PRINT SCHEMA key.
d. On the Schema Lister menu, press the PRINT TO FILE key.
e. Enter the name of the file the listing will be sent to.
f. Press the EXIT key twice to leave DBMODS.
4. Move the SCHEMA listing file using the DATA FILE TRANSFER softkey.
5. Move the individual BKUP files using the ARCHIVE TRANSFER softkey.
6. Change the root file to TurboIMAGE. To do this, run the migration
aid and use the SCHEMA command. The following example shows the
command to use, along with the screen output.
_______________________________________________________________________
| |
| |
| :RUN BBCT250.PUB.SYS |
| |
| HP250 TO HP Business BASIC/3000 Conversion Utility/ |
| (HP32115Y.01.00). (1,2) |
| Copyright Hewlett-Packard Co. 1985. (1,16) |
| |
| => SCHEMA MYSCHMIN, MYSCHM |
| |
| Records read: 47 |
| |
| => EXIT |
| |
| END OF PROGRAM. |
| : |
| |
_______________________________________________________________________
Figure 20-1. Changing a Root File to TurboIMAGE
_________________________________________________________________
NOTE TurboIMAGE does not directly support the floating point
decimal data types available in BASIC/260 and HP Business
BASIC/XL. The converted root file represents BASIC/260 REAL
and SHORT types (which map to DECIMAL and SHORT DECIMAL in
HP Business BASIC/XL as K2 and K4). This implies the data
is either 2-word binary coded decimal or 4-word binary coded
decimal. When accessing a TurboIMAGE database, HP Business
BASIC/XL recognizes that these data types indicate
floating-point decimal numbers and processes the numbers
accordingly. If you choose OPTION REAL, the BASIC/260 REAL
and SHORT types are mapped to REAL and SHORT REAL in HP
Business BASIC/XL and represented as R2 and R4 in the
converted root file.
_________________________________________________________________
7. Create the database from the root file.
a. Use the DBSCHEMA utility to process the root file and create
the root file.
b. Use the MPE :FILE command to specify the root file name and
the file to send the DBSCHEMA listing to.
:FILE DBSTEXT=MYSCHM
:FILE DBSLIST;DEV=PP (sends the listing to the printer)
c. Run the DBSCHEMA utility, using the PARM keyword to let the
program know that you have specified its input file and
listing file.
______________________________________________________________________
| |
| |
| :RUN DBSCHEMA.PUB.SYS;PARM=3 |
| |
| |
| HP32215B.04 |
| NUMBER OF ERROR MESSAGES: 0 |
| ROOT FILE B CREATED |
| |
| |
| END OF PROGRAM |
| |
______________________________________________________________________
Figure 20-2. Running the DBSCHEMA Utility
The root file now exists with the name specified in the
database line of the root file. For example, assume the name
is DBCUST.
BEGIN DATA BASE DBCUST
d. Run the DBUTIL program.
_______________________________________________________________________
| |
| |
| :RUN DBUTIL.PUB.SYS |
| HP3221B.04.00 IMAGE/3000: DBUTIL... |
| |
_______________________________________________________________________
Figure 20-3. Running the DBUTIL Program
e. Use the CREATE command of DBUTIL to create the empty data
sets. (Refer to the TurboIMAGE/XL Manual for a detailed
description of DBSCHEMA and DBUTIL.)
_____________________________________________________________________
| |
| |
| >>CREATE DBCUST/PASS |
| database DBCUST has been CREATED. |
| |
_____________________________________________________________________
Figure 20-4. Using the DBUTIL CREATE Command
f. Enter the EXIT command to leave the program.
_____________________________________________________________________
| |
| |
| >>EXIT |
| |
| END OF PROGRAM |
| |
_____________________________________________________________________
Figure 20-5. Leaving the DBUTIL Program
8. Run the migration aid to convert and load the data sets. Use the
DATASET command. The following example illustrates the use of
this command.
______________________________________________________________________
| |
| |
| :RUN BBCT250.PUB.SYS |
| |
| HP250 TO HP Business BASIC/3000 Conversion Utility/ |
| (HP32115A.00.00). (1,2) |
| |
| => DATASET BAKUP1IN, DBCUST |
| |
| Records read: 104 |
| |
| => DATASET BAKUP2IN, DBCUST |
| |
| Records read: 71 |
| |
| => DATASET BAKUP3IN, DBCUST |
| |
| Records read: 19 |
| |
| => EXIT |
| |
| END OF PROGRAM. |
| |
| : |
| |
______________________________________________________________________
Figure 20-6. Converting and Loading the Data Sets
_________________________________________________________________
NOTE If the data set has a user password, you are prompted for it
before the conversion takes place. The terminal does not
echo the password when you enter it.
_________________________________________________________________
The database, DBCUST has been created and loaded with data and you can
access it with HP Business BASIC/XL programs or other utilities.
MPE/iX 5.0 Documentation