Google
 

Trailing-Edge - PDP-10 Archives - BB-4148F-BM_1984 - sources/dbms20.ctl
There are 26 other files named dbms20.ctl in the archive. Click here to see a list.
! 
! 
! 
! **********************************************************************
! 
!                         DBMS20.CTL Version 6.1
! 
!                           Copyright (C) 1984
! 
!              by Digital Equipment Corp., Marlborough, MA
! 
!      This software is furnished under a license, and may be used
!      or copied only in accordance with the terms of that license.
! 
! **********************************************************************
! 
@SILENCE
! 
! **********************************************************************
! 
!                                Abstract
!                                --------
! 
! This control file is used to build  the  DBMS-20  utilities  from  the
! distributed  .REL  libraries,  and  to  add  DBMS-20  support  to  the
! object-time systems of the host languages.  Current DBMS-20  utilities
! are:
!                 SCHEMA.EXE      the schema processor
!                 FORDML.EXE      the FORTRAN DML preprocessor
!                 DBMEND.EXE      the database mending facility
!                 DBINFO.EXE      the database information facility
!                 XDML.EXE        the independent DML utility
! Currently supported host languages are:
!                 COBOL-68/74     V.12B
!                 COBOL-20        V.13
!                 FORTRAN         V.7
! 
! This stream requires about 4000  blocks  of  disk  storage,  and  will
! execute in under five minutes (KL CPU time).  To execute:
! 
!         @SUBMIT DBMS20/TIME:0:5:0 [ /TAG: { INSTAL } ]
!                                           { PATCH  }
!                                           { MAINT  }
! 
! Notification of successful completion or of errors occurs  in  one  of
! two  ways:   mail is sent to the submitter (if SYS:MAIL and SYS:RDMAIL
! are available);  or a PLEASE message is sent  to  a  terminal  running
! OPR.
! 
! **********************************************************************
! 
!                           Execution options
!                           -----------------
! 
! This control file performs three major functions, and  contains  three
! entry  points through which those functions are chosen.  The functions
! are:
! 
!       o  complete   the   installation   of   DBMS-20   software
!       (/TAG:INSTAL  -  this is also the default entry point, and
!       need not be specified).  DBCS code will be added into  the
!       supported  host languages.  XDML will be rebuilt.  DBMS-20
!       software components may be automatically integrated into a
!       public directory.
! 
!       o  rebuild DBMS-20 software after one or more patches have
!       been   applied   (/TAG:PATCH).   DBMS  utilities  will  be
!       rebuilt, and DBMS code will be  added  to  supported  host
!       languages.     DBMS-20    software   components   may   be
!       automatically integrated into a public directory.
! 
!       o  rebuild the DBMS-20 software for  maintenance  purposes
!       (/TAG:MAINT).   Only  specified  software  will be rebuilt
!       (see description of SETUP.CMD below), and no  source  file
!       checking  will  be done.  DBMS-20 software components will
!       not be automatically integrated.
! 
! The operation of this control file may also be tailored  by  supplying
! DSK:SETUP.CMD, a sample of which appears below.  Through this optional
! command file, the submitter may:
! 
!       o  specify a non-default search path for  system  software
!       (default is system-wide default SYS:);
!                 'DEFINE SYS: sys-search-list'
! 
!       o  specify a search path for the  DBMS-20 sources  (allows
!       source preservation in one directory,  building in another
!       without copying in sources; default is DSK:);
!                 'DEFINE DSK: dsk-search-list'
! 
!       o  specify  a search path  for the  language-specific com-
!       ponents  to be used when  adding  DBMS-20  support to host
!       languages  (default is DSK:,  and language components must
!       be  placed  in  the  connected  directory.  See  'Required
!       Files');
!                 'DEFINE DBMS20-LIBSRC: search-list'
!
!       o  automatically integrate the DBMS-20 software components
!       into  a public directory (default is no integration - this
!       is not done in MAINT mode);
!                 'DEFINE DBMS20-INTEGRATION: public-directory'
! 
!       o  selectively rebuild the utilities and/or specific  host
!       languages  (no  defaults - these apply only in MAINT mode,
!       and must be specified in that  mode  for  the  appropriate
!       software to be rebuilt - 'DBMS20-XDML' rebuilds only XDML;
!       'DBMS20-UTILS' rebuilds all utilities, including XDML);
!                 'DEFINE DBMS20-XDML:     DSK:'
!                 'DEFINE DBMS20-UTILS:    DSK:'
!                 'DEFINE DBMS20-COBOL13:  DSK:'
!                 'DEFINE DBMS20-COBOL68:  DSK:'
!                 'DEFINE DBMS20-COBOL74:  DSK:'
!                 'DEFINE DBMS20-FORTRAN7: DSK:'
! 
! The ONLY logical definitions during the execution  of  this  procedure
! will be the defaults defined in this .CTL, and any found in SETUP.CMD.
! 
! If SETUP.CMD is not provided, and the control  file  is  submitted  in
! MAINT mode, no software will be rebuilt.
! 
! Sample SETUP.CMD:
! 
!         ! DBMS sources in DBMS-SOURCES
!         DEF DSK: DSK:,INSTAL:<DBMS-SOURCES>
!         ! use latest AUTOPATCH system software
!         DEF SYS: PS:<AUTO-SYS>,SYS:
!         ! language sources in OTS-LIB
!         DEF DBMS20-LIBSRC: PS:<OTS-LIB>
!         ! move results to NEW:
!         DEF DBMS20-INTEGRATION: PS:<NEW>
! 
! **********************************************************************
! 
!                             Required files
!                             --------------
! 
! SYS:    MAKLIB.EXE      LINK.EXE        PA1050.EXE
!         SCAN.REL        WILD.REL        HELPER.REL
! *** if supporting any COBOL
!         MACREL.REL
! 
! DSK:
! *** Utility/DBCS relinks
!         SCHEMA.CMD      DBMEND.CMD      DBINFO.CMD      FORDML.CMD
!         DBCS28.CMD      DBCS24.CMD      DBCS2F.CMD      DBCS13.CMD
!         XDML.CMD
! *** Libraries
!         GENMS2.REL      SCHIO2.REL      DDLANY.REL      GENME1.REL
!         DDL20.REL       GENIO2.REL      STRHI.REL       GENME2.REL
!         MNDANY.REL      DBMEN2.REL      DBSANY.REL      INFANY.REL
!         DBSI20.REL      FMLANY.REL      XDTB79.REL      DBSTUB.REL
!         XDANY.REL       DBS20.REL
! *** Misc. patches
!         XDBIND.FIX      PADSCM.FIX      FUNAD.FIX
! *** COBOL V.12B compiler modules
!         CMLSYM.MAC      DBDML.MAC       DBGETF.MAC      DMLERR.MAC
!         DMLIO.MAC       DMLVOK.MAC      STRDCL.MAC      DBSDCL.MAC
!         DBCSYM.MAC      GENDCL.MAC      STRUNV.MAC      COPYRT.MAC
!         C12BMV.CMD      C20MOV.CMD
! *** Executable utilities (required in INSTAL mode)
!         SCHEMA.EXE      FORDML.EXE      DBMEND.EXE      DBINFO.EXE
!         XDML.EXE
! *** Help files
!         SCHEMA.HLP      FORDML.HLP      DBMEND.HLP      DBINFO.HLP
!         XDML.HLP
! *** UETP updates and local tests
!         DBMTST.CTL      NEWUTP.CTL
! 
! DBMS20-LIBSRC:
! (Following modules distributed with the host languages. They must be
!   placed in the connected directory if DBMS20-LIBSRC: is not defined)
! *** for COBOL-68 V.12B support
!         LIBSHR.REL      LIBOL.REL
! *** for COBOL-74 V.12B support
!         C74SHR.REL      C74LIB.REL
! *** for COBOL V.13 support
!         C8XSHR.REL      COBLIB.REL
! *** for FORTRAN V.7 support
!         FORLIB.REL      FORDBM.RLR
! 
! **********************************************************************
! 
!                             Optional files
!                             --------------
!
! SYS:    MAIL.EXE        RDMAIL.EXE
!         (If available, mail is sent to submitter detailing results
!           of run. If not, 'PLEASE' message is sent to operator's
!           terminal).
! 
! DSK:    SETUP.CMD  (site-specific definitions, maintenance options)
!         XDTUSR.REL (site-specific XDML DISPLAY-9 conversion table)
! 
! **********************************************************************
! 
!                              Output files
!                              ------------
! 
! DSK:    DBMS20.MAIL (contains a list of components built/distributed,
!           or a list of errors encountered during the run)
!         SCHEMA.EXE      FORDML.EXE      DBMEND.EXE      DBINFO.EXE
!         XDML.EXE
!         SCHEMA.MAP      FORDML.MAP      DBMEND.MAP      DBINFO.MAP
!         XDML.MAP
!         DBMS20-INTEGRATION.CMD          DBMS20-RESULTS.TXT
! *** for COBOL-68 V.12B support
!         LIBO12.EXE      LIBO12.MAP      DBMS.REL
!         LIBOL.REL (see notes 1 and 2 below)
! *** for COBOL-74 V.12B support
!         C74O12.EXE      C74O12.MAP      DBMS.REL
!         C74LIB.REL (see notes 1 and 2 below)
! *** for COBOL V.13 support
!         COBOTS-V13.EXE  COBOTS.MAP      DBMS.REL
!         COBLIB.REL (see note 2 below)
! *** for FORTRAN V.7 support
!         DBMSF.EXE       DBMSF.MAP       DBMSF.REL
!         FORLIB.REL (see note 3 below)
! 
!         Note 1: created when the DBMS-20 V.6.1 stub is not detected
!                 in the existing link-time library.
!         Note 2: created when DBMS-20 V.6 support had previously been
!                 added into the link-time library.
!         Note 3: created when the supplied FORLIB.REL does not contain
!                 FORTRAN edit 3354.
! 
! **********************************************************************
! 
! 
@REVIVE
! Entry points

INSTAL::	! The default, for customer installation.
@CHKPNT INSTAL
@DEFINE *
@
@DEFINE INTERN-INSTAL: DSK:
@COPY TTY: DBMS20-RESULTS.TXT
@ DBMS20 finished (started from tag 'INSTAL'). The following files:
@
@GOTO ENDEP

PATCH::		! For customer rebuild after patches applied.
@CHKPNT PATCH
@DEFINE *
@
@DEFINE INTERN-PATCH: DSK:
@COPY TTY: DBMS20-RESULTS.TXT
@ DBMS20 finished (started from tag 'PATCH'). The following files:
@
@GOTO ENDEP

MAINT::		! For maintenance (quick) rebuilds.
@CHKPNT MAINT
@DEFINE *
@
@DEFINE INTERN-MAINT: DSK:
@COPY TTY: DBMS20-RESULTS.TXT
@ DBMS20 finished (started from tag 'MAINT'). Files created:
@
@GOTO ENDEP

ENDEP::		! End of valid entry points.
CLIMAT::	! Set up execution environment.
@INFO DISK	! Internal statistics.
! Init error message file first.
@COPY TTY: DBMS20-ERROR.TXT
@Fatal error in DBMS20.CTL, after last tag listed below. Job aborting!
@CLIMAT::
@ERROR
! An EXPUNGE early on insures that all VDIR's will work as expected.
@EXPUNGE
! Init. the integration command file.
@COPY TTY: DBMS20-INTEGRATION.CMD
@ENABLE
@
! Get site-specific definitions (if any).
@ERROR %
@DIR DSK:SETUP.CMD
@IF (ERROR) @GOTO NOSTP
@ERROR
@TAKE DSK:SETUP.CMD
NOSTP::
! See if version file exists for the utilities.
@ERROR %
@DEFINE INTVER: DSK:
@VDIR DB20V6.VER
@IF (ERROR) @DEFINE INTVER: NUL:
! Check if OK to send mail.
@DIR SYS:MAIL.EXE,SYS:RDMAIL.EXE
@IF (NOERROR) @DEFINE INTERN-MAILOK: DSK:

! Now do the entry-point-specific stuff.
! If INSTAL, don't do utilities, except XDML (may be affected
! by installation-time options.
@ERROR %
@DIR INTERN-INSTAL:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NEXT
@ERROR
@DEFINE DBMS20-UTILS:
@DEFINE DBMS20-XDML: DSK:
!
NEXT::
! If PATCH, force the utilities.
@ERROR %
@DIR INTERN-PATCH:DBMS20-RESULTS.TXT
@IF (NOERROR) @DEFINE DBMS20-UTILS: DSK:
! If MAINT, use only the selection from SETUP.CMD.
@DIR INTERN-MAINT:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO SELDON
!
! Turn on all host language options.
@ERROR
@DEFINE DBMS20-COBOL13: DSK:
@DEFINE DBMS20-COBOL68: DSK:
@DEFINE DBMS20-COBOL74: DSK:
@DEFINE DBMS20-FORTRAN7: DSK:
!
SELDON::
! Create proper search path for language-specific files.
@ERROR %
@DEFINE INTERN-LIBSRC: DSK:	! Assume files on DSK:
@INFO DISK DBMS20-LIBSRC:	!   unless DBMS20-LIBSRC: defined
@IF (NOERROR) @DEFINE INTERN-LIBSRC: DBMS20-LIBSRC:
!
! Document the resulting environment.
@INFO LOGICAL JOB
! Now the climate should be just right.
CKLANG::
@APPEND TTY: DBMS20-ERROR.TXT
@, CKLANG::
! Determine which languages to rebuild. Enter with some requests on, turn
!   off if files not available (except MAINT mode, specifically requested,
!   fatal if files not available).
!
NEXT::	! COBOL-13
@ERROR %
@INFO DISK DBMS20-COBOL13:	! Skip if request not on
@IF (ERROR) @GOTO NEXT
@VDIR INTERN-LIBSRC:COBLIB.REL, INTERN-LIBSRC:C8XSHR.REL, SYS:MACREL.REL,
@CHECK SEQ
@
@IF (NOERROR) @GOTO NEXT	! Files match request
@INFO DISK INTERN-MAINT:	! If MAINT, no files is fatal
@IF (NOERROR) @GOTO TRUBLE
@NOERROR			! (May not be defined)
@DEF DBMS20-COBOL13:		! Turn of request
!
NEXT::	! COBOL-68
@ERROR %
@INFO DISK DBMS20-COBOL68:	! Skip if request not on
@IF (ERROR) @GOTO NEXT
@VDIR INTERN-LIBSRC:LIBOL.REL, INTERN-LIBSRC:LIBSHR.REL, SYS:MACREL.REL,
@CHECK SEQ
@
@IF (NOERROR) @GOTO NEXT	! Files match request
@INFO DISK INTERN-MAINT:	! If MAINT, no files is fatal
@IF (NOERROR) @GOTO TRUBLE
@NOERROR			! (May not be defined)
@DEF DBMS20-COBOL68:		! Turn of request
!
NEXT::	! COBOL-74
@ERROR %
@INFO DISK DBMS20-COBOL74:	! Skip if request not on
@IF (ERROR) @GOTO NEXT
@VDIR INTERN-LIBSRC:C74LIB.REL, INTERN-LIBSRC:C74SHR.REL, SYS:MACREL.REL,
@CHECK SEQ
@
@IF (NOERROR) @GOTO NEXT	! Files match request
@INFO DISK INTERN-MAINT:	! If MAINT, no files is fatal
@IF (NOERROR) @GOTO TRUBLE
@NOERROR			! (May not be defined)
@DEF DBMS20-COBOL74:		! Turn of request
!
NEXT::	! FORTRAN-7
@ERROR %
@INFO DISK DBMS20-FORTRAN7:	! Skip if request not on
@IF (ERROR) @GOTO NEXT
@VDIR INTERN-LIBSRC:FORLIB.REL, INTERN-LIBSRC:FORDBM.RLR,
@CHECK SEQ
@
@IF (NOERROR) @GOTO NEXT	! Files match request
@INFO DISK INTERN-MAINT:	! If MAINT, no files is fatal
@IF (NOERROR) @GOTO TRUBLE
@NOERROR			! (May not be defined)
@DEF DBMS20-FORTRAN7:		! Turn of request
!
NEXT::	! Determine if rebuilding any languages.
@ERROR %
@INFO DISK DBMS20-COBOL13:
@IF (NOERROR) @GOTO ANYOTS
@INFO DISK DBMS20-COBOL68:
@IF (NOERROR) @GOTO ANYOTS
@INFO DISK DBMS20-COBOL74:
@IF (NOERROR) @GOTO ANYOTS
@INFO DISK DBMS20-FORTRAN7:
@IF (ERROR) @GOTO NOOTS
ANYOTS::
! Flag request for some language support.
@DEFINE INTERN-ANYOTS: DSK:
NOOTS::
! Finally, special-case FORDML. Request if INSTAL/PATCH and building for
!   FORTRAN, or MAINT and UTILS requested.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO CKUTIL
@INFO DISK DBMS20-FORTRAN7:
@IF (ERROR) @GOTO NOFDML
@GOTO DOFDML			! (INSTAL/PATCH and FORTRAN7)
CKUTIL::
@INFO DISK DBMS20-UTILS:
@IF (ERROR) @GOTO NOFDML	! (If no error, MAINT and UTILS)
DOFDML::
@DEFINE INTERN-FORDML: DSK:	! Request FORDML
NOFDML::
SORCES::
@APPEND TTY: DBMS20-ERROR.TXT
@, SORCES::
@ERROR %
! If rebuilding any OTS, and not getting fresh language-specific files from
!   DBMS20-LIBSRC:, must make sure we're not working with possibly
!   corrupted files (previous crash or job cancellation).
@INFO DISK INTERN-ANYOTS:
@IF (ERROR) @GOTO NEXT
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @GOTO NEXT
! If backup copies exist from previous run, we may have changed/
!   corrupted language components.
@DIR *.OLD-DBMS20-REL
@IF (ERROR) @GOTO NEXT
! Form message and bug out.
!   (Don't go thru TRUBLE...leave things as they are.)
@DEFINE INTERN-TRUBLE: DSK:
@COPY TTY: DBMS20-ERROR.TXT
@ DBMS20.CTL has found backup copies of language-specific components,
@ indicating that a previous run was cancelled before cleanup occurred.
@ As a result, some language-specific components may be in an
@ indeterminate state. Please do the following:
@	1) delete *.OLD-DBMS20-REL in the connected directory;
@	2) place known good copies of the language-specific
@		components in the connected directory.
@ The affected files are:
@      COBLIB.REL      LIBOL.REL        C74LIB.REL      FORLIB.REL
@   (COBOL-20 V.13) (COBOL-68 V.12B) (COBOL-74 V.12B) (FORTRAN V.7)
@
@GOTO ENDIT
!
NEXT::
! Check the origin of common source files. Skip this in maint. mode.
@ERROR %
@DIR INTERN-MAINT:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO SKPSRC
!
@GET SYS:LINK
@INFO VERSION
@GET SYS:MAKLIB
@INFO VERSION
@GET SYS:MAIL
@INFO VERSION
@GET SYS:RDMAIL
@INFO VERSION
@GET SYS:PA1050
@INFO VERSION
@VDIR SYS:LINK.EXE,SYS:MAKLIB.EXE,SYS:MAIL.EXE,SYS:RDMAIL.EXE,SYS:PA1050.EXE,
@CHECK SEQ
@
@VDIR SYS:SCAN.REL,SYS:WILD.REL,SYS:HELPER.REL,
@CHECK SEQ
@
@VDIR DBMS20.CTL,
@CHECK SEQ
@
@VDIR DBSANY.REL, DBS20.REL, SCHIO2.REL,
@CHECK SEQ
@
@VDIR CMLSYM.MAC, DBDML.MAC, DBGETF.MAC, DMLERR.MAC, DMLIO.MAC, DMLVOK.MAC,
@CHECK SEQ
@
@VDIR STRDCL.MAC, DBSDCL.MAC, DBCSYM.MAC, GENDCL.MAC, STRUNV.MAC,
@CHECK SEQ
@
@VDIR C12BMV.CMD, C20MOV.CMD,
@CHECK SEQ
@
@VDIR DBCS28.CMD, DBCS24.CMD, DBCS13.CMD, DBCS2F.CMD,
@CHECK SEQ
@
@VDIR SCHEMA.CMD, FORDML.CMD, DBMEND.CMD, DBINFO.CMD, XDML.CMD,
@CHECK SEQ
@
@VDIR SCHEMA.HLP, FORDML.HLP, DBMEND.HLP, DBINFO.HLP, XDML.HLP,
@CHECK SEQ
@
@VDIR DBMEN2.REL, DBSI20.REL, FMLANY.REL, GENIO2.REL, DDLANY.REL, DDL20.REL,
@CHECK SEQ
@
@VDIR GENME1.REL, GENME2.REL, GENMS2.REL, INFANY.REL, MNDANY.REL, STRHI.REL,
@CHECK SEQ
@
@VDIR XDANY.REL, XDTB79.REL, DBSTUB.REL,
@CHECK SEQ
@
@VDIR XDBIND.FIX, PADSCM.FIX, FUNAD.FIX,
@CHECK SEQ
@
@VDIR DBMTST.CTL, NEWUTP.CTL,
@CHECK SEQ
@
! In INSTAL mode, the executable utilities must be present.
@VDIR INTERN-INSTAL:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NOINS
@VDIR SCHEMA.EXE, FORDML.EXE, DBMEND.EXE, DBINFO.EXE, XDML.EXE,
@CHECK SEQ
@
NOINS::
@NOERROR	! SETUP.CMD optional
@VDIR SETUP.CMD,
@CHECK SEQ
@
SKPSRC::
DBOTS::
@APPEND TTY: DBMS20-ERROR.TXT
@, DBOTS::
! Here to build DBMS-20 support into COBOL and/or FORTRAN.
! If no language requests, can skip a whole lot.
@ERROR %
@INFO DISK INTERN-ANYOTS:
@IF (ERROR) @GOTO NOLANG
!
BLDCOM::
! Create DBMS.REL, common for all language support.
! Save old copy if around.
@NOERROR
@RENAME DBMS.REL DBMS.OLD-DBMS20-REL
@ERROR %
@APPEND DBSANY.REL,DBS20.REL,SCHIO2.REL DBMS.REL.-1
! If building FORTRAN support, add in FORDBM.RLR.
@INFO DISK DBMS20-FORTRAN7:
@IF (ERROR) @GOTO NOFDBM
! Get fresh file from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:FORDBM.RLR
@MAKLIB
*DBMS=DBMS/MASTER:DBPORT,FORDBM.RLR/INSERT
! Also make sure obsolete DBMS. resolutions are not in FORDBM
@MAKLIB
*NUL:=DBMS/EXTRACT:FDBML
@IF (ERROR) @GOTO NFDBML
@MAKLIB
*DBMS=DBMS/DELETE:FDBML
NFDBML::
NOFDBM::
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@	DBCS library:       DBMS.REL
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY DBMS.REL DBMS20-INTEGRATION:
@
! Fall into language-specific stuff.
CBL13::
@APPEND TTY: DBMS20-ERROR.TXT
@, CBL13::
!	**********    COBOL (V.13)     **********
! See if we should be here...
@ERROR %
@INFO DISK DBMS20-COBOL13:
@IF (ERROR) @GOTO NOC13
! Get fresh files from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:COBLIB.REL,DBMS20-LIBSRC:C8XSHR.REL
! Decide how much work has to be done.
@ERROR 
@MAKLIB
*NUL:=COBLIB/EXTRACT:DBGATE
@IF (ERROR) @GOTO RELINK
! Make backup copy of library, unless it came from outside.
@ERROR %
@INFO DISK DBMS20-LIBSRC:
@IF (ERROR) @COPY COBLIB.REL COBLIB.OLD-DBMS20-REL
!
REMV6::		! Remove DBMS-20 V.6 support.
@ERROR
@MAKLIB
*CBDSTP.TMP=COBLIB/EXTRACT:(DBSTUB,DBMS.,%DBSTP,DBMVR.)
*COBLIB=COBLIB/DELETE:(DBSTUB,DBMS.,%DBSTP,DBMVR.)
*COBFUN.TMP=COBLIB/EXTRACT:COBFUN
*COBLIB=COBLIB/DELETE:COBFUN
*COBLIB=COBLIB/DELETE:(DBGATE,XSTAT.,STATS.,LKTIM.,LKRTY.,TBLOK.,LRUR.,DBFLI.,-
*DBPORT,DBLEAV,DBIF,DBMIO,DBMOC,DBMLOK,DBMANY,DBCLOS,DBDEL,DBFIND,DBGET,-
*DBINS,DBMOVE,DBMOD,DBOPEN,DBREM,DBSTOR,DBTRAN,DBCALC,CALC.,DBSET,DBWITH,-
*DBCURN,DBSTAT,DBCHAR,DBKALC,DBKITM,DBKIO,DBJOUR,DBOTSI,DBBIND,SCH.IN,-
*ID.INI,TID.IN,REC.WA,AR.WAL,TRN.WA,SETDB,UPD.SS,TRU.BL,SCHIO)
*COBLIB=COBLIB/MASTER:(DEBSTB,DEBSTB,DEBSTB,DEBSTB),CBDSTP.TMP/INSERT:(DBSTUB,-
*DBMS.,%DBSTP,DBMVR.)
*COBLIB=COBLIB/MASTER:EASTBL,COBFUN.TMP/INSERT:COBFUN
*/EXIT
@DELETE CBDSTP.TMP,COBFUN.TMP
@EXPUNGE
! Flag new link-time library.
@DEFINE INTERN-NEW13LIB: DSK:
! Re-index it.
@MAKLIB
*COBLIB=COBLIB/INDEX
!
RELINK::	! Create new OTS.
! Save old copy if around.
@NOERROR
@RENAME COBOTS-V13.EXE COBOTS-V13.OLD-DBMS20-EXE
@ERROR %
@LINK
*@DBCS13.CMD
! Throw out symbol table, save pages 0-1 and (migratory) hi-seg.
@SAVE DSK:COBOTS-V13 0 1, 400 777
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@	COBOL V.13:         COBOTS-V13.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY COBOTS-V13.EXE DBMS20-INTEGRATION:
@
! Also note new library if created.
@DIR INTERN-NEW13LIB:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NOC13
@APPEND TTY: DBMS20-RESULTS.TXT
@			    COBLIB.REL (altered for DBMS-20 V.6.1)
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY COBLIB.REL DBMS20-INTEGRATION:
@
NOC13::
@EXPUNGE
! End of COBOL V.13 support section.
CBL68::
@APPEND TTY: DBMS20-ERROR.TXT
@, CBL68::
!	**********    COBOL-68 (V.12B)     **********
! See if we should be here...
@ERROR %
@INFO DISK DBMS20-COBOL68:
@IF (ERROR) @GOTO NOC68
! Get fresh files from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:LIBOL.REL,DBMS20-LIBSRC:LIBSHR.REL
! Decide how much work needs to be done
@ERROR
@MAKLIB
*NUL:=LIBOL/EXTRACT:DBSTUB
@IF (NOERROR) @GOTO RELINK
! Make backup copy of library, unless it came from outside.
@ERROR %
@INFO DISK DBMS20-LIBSRC:
@IF (ERROR) @COPY LIBOL.REL LIBOL.OLD-DBMS20-REL
!
@ERROR
@MAKLIB
*NUL:=LIBOL/EXTRACT:DBGATE
@IF (NOERROR) @GOTO REMV6
!
REMDUM::	! Remove original V.12B dummy resolutions.
@MAKLIB
*LIBOL=LIBOL/DELETE:(RSVGAT,RESOLV)
@GOTO ADSTUB
!
REMV6::		! Remove DBMS-20 V.6 support.
@MAKLIB
*LIBOL=LIBOL/DELETE:(DBGATE,XSTAT.,STATS.,LKTIM.,LKRTY.,TBLOK.,LRUR.,DBFLI.,-
*DBPORT,DBLEAV,DBIF,DBMIO,DBMOC,DBMLOK,DBMANY,DBCLOS,DBDEL,DBFIND,DBGET,-
*DBINS,DBMOVE,DBMOD,DBOPEN,DBREM,DBSTOR,DBTRAN,DBCALC,CALC.,DBSET,DBWITH,-
*DBCURN,DBSTAT,DBCHAR,DBKALC,DBKITM,DBKIO,DBJOUR,DBOTSI,DBBIND,SCH.IN,-
*ID.INI,TID.IN,REC.WA,AR.WAL,TRN.WA,SETDB,UPD.SS,TRU.BL,SCHIO)
!
ADSTUB::	! Add in stub to call in DBMS.REL.
@MAKLIB
*NUL:=LIBOL/EXTRACT:(%DBSTP)
@IF (NOERROR) *LIBOL=LIBOL/DELETE:(%DBSTP)
*NUL:=LIBOL/EXTRACT:(DBSTP$)
@IF (NOERROR) *LIBOL=LIBOL/DELETE:(DBSTP$)
*LIBOL=LIBOL/DELETE:(DBVER$)
*LIBOL=LIBOL/MASTER:(COBFUN,COBFUN,COBFUN,COBFUN),DBSTUB/INSERT:(DBSTUB,-
*DBMS.,%DBSTP,DBMVR.)
! Flag new link-time library.
@DEFINE INTERN-NEW68LIB: DSK:
! Re-index it.
@MAKLIB
*LIBOL=LIBOL/INDEX
!
RELINK::	! Create new OTS
! Save old copy if around.
@NOERROR
@RENAME LIBO12.EXE LIBO12.OLD-DBMS20-EXE
@ERROR %
@LINK
*@DBCS28.CMD
! Throw out symbol table, save pages 0-1 and (migratory) hi-seg.
@SAVE DSK:LIBO12 0 1, 400 777
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@	COBOL-68 V.12B:     LIBO12.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY LIBO12.EXE DBMS20-INTEGRATION:
@
! Also note new library if created.
@DIR INTERN-NEW68LIB:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NOC68
@APPEND TTY: DBMS20-RESULTS.TXT
@			    LIBOL.REL  (altered for DBMS-20 V.6.1)
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY LIBOL.REL DBMS20-INTEGRATION:
@
NOC68::
@EXPUNGE
! End of COBOL-68 support section.
CBL74::
@APPEND TTY: DBMS20-ERROR.TXT
@, CBL74::
!	**********    COBOL-74 (V.12B)    **********
! See if we should be here...
@ERROR %
@INFO DISK DBMS20-COBOL74:
@IF (ERROR) @GOTO NOC74
! Get fresh files from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:C74LIB.REL,DBMS20-LIBSRC:C74SHR.REL
! Decide how much work needs to be done
@ERROR
@MAKLIB
*NUL:=C74LIB/EXTRACT:DBSTUB
@IF (NOERROR) @GOTO RELINK
! Make backup copy of library, unless it came from outside.
@ERROR %
@INFO DISK DBMS20-LIBSRC:
@IF (ERROR) @COPY C74LIB.REL C74LIB.OLD-DBMS20-REL
!
@ERROR
@MAKLIB
*NUL:=C74LIB/EXTRACT:DBGATE
@IF (NOERROR) @GOTO REMV6
!
REMDUM::	! Remove original V.12B dummy resolutions.
@MAKLIB
*C74LIB=C74LIB/DELETE:(RSVGAT,RESOLV)
@GOTO ADSTUB
!
REMV6::		! Remove DBMS-20 V.6 support.
@MAKLIB
*C74LIB=C74LIB/DELETE:(DBGATE,XSTAT.,STATS.,LKTIM.,LKRTY.,TBLOK.,LRUR.,DBFLI.,-
*DBPORT,DBLEAV,DBIF,DBMIO,DBMOC,DBMLOK,DBMANY,DBCLOS,DBDEL,DBFIND,DBGET,-
*DBINS,DBMOVE,DBMOD,DBOPEN,DBREM,DBSTOR,DBTRAN,DBCALC,CALC.,DBSET,DBWITH,-
*DBCURN,DBSTAT,DBCHAR,DBKALC,DBKITM,DBKIO,DBJOUR,DBOTSI,DBBIND,SCH.IN,-
*ID.INI,TID.IN,REC.WA,AR.WAL,TRN.WA,SETDB,UPD.SS,TRU.BL,SCHIO)
!
ADSTUB::	! Add in stub to call in DBMS.REL.
@MAKLIB
*NUL:=C74LIB/EXTRACT:(%DBSTP)
@IF (NOERROR) *C74LIB=C74LIB/DELETE:(%DBSTP)
*NUL:=C74LIB/EXTRACT:(DBSTP$)
@IF (NOERROR) *C74LIB=C74LIB/DELETE:(DBSTP$)
*C74LIB=C74LIB/DELETE:(DBVER$)
*C74LIB=C74LIB/MASTER:(COBFUN,COBFUN,COBFUN,COBFUN),DBSTUB/INSERT:(DBSTUB,-
*DBMS.,%DBSTP,DBMVR.)
! Flag new link-time library.
@DEFINE INTERN-NEW74LIB: DSK:
! Re-index it.
@MAKLIB
*C74LIB=C74LIB/INDEX
!
RELINK::	! Create new OTS
! Save old copy if around.
@NOERROR
@RENAME C74O12.EXE C74O12.OLD-DBMS20-EXE
@ERROR %
@LINK
*@DBCS24.CMD
! Throw out symbol table, save pages 0-1 and (migratory) hi-seg.
@SAVE DSK:C74O12 0 1, 400 777
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@	COBOL-74 V.12B:     C74O12.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY C74O12.EXE DBMS20-INTEGRATION:
@
! Also note new library if created.
@DIR INTERN-NEW74LIB:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NOC74
@APPEND TTY: DBMS20-RESULTS.TXT
@			    C74LIB.REL (altered for DBMS-20 V.6.1)
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY C74LIB.REL DBMS20-INTEGRATION:
@
NOC74::
@EXPUNGE
! End of COBOL-74 support section.
FORTV7::
@APPEND TTY: DBMS20-ERROR.TXT
@, FORTV7::
!	**********     DBMSF (FORTRAN V.7)     **********
! See if we should be here...
@ERROR %
@INFO DISK DBMS20-FORTRAN7:
@IF (ERROR) @GOTO NOFV7
! Get fresh files from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:FORLIB.REL
! See if FORLIB edit 3354 must be applied.
@ERROR
@MAKLIB
*FORLIB.NEW=FORLIB.REL,FUNAD.FIX/F
@IF (ERROR) @GOTO EDITOK
@MAKLIB
*FORLIB.NEW=FORLIB.NEW/INDEX
@IF (ERROR) @GOTO TRUBLE
! Make backup copy of library, unless it came from outside.
@ERROR %
@INFO DISK DBMS20-LIBSRC:
@IF (ERROR) @COPY FORLIB.REL FORLIB.OLD-DBMS20-REL
! And put the edit into effect.
@RENAME FORLIB.NEW FORLIB.REL
! Flag new link-time library.
@DEFINE INTERN-NEWFORLIB: DSK:
EDITOK::
!
! Save old copy if around.
@NOERROR
! DBMSF.REL is a copy of DBMS.REL, to fulfill the link-time requirements
!   of FORLIB.REL V.7.
@RENAME DBMSF.REL DBMSF.OLD-DBMS20-REL
@RENAME DBMSF.EXE DBMSF.OLD-DBMS20-EXE
@ERROR %
@COPY DBMS.REL DBMSF.REL
@LINK
*@DBCS2F.CMD
! Throw out symbol table, save only hi-seg.
@GET DBMSF
@SAVE DBMSF 600 777
!
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@	FORTRAN V.7:        DBMSF.EXE   DBMSF.REL
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY DBMSF.EXE,DBMSF.REL DBMS20-INTEGRATION:
@
! Also note new library if created.
@DIR INTERN-NEWFORLIB:DBMS20-RESULTS.TXT
@IF (ERROR) @GOTO NOFV7
@APPEND TTY: DBMS20-RESULTS.TXT
@			    FORLIB.REL (altered for DBMS-20 V.6.1)
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY FORLIB.REL DBMS20-INTEGRATION:
@
NOFV7::
@EXPUNGE
! End of FORTRAN V.7 support section.
VEROTS::
@APPEND TTY: DBMS20-ERROR.TXT
@, VEROTS::
! Verify that at least one host language was available. If not,
! something is wrong (except in MAINT mode).
@ERROR %
@DIR INTERN-MAINT:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO NOVER
!
@DIR DBMS20-COBOL13:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO VEROK
@DIR DBMS20-COBOL68:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO VEROK
@DIR DBMS20-COBOL74:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO VEROK
@DIR DBMS20-FORTRAN7:DBMS20-RESULTS.TXT
@IF (NOERROR) @GOTO VEROK
@GOTO TRUBLE
VEROK::
NOVER::



