Google
 

Trailing-Edge - PDP-10 Archives - bb-l014t-bm_tops20_v7_0_atpch20 - autopatch/db2v61.ctl
There are 4 other files named db2v61.ctl in the archive. Click here to see a list.
! 06-Mar-86 HAH Modified to reflect 12C of COBOL
! 14-Aug-86 HAH for PAM Fix error trapping for /TAG:MAINT
! 18-Jun-87 HAH for PAM Insert another error trap
! 18-Jun-87 HAH Reflect V11 of FORTRAN
! 04-May-88 HAH Add branch for no update - requires PEP 1B(173)
! 
! 
! 
! **********************************************************************
! 
!                         DB2V61.CTL Version 6.1
! 
!                           Copyright (C) 1984, 1988
! 
!              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-74        V.12C
!                 COBOL-20        V.13
!                 FORTRAN         V.11
! 
! This stream requires about 4000  blocks  of  disk  storage,  and  will
! execute in under five minutes (KL CPU time).  To execute:
! 
!         @SUBMIT DB2V61/TIME:0:5:0 [ /TAG: { INSTAL } ]
!                                           { PATCH  }
!                                           { MAINT  }
!					    { AUTOPA }
! 
! 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 four  major functions, and  contains  four
! 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.
!
!	o  Autopatch    and    rebuild    the   DBMS-20   software 
!	(/TAG:AUTOPA). Autopatch patches will be applied, and then
!	processing   will   continue   along   the path  taken  by
!	(/TAG:PATCH).
!
!				 NOTE
!
!		The default entry point for this control
!		file changes  from INSTAL  to  AUTOPA if
!		the following  files  are  available  in
!		the connected directory:
!
!			      PEPCKP.PDB
!			      PEP201.PDF
! 
!		However,  the  INSTAL   option   without
!		Autopatching  can  always  be  forced by 
!		specifying '/TAG:INSTAL'.
!
!
! 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-FORTRAN11: DSK:'
! 
! The ONLY logical definitions during the execution  of  this  procedure
! will be those defined in the control file, and any found in SETUP.CMD.
! The internally  defined  logical  names  (see 'Notes  on Control  File
! Design' below) should NOT be used 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
! *** COBOL V.12C 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-74 V.12C support
!         C74SHR.REL      C74LIB.REL
! *** for COBOL V.13 support
!         C8XSHR.REL      COBLIB.REL
! *** for FORTRAN V.11 support
!         FORLIB.REL      FORDBM.REL
! 
! **********************************************************************
! 
!                             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)
!	  PEPCKP.PDB	  PEP201.PDF
!	  (If available, the default entry point for this control file
!	    switches from INSTAL to AUTOPA.)
! 
! **********************************************************************
! 
!                              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-74 V.12C 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.11 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.
! 
! **********************************************************************
!
!                      Notes on control file design
!		       ----------------------------
! 
!      1.  The entry points are critical to establishing the environment
!          under  which  this  control  file runs.  No attempt should be
!          made to defeat them by placing commands (batch or  otherwise)
!          prior to them (exceptions:  SILENCE and REVIVE).
! 
!      2.  Flow control is established  by  the  definition  of  logical
!          names.   All logical names created solely within this control
!          file are prefixed with 'INTERN-';   logical  names  that  may
!          come  from  the  optional  file  SETUP.CMD  are prefixed with
!          'DBMS20-'.  Note that even if SETUP.CMD is not provided, some
!          'DBMS20-'  definitions will be set up internally to establish
!          default action;  however, the definitions from SETUP.CMD take
!          precedence.   Also note that logical names establised outside
!          this  control  file  or  SETUP.CMD  (for  example,   by   the
!          submitter's BATCH.CMD or LOGIN.CMD) are cancelled.
! 
!      3.  The established method to determine if a flow-control logical
!          name is defined is to execute the command
! 
!                        @INFO DISK logical-name:
! 
!          This implies that all flow-control logical names are  equated
!          with DSK:.
!
!      4.  The only checkpoints  in this  control  file are at the entry
!	   points. This is  done so that a  restart will follow the path
!	   originally  specified  in the  SUBMIT command. A restart must
!	   utilize  one  of  the entry  checkpoints  to insure  that the
!	   proper environment of  job control  logical names is  set up;
!	   therefore, additional checkpoints are not allowed.   	
! 
! 
! Internally defined logical names:
! 
! INTERN-ANYOTS:  - at least one of the host hanguage OTS is going to be
!           rebuilt.   Defined  in  CKLANG::,  after determining that at
!           least one of the requested languages has sufficient  sources
!           to be rebuilt.
! INTERN-AUTOPA:   -  the  job  was  submitted  with   /TAG:AUTOPA   (or
!           /TAG:INSTAL in a suitable Autopatch environment).
! INTERN-FORDML:  - FORDML will be rebuilt (INSTAL, PATCH or AUTOPA mode
!           and   FORTRAN   is   being  supported,  or  MAINT  mode  and
!           DBMS20-UTILS:  was defined).
! INTERN-INSTAL:  - the job was submitted with /TAG:INSTAL (or  with  no
!           tag,   as   installation   is   the   default  action)  (see
!           INTERN-AUTOPA:).
! INTERN-LIBSRC:  - equated with DBMS20-LIBSRC:  if  that  logical  name
!           was  established  in  SETUP.CMD;  otherwise defined as DSK:.
!           INTERN-LIBSRC:  is the seach list used to find  the  DBMS-20
!           libraries when rebuilding.
! INTERN-MAINT:  - the job as submitted with /TAG:MAINT.
! INTERN-NEW13LIB:  - a new version of COBLIB.REL for COBOL-20 V.13  was
!           created.
! INTERN-NEW74LIB:  - a new version of C74LIB.REL for COBOL-74 V.12C was
!           created.
! INTERN-NEWFORLIB:  - a new version of FORLIB.REL  for  FORTRAN-20  V.11
!           was created.
! INTERN-PATCH:  - the job was submitted with /TAG:PATCH.
! INTERN-TRUBLE:  - the job know that something has gone wrong.  Usually
!           set  in TRUBLE::, and determines which messages to broadcast
!           in ENDIT::.  Exception:  set in SORCES::  when files are  in
!           unknown  state,  so  that we can go directly to ENDIT::  and
!           avoid the cleanup in TRUBLE::
! INTVER:  - defined as DSK:  if the file  DB2V61.VER  exists  on  DSK:;
!           otherwise,  defined as null.  DB2V61.VER is a MAKLIB command
!           file used to control the version/edit numbers of the rebuilt
!           utilities.   INTVER:  must be held to six characters to meet
!           the restrictions of MAKLIB.
!
! **********************************************************************
! 
! 
@REVIVE
! Entry points


! [1204] Check for the presence of PEPCKP.PDB, and PEP201.PDF. Their
! presence indicates that the installation process includes automatic
! Autopatching. Thus, in the right environment, the default entry point
! switches from INSTAL:: to AUTOPA:: (so Autopatch runs don't have to
! submit with a switch).
@ERROR %			![1204]
@DIR PEPCKP.PDB,PEP201.PDF	![1204]
@IF (NOERROR) @GOTO AUTOPA	![1204]


INSTAL::	! The default, for customer installation.
@CHKPNT INSTAL
@DEFINE *
@
@DEFINE INTERN-INSTAL: DSK:
@COPY TTY: DBMS20-RESULTS.TXT
@ DB2V61.CTL 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
@ DB2V61.CTL 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
@ DB2V61.CTL finished (started from tag 'MAINT'). Files created:
@
@GOTO ENDEP


! [1204] (the entire AUTOPA entry point)
AUTOPA::	! For Autopatch rebuilds
@CHKPNT AUTOPA
@DEFINE *
@
@DEFINE INTERN-AUTOPA: DSK:
@COPY TTY: DBMS20-RESULTS.TXT
@ DB2V61.CTL finished (started from tag 'AUTOPA'). Files created:
@
@GOTO ENDEP


ENDEP::		! End of valid entry points.
![1204] (the entire FIRST section)
FIRST::
! This stuff absolutely positively has to get done first thing after
! the entry points, or things like error handling and message processing
! will not work.
! Initialize the error message file.
@COPY TTY: DBMS20-ERROR.TXT
@Fatal error in DB2V61.CTL, after last tag listed below. Job aborting!
@FIRST::
@ERROR %
! Check if OK to send mail.
@DIR SYS:MAIL.EXE,SYS:RDMAIL.EXE
@IF (NOERROR) @DEFINE INTERN-MAILOK: DSK:
! 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
@
CLIMAT::	! Set up execution environment.
@APPEND TTY: DBMS20-ERROR.TXT
@, CLIMAT::
@INFO DISK	! Internal statistics.

! Get site-specific definitions (if any).
@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 DB2V61.VER
@IF (ERROR) @DEFINE INTVER: NUL:

! Now do the entry-point-specific stuff.
! If INSTAL, don't do utilities, except XDML (may be affected
! by installation-time options.
@ERROR %
@INFO DISK INTERN-INSTAL:
@IF (ERROR) @GOTO NEXT
@ERROR
@DEFINE DBMS20-UTILS:
@DEFINE DBMS20-XDML: DSK:
NEXT::

![1204] If PATCH or AUTOPA, force the utilities.
@ERROR %
@INFO DISK INTERN-PATCH:
@IF (NOERROR) @DEFINE DBMS20-UTILS: DSK:
@INFO DISK INTERN-AUTOPA:			![1204]
@IF (NOERROR) @DEFINE DBMS20-UTILS: DSK:	![1204]

! If MAINT, use only the selection from SETUP.CMD.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO NEXT
! Otherwise, try for all host language options.
@ERROR
@DEFINE DBMS20-COBOL13: DSK:
@DEFINE DBMS20-COBOL68: DSK:
@DEFINE DBMS20-COBOL74: DSK:
@DEFINE DBMS20-FORTRAN11: DSK:
NEXT::

! Create proper search path for language-specific files.
@ERROR %
@DEFINE INTERN-LIBSRC: DSK:	! Assume files on DSK: (or ASL: for AUTOPA)
@INFO DISK DBMS20-LIBSRC:	!   unless DBMS20-LIBSRC: defined
@IF (NOERROR) @DEFINE INTERN-LIBSRC: DBMS20-LIBSRC:

! Document the resulting environment.
@INFO LOGICAL JOB
! End of environment setup (almost - DSK: and SYS: are affected by AUTOPA::)
![1204] (the entire AUTO section)
AUTO::		! Autopatch environment initialization and patching
@APPEND TTY: DBMS20-ERROR.TXT
@, AUTO::
! See if we should be here...
@ERROR %
@INFO DISK INTERN-AUTOPA:
@IF (ERROR) @GOTO NOAUTO
@ERROR
@PEPB
*INITIALIZE DBMS-V6-1
*EXIT
@DEFINE SYS: ASL:
@DEFINE DSK: ASL:

@INFO LOGICAL JOB	! Document the environment as changed for Autopatch

@ERROR %
@TYPE DB2V61.MKL	! Document the patching file
@IF (ERROR) @GOTO NOUPD

@RU MAKLIB		! now actually apply the patches
*@DB2V61.MKL
NOUPD::
@ERROR
@EXPUNGE PAT:
NOAUTO::
! End of Autopatch environment initialization and patching section
CKLANG::	! Check which languages to support
@APPEND TTY: DBMS20-ERROR.TXT
@, CKLANG::
! Determine which languages to rebuild. Enter with some requests on, turn
!   off if files not available (except in MAINT mode, in which case the
!   selected languages were specifically requested, so a fatal error occurs
!   if the required files are 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-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-11
@ERROR %
@INFO DISK DBMS20-FORTRAN11:	! Skip if request not on
@IF (ERROR) @GOTO NEXT
@VDIR INTERN-LIBSRC:FORLIB.REL, INTERN-LIBSRC:FORDBM.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-FORTRAN11:		! 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-FORTRAN11:
@IF (ERROR) @GOTO NOOTS
ANYOTS::
! Flag request for some language support.
@DEFINE INTERN-ANYOTS: DSK:
NOOTS::
! Finally, special-case FORDML. Request if INSTAL/PATCH/AUTOPA and building for
!   FORTRAN, or MAINT and UTILS requested.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO CKUTIL
! If not MAINT, must be INSTAL/PATCH/AUTOPA
@INFO DISK DBMS20-FORTRAN11:
@IF (ERROR) @GOTO NOFDML
@GOTO DOFDML			! (INSTAL/PATCH and FORTRAN11)
CKUTIL::
@INFO DISK DBMS20-UTILS:
@IF (ERROR) @GOTO NOFDML	! (If no error, MAINT and UTILS)
DOFDML::
@DEFINE INTERN-FORDML: DSK:	! Request FORDML
NOFDML::
! End of language support checking section
SORCES::	! Check required sources
@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 through TRUBLE::, because we want to
! leave things the way they are, but define INTERN-TRUBLE: so we know to send an
! error message in ENDIT::.
@DEFINE INTERN-TRUBLE: DSK:
@COPY TTY: DBMS20-ERROR.TXT
@ DB2V61.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      C74LIB.REL      FORLIB.REL
@   (COBOL-20 V.13) (COBOL-74 V.12C) (FORTRAN V.11)
@
@GOTO ENDIT

NEXT::					![1204]
![1204] In AUTOPA mode, check for the mandatory Autopatch files.
@ERROR %				![1204]
@INFO DISK INTERN-AUTOPA:		![1204]
@IF (ERROR) @GOTO NEXT			![1204]
@VDIR PEPCKP.PDB, PEP201.PDF		![1204]

NEXT::
! Check the origin of common source files. Skip this in MAINT or AUTOPA mode.
@ERROR %
@INFO DISK INTERN-MAINT:		![1204]
@IF (NOERROR) @GOTO SKPSRC
@INFO DISK INTERN-AUTOPA:		![1204]
@IF (NOERROR) @GOTO SKPSRC		![1204]
!
@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 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,
@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::
! End of source checking section
DBOTS::		! Build DBMS-20 support into the host languages
@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.REL.
@INFO DISK DBMS20-FORTRAN11:
@IF (ERROR) @GOTO NOFDBM
! Get fresh file from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:FORDBM.REL
@MAKLIB
*DBMS=DBMS/MASTER:DBPORT,FORDBM.REL/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.
@INFO DISK INTERN-NEW13LIB:
@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.
CBL74::
@APPEND TTY: DBMS20-ERROR.TXT
@, CBL74::
!	**********    COBOL-74 (V.12C)    **********
! 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.12C 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.12C:     C74O12.EXE
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY C74O12.EXE DBMS20-INTEGRATION:
@
! Also note new library if created.
@INFO DISK INTERN-NEW74LIB:
@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.
FORT11::
@APPEND TTY: DBMS20-ERROR.TXT
@, FORT11::
!	**********     DBMSF (FORTRAN V.11)     **********
! See if we should be here...
@ERROR %
@INFO DISK DBMS20-FORTRAN11:
@IF (ERROR) @GOTO NOFV11
! Get fresh files from DBMS20-LIBSRC: if defined.
@INFO DISK DBMS20-LIBSRC:
@IF (NOERROR) @COPY DBMS20-LIBSRC:FORLIB.REL
! Save old copy if around.
@NOERROR
! DBMSF.REL is a copy of DBMS.REL, to fulfill the link-time requirements
!   of FORLIB.REL V.11.
@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.11:        DBMSF.EXE   DBMSF.REL
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY DBMSF.EXE,DBMSF.REL DBMS20-INTEGRATION:
@
! Also note new library if created.
@INFO DISK INTERN-NEWFORLIB:
@IF (ERROR) @GOTO NOFV11
@APPEND TTY: DBMS20-RESULTS.TXT
@			    FORLIB.REL (altered for DBMS-20 V.6.1)
@
@APPEND TTY: DBMS20-INTEGRATION.CMD
@COPY FORLIB.REL DBMS20-INTEGRATION:
@
NOFV11::
@EXPUNGE
! End of FORTRAN V.11 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 %
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO NOVER
!
@INFO DISK DBMS20-COBOL13:
@IF (NOERROR) @GOTO VEROK
@INFO DISK DBMS20-COBOL68:
@IF (NOERROR) @GOTO VEROK
@INFO DISK DBMS20-COBOL74:
@IF (NOERROR) @GOTO VEROK
@INFO DISK DBMS20-FORTRAN11:
@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:DB2V61.VER
*@SCHEMA.CMD
!
! FORDML
@LINK
*@INTVER:DB2V61.VER
*@FORDML.CMD
!
! DBMEND
@LINK
*@INTVER:DB2V61.VER
*@DBMEND.CMD
!
! DBINFO
@LINK
*@INTVER:DB2V61.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:DB2V61.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
@
![1204] Auto-integration not done in MAINT or AUTOPA mode.
@INFO DISK INTERN-MAINT:
@IF (NOERROR) @GOTO INTEND
@INFO DISK INTERN-AUTOPA:		![1204]
@IF (NOERROR) @GOTO INTEND		![1204]
! 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, C74LIB.REL, DBMS.REL, DBMSF.REL,
@CHECK SEQ
@
@VDIR COBOTS-V13.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. This is reached by any unexpected batch error
! or by 'GOTO TRUBLE'. Signal that an error occurred and clean up.
@DEFINE INTERN-TRUBLE: DSK:	! Signal error mode for ENDIT
@TYPE DBMS20-ERROR.TXT		! Record the error message
! Delete any modified copies of language-specific libraries.
@ERROR %
@INFO DISK INTERN-NEW13LIB:
@IF (NOERROR) @DELETE COBLIB.REL
@INFO DISK INTERN-NEW74LIB:
@IF (NOERROR) @DELETE C74LIB.REL
@INFO DISK INTERN-NEWFORLIB:
@IF (NOERROR) @DELETE FORLIB.REL
! Restore any backup copies of products and libraries.
@NOERROR
@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. Select and broadcast the proper messages in the
! best manner and get out.
@ERROR %
! Send the right messages.
@INFO DISK INTERN-TRUBLE:		![1204] If there were any errors
@IF (NOERROR) @GOTO ENDBAD		![1204]   select the error messages

@COPY DBMS20-RESULTS.TXT DBMS20.MAIL	![1204] Form the 'good' mail message
@INFO DISK INTERN-AUTOPA:		![1204] Also inform Autopatch
@IF (ERROR) @GOTO ENDALL		![PAM]
@DEFINE SYS:				![PAM]
@PEPB					![PAM][1204]   if necessary
*SIGNAL-SUCCESS DBMS-V6-1		![1204]   of success
*EXIT					![1204]
@GOTO ENDALL				![1204]

ENDBAD::				![1204]
@COPY DBMS20-ERROR.TXT DBMS20.MAIL	![1204] Form the 'bad mail message
@INFO DISK INTERN-AUTOPA:		![1204] Also inform Autopatch
@IF (ERROR) @GOTO ENDALL		![PAM]
@DEFINE SYS:
@PEPB					![PAM][1204]   if necessary
*SIGNAL-FAILURE DBMS-V6-1		![1204]   of failure
*EXIT					![1204]

ENDALL::				![1204]
! Try to send mail message the right way.
@INFO DISK INTERN-MAILOK:
@IF (ERROR) @GOTO OLDWAY		! (sigh) must use PLEASE messages
@MAIL
*.
*
*DB2V61.CTL
*@DBMS20.MAIL
@IF (NOERROR) @GOTO BUGOUT

OLDWAY::
@INFO DISK INTERN-TRUBLE:
@IF (NOERROR) @GOTO OLDTRB
@PLEASE  -  DB2V61.CTL finished. See DBMS20.MAIL for details.  -  
@GOTO BUGOUT
OLDTRB::
@PLEASE  -  ERROR in DB2V61.CTL. See DBMS20.MAIL for details.  -  
@GOTO BUGOUT

BUGOUT::
@NOERROR
@DELETE DBMS20-*.TXT
@GOTO LOGOUT

! collect any errors in ENDIT here, to aviod loops caused by %FIN below
%ERR::@GOTO LOGOUT

LOGOUT::
@LOGOUT


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


! **********************************************************************
!	End of DB2V61.CTL
! **********************************************************************