HP 3000 Manuals

Sample PERFORM Files [ HP Business BASIC/XL Migration Guide ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Migration Guide

Sample PERFORM Files 

The next few pages contain examples of perform files.  The first file
moves a schema file and an IMAGE database backup file from the HP 260 to
the HP 3000.  The perform file includes the MPE commands needed to
migrate the files using the automatic migration aid (BBCT250.PUB.SYS),
and to execute the utilities required to build the database on the HP
3000.  Repeat lines 16 through 32 in the perform file (changing the file
names) to send another binary file (a forms file, data set backup file or
a BASIC/260 formatted data file) to the HP 3000.  Repeat lines 34 through
62 (changing file names) to send an additional ASCII file (a schema file,
program source file, or documentation file).  If you name the perform
file "perfcom", it executes with the command:  "PERFORM perfcom."
______________________________________________________________________
|                                                                    |
|     1  :!   PERFORM routine for DS/260 file move to HP 3000        |
|     2  :!                                                          |
|     3  :!   Note:  to get a hard copy output from BBCT250, set     |
|     4       up a file equation before invoking the program, e.g.   |
|     5                 FILE LP;DEV=LP                               |
|     6       and back reference LP in the BBCT250 commands          |
|     7   :!                                                         |
|     8   UNATTENDED                                                 |
|     9   :!                                                         |
|     10  RUN "DS:S"                                                 |
|     11    "DSFIG:S "                                               |
|     12  :!                                                         |
|     13  :!  Log on to the HP 3000                                  |
|     14  HELLO WESLEY.SAWYER                                        |
|     15  :!                                                         |
|     16  :!  Hit "TRANSFER TO HP 3000" key                          |
|     17  :KEY #6                                                    |
|     18  :!                                                         |
|     19  :!  Hit "ARCHIVE TRANSFER" key                             |
|     20  :KEY #2                                                    |
|     21  :!                                                         |
|     22  :!  Enter HP 260 source file name                          |
|     23  EMPBCK                                                     |
|     24  :!                                                         |
|     25  :!  Enter HP 3000 destination file name                    |
|     26  EMPBCKA                                                    |
|     27  :!                                                         |
|     28  :!  Hit "CREATE PERM FILE" key                             |
|     29  :KEY #1                                                    |
|     30  :!                                                         |
|     31  :!  Hit "BEGIN TRANSFER" key  (File will be moved here)    |
|     32  :KEY #1                                                    |
______________________________________________________________________

          Figure 18-1.  Sample PERFORM File 
______________________________________________________________________________
|                                                                            |
|     33  :!                                                                 |
|     34  :!  Hit "TRANSFER TO HP 3000" key  (Set up another file move)      |
|     35  :KEY #6                                                            |
|     36  :!                                                                 |
|     37  :!  Hit "DATA FILE TRANSFER" key                                   |
|     38  :KEY #4                                                            |
|     39  :!                                                                 |
|     40  :!  Enter HP 260 source file name                                  |
|     41  EMPSCH                                                             |
|     42  :!                                                                 |
|     43  :!  Enter record type:  Variable Length  (always specify variable!)|
|     44  V                                                                  |
|     45  :!                                                                 |
|     46  :!  Enter HP 3000 destination file name                            |
|     47  EMPSCHD                                                            |
|     48  :!                                                                 |
|     49  :!  Enter record type:  Fixed Length  (faster than variable)       |
|     50  F                                                                  |
|     51  :!                                                                 |
|     52  :!  Enter number of bytes/record:  256                             |
|     53  256                                                                |
|     54  :!                                                                 |
|     55  :!  Enter maximum number of records:  numeric value                |
|     56  1000                                                               |
|     57  :!                                                                 |
|     58  :!  Hit "CREATE PERM FILE" key                                     |
|     59  :KEY #1                                                            |
|     60  :!                                                                 |
|     61  :!  Hit "BEGIN TRANSFER" key  (File will be moved here)            |
|     62  :KEY #1                                                            |
|     63  :!                                                                 |
|     64  :!  Run migration aid on the HP 3000                               |
|     65  RUN BBCT250.PUB.SYS                                                |
______________________________________________________________________________

          Figure 18-1.  Sample PERFORM File (Continued) 
____________________________________________________________________
|                                                                  |
|     66  :!                                                       |
|     67  :!  Migrate schema file                                  |
|     68  SCHEMA EMPSCHD,EMPSCHEM                                  |
|     69  :!                                                       |
|     70  :!  Exit from BBCT250                                    |
|     71  EXIT                                                     |
|     72  :!                                                       |
|     73  :!  Create root file from schema on HP 3000              |
|     74  FILE DBSTEXT=EMPSCHEM                                    |
|     75  RUN DBSCHEMA.PUB.SYS;PARM=1                              |
|     76  :!                                                       |
|     77  :!  Create data set files on HP 3000                     |
|     78  RUN DBUTIL.PUB.SYS                                       |
|     79  CREATE EMPLOY                                            |
|     80  EXIT                                                     |
|     81  :!                                                       |
|     82  :!  Run migration aid on the HP 3000                     |
|     83  RUN BBCT250.PUB.SYS                                      |
|     84  :!                                                       |
|     85  :!  Convert and load data into new database              |
|     86  DATASET EMPBCKA,EMPLOY                                   |
|     87  KING                                                     |
|     88  :!                                                       |
|     89  :!  Exit from BBCT250                                    |
|     90  EXIT                                                     |
|     91  :!                                                       |
|     92  :!  Log off the HP 3000                                  |
|     93  BYE                                                      |
|     94  :!                                                       |
|     95  :!  Exit DS/250                                          |
|     96  :KEY #8                                                  |
|     97  :!                                                       |
|     98  :!  End of PERFORM procedure                             |
|     99:END                                                       |
____________________________________________________________________

          Figure 18-1.  Sample PERFORM File (Continued) 

The second example of a perform file follows.  This file performs the
following tasks:

 *  Selects every file that belongs to a particular volume starting with
    FB (financial book keeping).

 *  Copies the files to a different volume.

 *  Changes the PROG files to DATA files.

 *  Renames files according to their type.

 *  Runs the EDITOR in a secondary task that creates a batch file that
    you can use later to move the files to the HP 3000 automatically.

The program WAIT dimensions the A$ variables and waits for the parallel
process to be in an INPUT state:
___________________________________________________________________
|                                                                 |
|     10  ! WAIT                                                  |
|     20  DIM A$[80]                                              |
|     30  LOOP                                                    |
|     40    EXIT IF TSTAT(7)=1                                    |
|     50  END LOOP                                                |
|     60  END                                                     |
___________________________________________________________________

          Figure 18-2.  Sample Program WAIT 

Here is the PERFORM example:
________________________________________________________________
|                                                              |
|     REQUEST #7                                               |
|     SEND CONTROL HALT #7                                     |
|     SEND COMMAND#7,"RUN "&CHR$(34)&"EDITOR"&CHR$(34)         |
|     RUN "WAIT"                                               |
|     SEND INPUT#7,"S LENGTH=160"                              |
|     RUN "WAIT"                                               |
|     SEND INPUT#7,"A"                                         |
|     RUN "WAIT"                                               |
|     :DIM PARM(8)                                             |
|     :SET PARM(1) TO 0                                        |
|     :LOOP                                                    |
|     :SET PARM(1) TO PARM(1)+1                                |
|     CATLINE PARM(1) ON ":S",A$                               |
________________________________________________________________

          Figure 18-3.  Second Sample PERFORM File 
______________________________________________________________________
|                                                                    |
|     :EXIT IF A$[1,3]="EOD"                                         |
|     :IF A$[1,2]="FB" THEN                                          |
|     :IF A$[14;4]="PROG" OR A$[14;4]="DATA" OR A$[14;4]="FORM" THEN |
|     :SET PARM(5) TO NUM(A$[4;1])                                   |
|     :SET PARM(6) TO NUM(A$[5;1])                                   |
|     :SET PARM(7) TO NUM(A$[6;1])                                   |
|     :IF A$[14;4]="PROG" THEN                                       |
|     LOAD A$[1;6]&":S"                                              |
|     B$="FBP"&CHR$(PARM(5))&CHR$(PARM(6))&CHR$(PARM(7))&":M"        |
|     SAVE B$                                                        |
|     SEND INPUT#7,"DATA_FILE_TRANSFER "&B$&" TO FBH"&B$[4,6]        |
|     RUN "WAIT"                                                     |
|     :ELSE                                                          |
|     :IF A$[14;4]="DATA" THEN                                       |
|     B$="FBD"&CHR$(PARM(5))&CHR$(PARM(6))&CHR$(PARM(7))&":M"        |
|     :END IF                                                        |
|     :IF A$[14;4]="FORM" THEN                                       |
|     B$="FBF"&CHR$(PARM(5))&CHR$(PARM(6))&CHR$(PARM(7))&":M"        |
|     :END IF                                                        |
|     SEND INPUT#7,"ARCHIVE_TRANSFER "&B$&" TO FBH"&B$[4,6]          |
|     C$="FBH"&B$[4,6]&":S"                                          |
|     COPY C$ TO B$                                                  |
|     RUN "WAIT"                                                     |
|     :END IF                                                        |
|     :END IF                                                        |
|     :END IF                                                        |
|     :END LOOP                                                      |
|     SEND INPUT#7,"//"                                              |
|     RUN "WAIT"                                                     |
|     SEND INPUT#7,"K "&CHR$(34)&"<filename>:M"&CHR$(34)&",UNN"      |
|     RUN "WAIT"                                                     |
|     SEND INPUT#7,"E"                                               |
|     :END                                                           |
______________________________________________________________________

          Figure 18-3.  Second Sample PERFORM File (Continued) 

For a detailed description of DSN/DS and instructions about using this
program, refer to the DSN/DS User's Manual.



MPE/iX 5.0 Documentation