NOLANG::
! Skip to here if no language support requested.
! Fall into utility builds.
UTILS::
@APPEND TTY: DBMS20-ERROR.TXT
@, UTILS::
! Here to build the DBMS utilities SCHEMA, FORDML, DBMEND, DBINFO and XDML.
! See if we should be here.
@ERROR %
@INFO DISK DBMS20-UTILS:
@IF (NOERROR) @GOTO UTLBLD
! Might have just requested XDML.
@INFO DISK DBMS20-XDML:
@IF (NOERROR) @GOTO XDMBLD
@GOTO NOUTLS
!
UTLBLD::
! Save old copies if around.
@NOERROR
@RENAME SCHEMA.EXE,FORDML.EXE,DBMEND.EXE,DBINFO.EXE *.OLD-DBMS20-EXE
@ERROR %
!
! SCHEMA
@LINK
*@INTVER:DB20V6.VER
*@SCHEMA.CMD
!
! FORDML
@LINK
*@INTVER:DB20V6.VER
*@FORDML.CMD
!
! DBMEND
@LINK
*@INTVER:DB20V6.VER
*@DBMEND.CMD
!
! DBINFO
@LINK
*@INTVER:DB20V6.VER
*@DBINFO.CMD
! Fall into XDML build.
!
XDMBLD::
! Save old copy if around.
@NOERROR
@RENAME XDML.EXE *.OLD-DBMS20-EXE
@ERROR %
!
! XDML
! Default to XDTB79.REL for standard DISPLAY-9 conversion table.
@COPY XDTB79.REL XDTABL.REL
! Supersede with user-specific table if available.
@COPY XDTUSR.REL XDTABL.REL
@IF (ERROR) ! acceptable error
! Patch up special BIND code.
@MAKLIB
*XDSANY.REL=DBSANY.REL,XDBIND.FIX/F
! And link it all together.
@LINK
*@INTVER:DB20V6.VER
*@XDML.CMD
!
NOUTLS::
! Now add to the summary message.
! Unless INSTAL, don't need .HLPs
@INFO DISK INTERN-INSTAL:
@IF (ERROR) @GOTO UTLMS1
! If INSTAL, force utils.EXE message too, even though they weren't built.
@DEFINE DBMS20-UTILS: DSK:
@APPEND TTY: DBMS20-RESULTS.TXT
@	help files:         SCHEMA.HLP  DBMEND.HLP  DBINFO.HLP 
@			    XDML.HLP
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY SCHEMA.HLP,DBMEND.HLP,DBINFO.HLP,XDML.HLP DBMS20-INTEGRATION:
@
! Include FORDML if requested.
@INFO DISK intern-fordml:
@IF (ERROR) @GOTO UTLMS1
@APPEND TTY: DBMS20-RESULTS.TXT
@			    FORDML.HLP
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY FORDML.HLP DBMS20-INTEGRATION:
@
UTLMS1::
@INFO DISK DBMS20-UTILS:
@IF (ERROR) @GOTO UTLMS2
! Force XDML message too (UTILS or INSTAL).
@DEFINE DBMS20-XDML: DSK:
@APPEND TTY: DBMS20-RESULTS.TXT
@	utilities:          SCHEMA.EXE  DBMEND.EXE  DBINFO.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY SCHEMA.EXE,DBMEND.EXE,DBINFO.EXE DBMS20-INTEGRATION:
@
UTLMS2::
@INFO DISK DBMS20-XDML:
@IF (ERROR) @GOTO UTLMS3
@APPEND TTY: DBMS20-RESULTS.TXT
@			    XDML.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY XDML.EXE DBMS20-INTEGRATION:
@
UTLMS3::
! Include FORDML if requested.
@INFO DISK INTERN-FORDML:
@IF (ERROR) @GOTO UTLMS4
@APPEND TTY: DBMS20-RESULTS.TXT
@			    FORDML.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY FORDML.EXE DBMS20-INTEGRATION:
@
UTLMS4::
@EXPUNGE
INTGRT::
@APPEND TTY: DBMS20-ERROR.TXT
@, INTGRT::
! Integrate the components into a public directory.
@ERROR %
! First finish the .CMD file.
@APPEND TTY: DBMS20-INTEGRATION.CMD
@DISABLE
@
! Auto-integration not done in MAINT mode.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO INTEND
! Also if DBMS20-INTEGRATION: not defined (but finish summary message).
@INFO DISK DBMS20-INTEGRATION:
@IF (ERROR) @GOTO NOINT
@TAKE DBMS20-INTEGRATION.CMD
! Errors are fatal (eg, if no access allowed but integration requested).
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@ have been copied to DBMS20-INTEGRATION: to complete installation.
@
@GOTO INTEND
!
NOINT::
! Add to summary message.
@APPEND TTY: DBMS20-RESULTS.TXT
@ should be copied to appropriate public directories to complete installation.
@
INTEND::
@EXPUNGE
!
ALLOK::
@APPEND TTY: DBMS20-ERROR.TXT
@, ALLOK::
! Normal termination routine. Fall into here if there have been no errors.
!
! Skip output check in MAINT mode.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO NOCHEK
!
! List the resulting components.
@NOERROR	! Just about everythimg is optional.
@VDIR SCHEMA.EXE, FORDML.EXE, DBMEND.EXE, DBINFO.EXE, XDML.EXE,
@CHECK SEQ
@
@VDIR COBLIB.REL, LIBOL.REL, C74LIB.REL, DBMS.REL, DBMSF.REL,
@CHECK SEQ
@
@VDIR COBOTS-V13.EXE, LIBO12.EXE, C74O12.EXE, DBMSF.EXE,
@CHECK SEQ
@
!
NOCHEK::
!
@NOERROR
@TYPE DBMS20-RESULTS.TXT
! Delete the old backup copies.
@DELETE *.OLD-DBMS20-EXE,*.OLD-DBMS20-REL
! Start up next stream (if any).
@MODIFY BATCH */DEPEND:-1
@GOTO ENDIT



