""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   TRANSFER FORMS OR REPORTS FROM ONE DATABASE TO ANOTHER
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   PRODUCT   :  R:BASE                  VERSION      :  3.1
   CATEGORY  :  PROGRAMMING             SUBCATEGORY  :  TOOLS
   """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   Use XFORM.CMD with MENU1.MNU, MENU2.MNU, MENU3.MNU, and MENU4.MNU (all
   listed below and included in MRIM0891.ZIP) to copy forms from one
   database to another. Put the menu files and XFORM.CMD together in the
   same directory.
 
   Use XREPORT.CMD with MENU1.MNU, MENU2.MNU, MENU4.MNU, and MENU5.MNU
   (all listed below and included in MRIM0891.ZIP) to copy reports from
   one database to another.
 
   The destination database must contain the columns and tables used in
   the form. You also need to copy any entry/exit procedures (EEPs) used
   in the form. The GRAYOUT lines in the menu files have an ALT 196
   character inside the pipe (ALT 124) characters. It draws a separation
   line in the menu.
 
 
   Listing of MENU1.MNU
   """"""""""""""""""""
     trans
     POPUP |Choose the source database.|
     #DATABASE
     |-| GRAYOUT
     |Other...|
     |-| GRAYOUT
     |Exit|
 
 
 
   Listing of MENU2.MNU
   """"""""""""""""""""
     trans
     POPUP |Choose the destination database.|
     #DATABASE
     |-| GRAYOUT
     |Other...|
 
 
   Listing of MENU3.MNU
   """"""""""""""""""""
     yesexit
     POPUP |Remove the form or exit.|
     |Remove Form|
     |Exit Transfer|
     ENDC
 
 
   Listing of MENU4.MNU
   """"""""""""""""""""
     sure
     POPUP |Choose option.|
     |Continue?| || GRAYOUT
     |No|
     |Yes|
     ENDC
 
 
   Listing of MENU5.MNU
   """"""""""""""""""""
     yesexit
     POPUP |Remove the report or exit.|
     |Remove Report|
     |Exit Transfer|
     ENDC
 
 
   How to Run XFORM.CMD or XREPORT.CMD
   """""""""""""""""""""""""""""""""""
   To run XFORM.CMD, enter:
 
     RUN xform.cmd
 
   To run XREPORT.CMD, enter:
 
     RUN xreport.cmd
 
   Use any pair of databases that contain the columns and tables used by
   the form or report. Remember to copy the EEP files when you copy a
   form.
 
 
   Listing of XFORM.CMD
   """"""""""""""""""""
 
     *( XFORM.CMD--Transfer forms from one database to another.)
     CLS; DISCONNECT; SET BELL OFF; SET ESCAPE ON
     SET MESSAGES OFF; SET ERROR MESSAGES OFF
     SET COLOR BACKGRND blue; SET COLOR FOREGRND white
     SET MENU BACKGRND gray; SET MENU FOREGRND black
     SET DIALOG BACKGRND cyan; SET DIALOG FOREGRND black
     SET FIRST red; SET ERROR VAR vexist
     *( Initialize variables and write welcome screen.)
     SET VAR vfill TEXT = (CHAR(219)), vfill = (SFIL(.vfill,79))
     WRITE .vfill AT 1,1 gray
     WRITE 'F O R M    T R A N S F E R' AT 1,25 black ON gray
     WRITE 'This program transfers forms from one ' AT 3, 17 white
     WRITE 'database to another. Make sure the' AT 4,17 white
     WRITE 'source and destination databases exist' AT 5, 17 white
     WRITE 'on a workstation or network drive. Make' AT 6, 17 white
     WRITE 'sure the destination database has the' AT 7,17 white
     WRITE 'columns, tables, and views used in the' AT 8, 17 white
     WRITE 'form before you transfer it.' AT 9,17 white
     WRITE 'WARNING: If you transfer ALL forms from the' AT 11,17 yellow
     WRITE 'source database, ALL forms in the ' AT 12,17 yellow
     WRITE 'destination database will be removed.' AT 13,17 yellow
     PAUSE 1; SET VAR vbigloop=1, vloop1=1, vloop2=1
     LABEL lbegin
     WHILE vbigloop = 1 THEN
       WHILE vloop1 = 1 THEN
         LABEL ret1
         WRITE .vfill AT 1,1 gray
         WRITE 'Form Transfer...' AT 1,1 black ON gray
         WRITE .vfill AT 25,1 gray
         CHOOSE vfrom_db FROM menu1.mnu AT 3,2
         IF vfrom_db = 'HELP' THEN; GOTO ret1; ENDIF
         WRITE .vfill AT 1,1 gray
         WRITE 'Form Transfer...' AT 1,1 black ON gray
         IF vfrom_db = '[Esc]' OR vfrom_db = 'Exit' THEN
           CLEAR VAR vfrom_db, vto_db, vfill, vexist, vsysfseq, vform, +
             vnull, vconfirm, vnull, vcheck, vbigloop, v1, vwhat, +
             vsure, vbigloop, vloop1, vloop2, vpass, vlocate
           DEL a2b6f9p3.z3x; CLS
           RETURN
         ENDIF
         IF vfrom_db = 'Other...' THEN
           SET VAR vfrom_db = ' '
           LABEL ret1a
           WRITE .vfill AT 1,1 gray
           WRITE 'Form Transfer...' AT 1,1 black ON gray
           WRITE .vfill AT 24,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'Choose FROM Database or Press [Esc].' +
             AT 24,1 black ON gray
           DIALOG 'Enter path and database name: F:\RBDATA\Source' +
             vfrom_db v1 1
           IF v1 = 'HELP' OR v1 = '[PgUp]' OR v1 = '[PgDn]' THEN
             GOTO ret1a
           ENDIF
           IF v1 = '[Esc]' THEN; CLS; GOTO ret1; ENDIF
           CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 24,1 red; WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 24,24 white ON red
             WRITE 'Confirm path and database name.' +
               AT 25,27 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1a
           ELSE
             SET VAR vsysfseq = SYSFSEQ IN SYSFORM +
               WHERE COUNT = 1
             IF vexist <> 0 THEN
               WRITE .vfill AT 25,1 red
               WRITE 'There must be at least one existing form.' +
                 AT 25,16 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
             ELSE
               SET VAR vloop1=2
               WRITE 'Source: ' .vfrom_db AT 3,15 yellow
             ENDIF
           ENDIF
         ELSE  *( vfrom_db is not 'Other...')
           CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 25,25 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
           ELSE
             SET VAR vsysfseq = SYSFSEQ IN SYSFORM +
               WHERE COUNT = 1
             IF vexist <> 0 THEN
               WRITE .vfill AT 25,1 red
               WRITE 'There must be at least one existing form.' +
                 AT 25,16 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
             ELSE
               SET VAR vloop1 = 2
               WRITE 'Source: ' .vfrom_db AT 3,15 yellow
             ENDIF
           ENDIF
         ENDIF
       ENDWHILE
       WHILE vloop2 = 1 THEN
         LABEL ret2
         WRITE .vfill AT 1,1 gray
         WRITE 'Form Transfer...' AT 1,1 black ON gray
         CHOOSE vto_db FROM menu2.mnu AT 5,13
         IF vto_db = 'HELP' THEN; GOTO ret2; ENDIF
         IF vto_db = '[Esc]' THEN
           SET VAR vloop1=1; CLS; BREAK
         ENDIF
         IF vto_db = 'Other...' THEN
           SET VAR vto_db = ' '
           WRITE .vfill AT 1,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'P r e s s  [E s c]  T o  E x i t.' +
             AT 25,24 black ON gray
           LABEL ret2a
           WRITE .vfill AT 1,1 gray
           WRITE 'Form Transfer...' AT 1,1 black ON gray
           WRITE .vfill AT 24,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'Choose TO Database.' AT 24,1 black ON gray
           DIALOG 'Enter path & database name: F:\RBDATA\Source' +
             vto_db v1 1
           IF v1 = 'HELP' OR v1 = '[PgUp]' OR v1 = '[PgDn]' THEN
             GOTO ret2A
           ENDIF
           IF v1 = '[Esc]' THEN; GOTO ret2; ENDIF
           CONNECT &vto_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 24,1 red; WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 24,24 white ON red
             WRITE 'Confirm path and database name.' +
               AT 25,27 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2A
           ELSE
             IF vfrom_db = .vto_db THEN
               WRITE .vfill AT 25,1 red
               WRITE 'The two database names must be different.' +
                 AT 25,19 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25
               WRITE '                                  ' AT 5,26
               GOTO ret2A
             ELSE
               SET VAR vloop2=2, vbigloop=2
               WRITE 'Destination: ' .vto_db AT 5,26 yellow
             ENDIF
           ENDIF
         ELSE  *( vto_db is not 'Other...')
           CONNECT &vto_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 25,25 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2
           ELSE
             IF vfrom_db = .vto_db THEN
               WRITE .vfill AT 25,1 red
               WRITE 'The two database names must be different.' +
                 AT 25,19 white ON red
               WRITE '                                  ' AT 5,26
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2
             ELSE
               SET VAR vloop2=2, vbigloop=2
               WRITE 'Destination: ' .vto_db AT 5,26 yellow
             ENDIF
           ENDIF
         ENDIF
       ENDWHILE
     ENDWHILE
     LABEL ret3  *( Choose forms to transfer..................)
     CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
     WRITE .vfill AT 1,1 cyan
     WRITE 'Press F1 to transfer ALL FORMS.' AT 1,26 black ON cyan
     CHOOSE vform FROM #FORMS AT 7,24
     WRITE .vfill AT 1,1 gray
     WRITE 'Form Transfer...' AT 1,1 black ON gray
     CLS FROM 2 TO 2
     IF VFORM = '[Esc]' THEN
       SET VAR vbigloop=1, vloop1=2, vloop2=1
       WRITE '                                        ' AT 5,26
       GOTO lbegin
     ENDIF
     IF VFORM = 'HELP' THEN  *( Transfer all forms........start......)
       WRITE .vfill AT 1,1 red
       WRITE '*** WARNING - All Forms In Destination +
     Database Will Be Removed. ***' AT 1,8 black ON red
       WRITE 'Form(s):' AT 9,50 yellow; WRITE 'ALL' AT 9, 59 yellow
       LABEL ret55
       CHOOSE vsure FROM menu4.mnu AT 9,35
       IF vsure = 'HELP' THEN; GOTO ret55; ENDIF
       IF vsure = 'Yes' THEN
         WRITE .vfill AT 25,1 cyan
         WRITE 'Working...' AT 25,1 black ON cyan BLINK
         SET VAR vnull TEXT = (CVAL('NULL')); SET NULL -0-
         OUTPUT a2b6f9p3.z3x
           UNLOAD DATA FROM SYSFORM
         OUTPUT SCREEN
         SET NULL &vnull; CONNECT &vto_db; SET QUOTES='
         REMOVE TABLE SYSFORM
         CREATE TABLE SYSFORM (SYSFNAME TEXT 8, +
           SYSFDATA TEXT 46, SYSFSEQ INTEGER)
         INPUT a2b6f9p3.z3x
         CREATE INDEX ON SYSFORM SYSFNAME
         CREATE INDEX ON SYSFORM SYSFSEQ
         SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; CLS; GOTO lbegin
       ELSE
         CLS; SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; GOTO lbegin
       ENDIF
     ENDIF  *( Transfer all forms...............end.........)
     WRITE 'Form: ' .vform AT 7,37 yellow
     LABEL ret6  *( Continue yes/no........................)
     CHOOSE vsure FROM menu4.mnu AT 9,35
     IF vsure = 'HELP' THEN; GOTO ret6; ENDIF
     IF vsure = '[Esc]' OR vsure = 'No' THEN
       SET VAR vbigloop=1, vloop1=1, vloop2=1
       DISCONNECT; CLS; GOTO lbegin
     ENDIF
     IF vsure = 'Yes' THEN
       SET VAR vnull TEXT = (CVAL('NULL')); SET NULL -0-
       OUTPUT a2b6f9p3.z3x
       UNLOAD DATA FROM SYSFORM WHERE SYSFNAME = .vform
       OUTPUT SCREEN
       SET NULL &vnull; CONNECT &vto_db; SET QUOTES='
       OUTPUT junk; LIST SYSFORM; SET VAR vpass = .vexist
       OUTPUT SCREEN; DEL junk
       IF vpass <> 0 THEN
         WRITE .vfill AT 25,1 cyan
         WRITE 'Working...' AT 25,1 black ON cyan BLINK
         CREATE TABLE SYSFORM (SYSFNAME TEXT 8, +
           SYSFDATA TEXT 46, SYSFSEQ INTEGER)
         CREATE INDEX ON SYSFORM SYSFNAME
         CREATE INDEX ON SYSFORM SYSFSEQ
         INPUT a2b6f9p3.z3x
         SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; CLS; GOTO lbegin
       ELSE
         SET VAR vlocate = SYSFNAME IN SYSFORM +
           WHERE SYSFNAME = .vform
         IF vexist = 0 THEN
           WRITE 'WARNING - form exists    ' AT 17,39 yellow
           WRITE 'in destination database.' AT 18,39 yellow
           WRITE 'Form must be removed    ' AT 19,39
           WRITE 'prior to transfer.      ' AT 20,39
           LABEL ret4
           CHOOSE vwhat FROM menu3.mnu AT 11,48
           IF vwhat = 'HELP' THEN; GOTO ret4; ENDIF
           IF vwhat = '[Esc]' OR vwhat = 'Exit transfer' THEN
             SET VAR vbigloop=1, vloop1=1, vloop2=1
             DISCONNECT; CLS; GOTO lbegin
           ENDIF
           IF vwhat = 'Remove Form' THEN
             LABEL ret5
             CHOOSE vsure FROM menu4.mnu AT 13,64
             IF vsure = 'HELP' THEN; GOTO ret5; ENDIF
             IF vsure = 'Yes' THEN
               WRITE .vfill AT 25,1 cyan
               WRITE 'Working...' AT 25,1 black ON cyan BLINK
               REMOVE FORM .vform
               INPUT a2b6f9p3.z3x
               SET VAR vbigloop=1, vloop1=1, vloop2=1
               DISCONNECT; CLS; GOTO lbegin
             ELSE
               SET VAR vbigloop=1, vloop1=1, vloop2=1
               DISCONNECT; CLS; GOTO lbegin
             ENDIF
           ENDIF
         ELSE
           WRITE .vfill AT 25,1 cyan
           WRITE 'Working...' AT 25,1 black ON cyan BLINK
           INPUT a2b6f9p3.z3x
           SET VAR vbigloop=1, vloop1=1, vloop2=1
           DISCONNECT; CLS; GOTO lbegin
         ENDIF
       ENDIF
     ENDIF
     RETURN
 
 
   Listing of XREPORT.CMD
   """"""""""""""""""""""
 
     *( XREPORT.CMD--Transfer reports from one database to another.)
     CLS; DISCONNECT; SET BELL OFF; SET ESCAPE ON
     SET MESSAGES OFF; SET ERROR MESSAGES OFF
     SET COLOR BACKGRND blue; SET COLOR FOREGRND white
     SET MENU BACKGRND gray; SET MENU FOREGRND black
     SET DIALOG BACKGRND cyan; SET DIALOG FOREGRND black
     SET FIRST red; SET ERROR VAR vexist
     *( Initialize variables and write welcome screen.)
     SET VAR vfill TEXT = (CHAR(219)), vfill = (SFIL(.vfill,79))
     WRITE .vfill AT 1,1 gray
     WRITE 'R E P O R T   T R A N S F E R' AT 1,25 black ON gray
     WRITE 'This program transfers reports from one ' AT 3, 17 white
     WRITE 'database to another. Make sure the' AT 4,17 white
     WRITE 'source and destination databases exist' AT 5, 17 white
     WRITE 'on a workstation or network drive. Make' AT 6, 17 white
     WRITE 'sure the destination database has the' AT 7,17 white
     WRITE 'columns, tables, and views used in the' AT 8, 17 white
     WRITE 'report before you transfer it.' AT 9,17 white
     WRITE 'WARNING: If you transfer ALL reports from the' AT 11,17 yellow
     WRITE 'source database, ALL reports in the' AT 12,17 yellow
     WRITE 'destination database will be removed.' AT 13,17 yellow
     PAUSE 1; SET VAR vbigloop=1, vloop1=1, vloop2=1
     LABEL lbegin
     WHILE vbigloop = 1 THEN
       WHILE vloop1 = 1 THEN
         LABEL ret1
         WRITE .vfill AT 1,1 gray
         WRITE 'Report Transfer...' AT 1,1 black ON gray
         WRITE .vfill AT 25,1 gray
         CHOOSE vfrom_db FROM menu1.mnu AT 3,2
         IF vfrom_db = 'HELP' THEN; GOTO ret1; ENDIF
         WRITE .vfill AT 1,1 gray
         WRITE 'Report Transfer...' AT 1,1 black ON gray
         IF vfrom_db = '[Esc]' OR vfrom_db = 'Exit' THEN
           CLEAR VAR vfrom_db, vto_db, vfill, vexist, vsysfseq, vreport, +
             vnull, vconfirm, vnull, vcheck, vbigloop, v1, vwhat, vsure, +
             vbigloop, vloop1, vloop2, vpass, vlocate
           DEL a2b6f9p3.z3x; CLS
           RETURN
         ENDIF
         IF vfrom_db = 'Other...' THEN
           SET VAR vfrom_db = ' '
           LABEL ret1a
           WRITE .vfill AT 1,1 gray
           WRITE 'Report Transfer...' AT 1,1 black ON gray
           WRITE .vfill AT 24,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'Choose FROM Database or Press [Esc].' +
             AT 24,1 black ON gray
           DIALOG 'Enter path and database name: F:\RBDATA\Source' +
             vfrom_db v1 1
           IF v1 = 'HELP' OR v1 = '[PgUp]' OR v1 = '[PgDn]' THEN
             GOTO ret1a
           ENDIF
           IF v1 = '[Esc]' THEN; CLS; GOTO ret1; ENDIF
           CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 24,1 red; WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 24,24 white ON red
             WRITE 'Confirm path and database name.' +
               AT 25,27 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1a
           ELSE
             SET VAR vsysfseq = SYSRSEQ IN SYSREP +
               WHERE COUNT = 1
             IF vexist <> 0 THEN
               WRITE .vfill AT 25,1 red
               WRITE 'There must be at least one existing report.' +
                 AT 25,16 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
             ELSE
               SET VAR vloop1=2
               WRITE 'Source: ' .vfrom_db AT 3,15 yellow
             ENDIF
           ENDIF
         ELSE  *( vfrom_db is not 'Other...')
           CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 25,25 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
           ELSE
             SET VAR vsysfseq = SYSRSEQ IN SYSREP +
               WHERE COUNT = 1
             IF vexist <> 0 THEN
               WRITE .vfill AT 25,1 red
               WRITE 'There must be at least one existing report.' +
                 AT 25,16 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret1
             ELSE
               SET VAR vloop1 = 2
               WRITE 'Source: ' .vfrom_db AT 3,15 yellow
             ENDIF
           ENDIF
         ENDIF
       ENDWHILE
       WHILE vloop2 = 1 THEN
         LABEL ret2
         WRITE .vfill AT 1,1 gray
         WRITE 'Report Transfer...' AT 1,1 black ON gray
         CHOOSE vto_db FROM menu2.mnu AT 5,13
         IF vto_db = 'HELP' THEN; GOTO ret2; ENDIF
         IF vto_db = '[Esc]' THEN
           SET VAR vloop1=1; CLS; BREAK
         ENDIF
         IF vto_db = 'Other...' THEN
           SET VAR vto_db = ' '
           WRITE .vfill AT 1,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'P r e s s  [E s c]  T o  E x i t.' +
             AT 25,24 black ON gray
           LABEL ret2a
           WRITE .vfill AT 1,1 gray
           WRITE 'Report Transfer...' AT 1,1 black ON gray
           WRITE .vfill AT 24,1 gray; WRITE .vfill AT 25,1 gray
           WRITE 'Choose TO Database.' AT 24,1 black ON gray
           DIALOG 'Enter path & database name: F:\RBDATA\Source' +
             vto_db v1 1
           IF v1 = 'HELP' OR v1 = '[PgUp]' OR v1 = '[PgDn]' THEN
             GOTO ret2A
           ENDIF
           IF v1 = '[Esc]' THEN; GOTO ret2; ENDIF
           CONNECT &vto_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 24,1 red; WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 24,24 white ON red
             WRITE 'Confirm path and database name.' +
               AT 25,27 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2A
           ELSE
             IF vfrom_db = .vto_db THEN
               WRITE .vfill AT 25,1 red
               WRITE 'The two database names must be different.' +
                 AT 25,19 white ON red
               BEEP; PAUSE; CLS FROM 24 TO 25
               WRITE '                                  ' AT 5,26
               GOTO ret2A
             ELSE
               SET VAR vloop2=2, vbigloop=2
               WRITE 'Destination: ' .vto_db AT 5,26 yellow
             ENDIF
           ENDIF
         ELSE  *( vto_db is not 'Other...')
           CONNECT &vto_db; SET BELL OFF; SET QUOTES='
           IF SQLCODE = -7 or SQLCODE = -9 THEN
             WRITE .vfill AT 25,1 red
             WRITE 'Unable to connect requested database.' +
               AT 25,25 white ON red
             BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2
           ELSE
             IF vfrom_db = .vto_db THEN
               WRITE .vfill AT 25,1 red
               WRITE 'The two database names must be different.' +
                 AT 25,19 white ON red
               WRITE '                                  ' AT 5,26
               BEEP; PAUSE; CLS FROM 24 TO 25; GOTO ret2
             ELSE
               SET VAR vloop2=2, vbigloop=2
               WRITE 'Destination: ' .vto_db AT 5,26 yellow
             ENDIF
           ENDIF
         ENDIF
       ENDWHILE
     ENDWHILE
     LABEL ret3  *( Choose reports to transfer..................)
     CONNECT &vfrom_db; SET BELL OFF; SET QUOTES='
     WRITE .vfill AT 1,1 cyan
     WRITE 'Press F1 to transfer ALL REPORTS.' AT 1,26 black ON cyan
     CHOOSE vreport FROM #REPORTS AT 7,24
     WRITE .vfill AT 1,1 gray
     WRITE 'Report Transfer...' AT 1,1 black ON gray
     CLS FROM 2 TO 2
     IF vreport = '[Esc]' THEN
       SET VAR vbigloop=1, vloop1=2, vloop2=1
       WRITE '                                        ' AT 5,26
       GOTO lbegin
     ENDIF
     IF vreport = 'HELP' THEN  *( Transfer all reports........start......)
       WRITE .vfill AT 1,1 red
       WRITE '*** WARNING - All Reports In Destination +
     Database Will Be Removed. ***' AT 1,8 black ON red
       WRITE 'Report(s):' AT 9,50 yellow; WRITE 'ALL' AT 9, 59 yellow
       LABEL ret55
       CHOOSE vsure FROM menu4.mnu AT 9,35
       IF vsure = 'HELP' THEN; GOTO ret55; ENDIF
       IF vsure = 'Yes' THEN
         WRITE .vfill AT 25,1 cyan
         WRITE 'Working...' AT 25,1 black ON cyan BLINK
         SET VAR vnull TEXT = (CVAL('NULL')); SET NULL -0-
         OUTPUT a2b6f9p3.z3x
           UNLOAD DATA FROM SYSREP
         OUTPUT SCREEN
         SET NULL &vnull; CONNECT &vto_db; SET QUOTES='
         REMOVE TABLE SYSREP
         CREATE TABLE SYSREP (SYSRNAME TEXT 8, +
           SYSRDATA TEXT 80, SYSRSEQ INTEGER)
         INPUT a2b6f9p3.z3x
         CREATE INDEX ON SYSREP SYSRNAME
         CREATE INDEX ON SYSREP SYSRSEQ
         SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; CLS; GOTO lbegin
       ELSE
         CLS; SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; GOTO lbegin
       ENDIF
     ENDIF  *( Transfer all reports...............end.........)
     WRITE 'Report: ' .vreport AT 7,37 yellow
     LABEL ret6  *( Continue yes/no........................)
     CHOOSE vsure FROM menu4.mnu AT 9,35
     IF vsure = 'HELP' THEN; GOTO ret6; ENDIF
     IF vsure = '[Esc]' OR vsure = 'No' THEN
       SET VAR vbigloop=1, vloop1=1, vloop2=1
       DISCONNECT; CLS; GOTO lbegin
     ENDIF
     IF vsure = 'Yes' THEN
       SET VAR vnull TEXT = (CVAL('NULL')); SET NULL -0-
       OUTPUT a2b6f9p3.z3x
       UNLOAD DATA FROM SYSREP WHERE SYSRNAME = .vreport
       OUTPUT SCREEN
       SET NULL &vnull; CONNECT &vto_db; SET QUOTES='
       OUTPUT junk; LIST SYSREP; SET VAR vpass = .vexist
       OUTPUT SCREEN; DEL junk
       IF vpass <> 0 THEN
         WRITE .vfill AT 25,1 cyan
         WRITE 'Working...' AT 25,1 black ON cyan BLINK
         CREATE TABLE SYSREP (SYSRNAME TEXT 8, +
           SYSRDATA TEXT 80, SYSRSEQ INTEGER)
         CREATE INDEX ON SYSREP SYSRNAME
         CREATE INDEX ON SYSREP SYSRSEQ
         INPUT a2b6f9p3.z3x
         SET VAR vbigloop=1, vloop1=1, vloop2=1
         DISCONNECT; CLS; GOTO lbegin
       ELSE
         SET VAR vlocate = SYSRNAME IN SYSREP +
           WHERE SYSRNAME = .vreport
         IF vexist = 0 THEN
           WRITE 'WARNING - report exists    ' AT 17,39 yellow
           WRITE 'in destination database.' AT 18,39 yellow
           WRITE 'Report must be removed    ' AT 19,39
           WRITE 'prior to transfer.      ' AT 20,39
           LABEL ret4
           CHOOSE vwhat FROM menu5.mnu AT 11,48
           IF vwhat = 'HELP' THEN; GOTO ret4; ENDIF
           IF vwhat = '[Esc]' OR vwhat = 'Exit transfer' THEN
             SET VAR vbigloop=1, vloop1=1, vloop2=1
             DISCONNECT; CLS; GOTO lbegin
           ENDIF
           IF vwhat = 'Remove Report' THEN
             LABEL ret5
             CHOOSE vsure FROM menu4.mnu AT 13,64
             IF vsure = 'HELP' THEN; GOTO ret5; ENDIF
             IF vsure = 'Yes' THEN
               WRITE .vfill AT 25,1 cyan
               WRITE 'Working...' AT 25,1 black ON cyan BLINK
               REMOVE REPORT .vreport
               INPUT a2b6f9p3.z3x
               SET VAR vbigloop=1, vloop1=1, vloop2=1
               DISCONNECT; CLS; GOTO lbegin
             ELSE
               SET VAR vbigloop=1, vloop1=1, vloop2=1
               DISCONNECT; CLS; GOTO lbegin
             ENDIF
           ENDIF
         ELSE
           WRITE .vfill AT 25,1 cyan
           WRITE 'Working...' AT 25,1 black ON cyan BLINK
           INPUT a2b6f9p3.z3x
           SET VAR vbigloop=1, vloop1=1, vloop2=1
           DISCONNECT; CLS; GOTO lbegin
         ENDIF
       ENDIF
     ENDIF
     RETURN