! All errors will be caught below.

%ERR::		! Compile/run error, no 'IF ()'.
@GOTO TRUBLE

%TERR::		! Time limit exceeded.
@GOTO TRUBLE

TRUBLE::	! Generic error processing.
@DEFINE INTERN-TRUBLE: DSK:
@TYPE DBMS20-ERROR.TXT
! Delete modifiable link-time libraries (may have been nodified).
@NOERROR
@DELETE COBLIB.REL,LIBOL.REL,C74LIB.REL,FORLIB.REL
! Restore any backup copies of products.
@RENAME *.OLD-DBMS20-REL *.REL
@RENAME *.OLD-DBMS20-EXE *.EXE
! Delete unusable integration .CMD.
@DELETE DBMS20-INTEGRATION.CMD
@EXPUNGE
@GOTO ENDIT
ENDIT::
! Everyone exits through here.
@ERROR %
! send the right message.
@COPY DBMS20-RESULTS.TXT DBMS20.MAIL
@INFO DISK INTERN-TRUBLE:
@IF (NOERROR) @COPY DBMS20-ERROR.TXT DBMS20.MAIL
! Try to send it the right way.
@INFO DISK INTERN-MAILOK:
@IF (ERROR) @GOTO OLDWAY	! (sigh)
@MAIL
*.
*
*DBMS20.CTL
*@DBMS20.MAIL
@IF (NOERROR) @GOTO BUGOUT
!
OLDWAY::
@INFO DISK INTERN-TRUBLE:
@IF (NOERROR) @GOTO OLDTRB
@PLEASE  -  DBMS20.CTL finished. See DBMS20.MAIL for details.  -  
@GOTO BUGOUT
OLDTRB::
@PLEASE  -  ERROR in DBMS20.CTL. See DBMS20.MAIL for details.  -  
@GOTO BUGOUT
!
BUGOUT::
@NOERROR
@DELETE DBMS20-*.TXT
@LOGOUT


%FIN::		! Internal errors (bad batch cmd, etc.)
@DEFINE INTERN-TRUBLE: DSK:
@COPY TTY: DBMS20-ERROR.TXT
@ Internal error in DBMS20.CTL, encountered label %FIN, job aborted.
@
@BACKTO ENDIT


! **********************************************************************
!	End of DBMS20.CTL
! **********************************************************************