Google
 

Trailing-Edge - PDP-10 Archives - AP-D489C-SB - sort.ctl
There are 19 other files named sort.ctl in the archive. Click here to see a list.
!SORT.CTL	VERSION 4
!USED TO MAKE COBOL, FORTRAN AND STAND-ALONE SORT
!THIS FILE RUNS ON EITHER TOPS-20 OR TOPS-10
!SUBMIT WITH COMMAND	SUBMIT SORT/TIME:20:00
!
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1978 BY DIGITAL EQUIPMENT CORPORATION
!
!IF ANY NON-STANDARD ASSEMBLY SWITCHES ARE DESIRED THEY SHOULD BE
!	INSERTED IN SRTPRM.MAC
!
!IF LISTINGS ARE DESIRED, THE EMPTY FILE
!LISTEM.MAC SHOULD BE IN DSK:.
!
!THIS CONTROL FILE CREATES:
!	STAND-ALONE SORT ALWAYS,
!	COBOL SORT IF LIBOL.REL IS PRESENT, AND
!	FORTRAN SORT IF FORLIB.REL IS PRESENT.
!
!TO CREATE JUST THE COBOL SORT, SUBMIT SORT.CTL WITH '/TAG:COBOL'.
!TO CREATE JUST THE FORTRAN SORT, SUBMIT SORT.CTL WITH '/TAG:FORTRA'.
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
!REQUIRED FILES:
!<FIELD-IMAGE>	MACRO.EXE
!		MAKLIB.EXE
!		CREF.EXE
!		LINK.EXE
!		MONSYM.UNV
!		MACTEN.UNV
!		MACSYM.UNV
!
!<SELF>		PA1050.EXE		!RELEASE 3 VERSION
!
!<SELF>		SORT.CTL
!
!	SORT SOURCES AND DOCUMENTATION
!		SORT.MAC	SRTPRM.MAC	SRTSTA.MAC
!		SRTCMD.MAC	SRTJSS.MAC	SRTCMP.MAC
!		SRTCBL.MAC	SRTCER.MAC
!		FORSRT.MAC
!		SORT.HLP	SORT.DOC
!
!	COBOL & LIBOL FILES FROM VERSION 12 RELEASE
!		LIBOL.REL
!		LIBSHR.REL
!		FTDEFS.UNV
!
!	FORTRAN FILES
!		FORLIB.REL
!
@GOTO SORT
SORT::
!MAKE A RECORD OF WHAT IS BEING USED
!
@GET SYS:MACRO
@INFO VERSION
@GET SYS:MAKLIB
@INFO VERSION
@GET SYS:LINK
@INFO VERSION
@GET SYS:CREF
@INFO VERSION
@GET DSK:PA1050
@INFO VERSION
!
!GET CHECKSUMS SO WE KNOW WHAT WE HAVE
!
@VD SYS:MACRO.EXE,SYS:MAKLIB.EXE,SYS:LINK.EXE,SYS:CREF.EXE,UNV:MACTEN.UNV,UNV:MACSYM.UNV,UNV:MONSYM.UNV,DSK:PA1050.EXE,
@CHECK SEQ
@
!
@VD SORT.*,SRT*.*,LIBOL.REL,LIBSHR.REL,FTDEFS.UNV,
@CHECK SEQ
@
!
!  CREATE STAND-ALONE SORT.
!
@ERROR %
@DIR LISTEM.MAC
@IF (ERROR) @GOTO NOLIST	!CREF NOT WANTED
!
@ERROR
@MACRO
*SORT,SORT/C=SRTPRM,SRTSTA,SRTCMD,SRTJSS,SRTCER,SRTCMP,SORT
@IF (ERROR) @GOTO TRUBLE
!
@CREF
*DSK:SORT.LZT=SORT
@IF (ERROR) @GOTO TRUBLE
@GOTO DONCRF
!
NOLIST::
@ERROR
@MACRO
*SORT=SRTPRM,SRTSTA,SRTCMD,SRTJSS,SRTCER,SRTCMP,SORT
@IF (ERROR) @GOTO TRUBLE
!
DONCRF::
@LINK
*SORT.MAP/MAP=SORT,/SYMSEG:HIGH/GO
@IF (ERROR) @GOTO TRUBLE
@INFO MEM
@EXAMINE 0
@IF (ERROR) @GOTO REL2
@EXAMINE 600000
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
@GOTO SAVIT
!
REL2::
@600000/
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
!
SAVIT::
!
!NOW SAVE IT. NOTE WE MUST GET RID OF PAGE 400 (A LINK BUG)
!
@SAVE DSK:SORT 0 377,600 677
@IF (ERROR) @GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
@DELETE SORT.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
@GOTO LIBOL
TRUBLE::@PLEASE -- STAND-ALONE SORT CREATION UNSUCCESSFUL
@GOTO FAIL
TOPS10::
!REQUIRED FILES:
!DEC:		PIP.EXE		(LATEST RELEASED VERSIONS)
!		TECO.EXE
!		MACRO.EXE
!		MAKLIB.EXE
!		DIRECT.EXE
!		CREF.EXE
!		COMPIL.EXE
!		LINK.EXE+LNK???.EXE
!		HELPER.REL
!		SCAN.REL
!		MACTEN.UNV
!		MACSYM.UNV
!		UUOSYN.UNV
!		SCNMAC.UNV
!
![SELF]		SORT.CTL
!
!	SORT SOURCES AND DOCUMENTATION
!		SORT.MAC	SRTPRM.MAC	SRTSTA.MAC
!		SRTUUO.MAC	SRTSCN.MAC	SRTCMP.MAC
!		SRTCBL.MAC	SRTCER.MAC
!		SRTFOR.MAC
!		SORT.HLP	SORT.DOC
!
!	COBOL & LIBOL FILES FROM VERSION 12 RELEASE
!		LIBOL.REL
!		FTDEFS.UNV
!
!	FORTRAN FILES
!		FORLIB.REL
!
.GOTO SORT
SORT::
!MAKE A RECORD OF WHAT IS BEING USED
.SET WATCH VERSION
.RUN DEC:DIRECT
*TTY:/CHECKSUM=DEC:PIP+MACRO+MAKLIB+DIRECT+CREF+LINK+LNK???+TECO
*TTY:/CHECKSUM=DEC:HELPER.REL+SCAN.REL+MACTEN.UNV+MACSYM.UNV+UUOSYM.UNV+SCNMAC.UNV
*TTY:/CHECKSUM=SORT.*+SRT???.*
*TTY:/CHECKSUM=LIBOL.REL+FORLIB.REL+FTDEFS.UNV
!
;
!  CREATE STAND-ALONE SORT.
!
.ERROR %
.DIR LISTEM.MAC
.IF (ERROR) .GOTO NOLIST	!CREF NOT WANTED
!
.ERROR
.RUN DEC:MACRO
*SORT,SORT/C=SRTPRM,SRTSTA,SRTSCN,SRTUUO,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
.RUN DEC:CREF
*DSK:SORT.LZT=SORT
.IF (ERROR) .GOTO TRUBLE
.GOTO DONCRF
!
NOLIST::
.ERROR
.RUN DEC:MACRO
*SORT=SRTPRM,SRTSTA,SRTSCN,SRTUUO,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
DONCRF::
.RUN DEC:LINK
*LPT:SORT.MAP/MAP:END=-
*DEC:HELPER,-
*DEC:SCAN/SEGMENT:LOW/INCLUDE:(.VERBO,.TOUTS,.SAVE),-
*DEC:SCAN/EXCLUDE:(.VERBO,.TOUTS,.SAVE,$SCNDC),-
*DSK:SORT/GO
.IF (ERROR) .GOTO TRUBLE
.SSAVE SORT
.IF (ERROR) .GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
.DELETE SORT.REL
.IF (ERROR)!
!
.GOTO LIBOL
TRUBLE::.PLEASE -- STAND-ALONE SORT CREATION UNSUCCESSFUL.^[
.GOTO FAIL
LIBOL::	!  NOW FOR LIBOL CHANGES.
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
!  TEST TO SEE IF COBOL SORT REQUIRED.
!
@ERROR %
@DIR LIBOL.REL
@IF (ERROR) @GOTO FORLIB !NOT REQUIRED
@ERROR
@DEF DEC: DSK:,CBL20:<EXE>,DEC:
!
!  ASSEMBLE SOURCES
!
@ERROR %
@DIR LISTEM.MAC
@IF (ERROR) @GOTO NOLIST	!CREF NOT WANTED
!
@ERROR
@MACRO
*SRTCBL,SRTCBL/C=SRTPRM,SRTCBL,SRTCER,SRTJSS,SORT
@IF (ERROR) @GOTO TRUBLE
!
!  CREATE LISTINGS.
!
@CREF
*DSK:SRTCBL.LZT=SRTCBL
@IF (ERROR) @GOTO TRUBLE
@GOTO DONCRF
!
NOLIST::
@ERROR
@MACRO
*SRTCBL=SRTPRM,SRTCBL,SRTCER,SRTJSS,SORT
@IF (ERROR) @GOTO TRUBLE
!
DONCRF::
!  PLACE INTO LIBOL.REL.
!
@MAKLIB
*LIBOL=LIBOL/MASTER:SORT,SRTCBL/REPLACE:SORT
@IF (ERROR) @GOTO TRUBLE
!
!  INDEX LIBOL.REL.
!
!@MAKLIB
!*LIBOL=LIBOL/INDEX
!@IF (ERROR) @GOTO TRUBLE
!
!CREATE LIBO12.EXE
!
@LINK
*LIBOL.MAP/MAP=/NOLOCAL LIBSHR,LIBOL/SEARCH,/SYMSEG:HIGH/GO
@IF (ERROR) @GOTO TRUBLE
@INFO MEM
@EXAMINE 0
@IF (ERROR) @GOTO REL2
@EXAMINE 600000
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
@GOTO SAVIT
!
REL2::
@600000/
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
!
SAVIT::
!
!NOW SAVE IT. NOTE WE MUST GET RID OF PAGE 400 (A LINK BUG)
!BUT SAVE PAGE 0 AS IT MAKES IT EASIER TO PATCH
!
@SAVE DSK:LIBO12 0 1,600 677
@IF (ERROR) @GOTO TRUBLE
!
!
!  DELETE UNNEEDED FILES.
!
@DELETE SRTCBL.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
@GOTO FORLIB
TRUBLE::@PLEASE -- COBOL SORT CREATION UNSUCCESSFUL!!!
@GOTO FAIL
TOPS10::
!  TEST TO SEE IF COBOL SORT REQUIRED.
!
.ERROR %
.DIRECT LIBOL.REL
.IF (ERROR) .GOTO FORLIB !NOT REQUIRED
.ERROR
!
!  ASSEMBLE SOURCES WITH LISTINGS.
!
.ERROR %
.DIR LISTEM.MAC
.IF (ERROR) .GOTO NOLIST	!CREF NOT WANTED
!
.ERROR
.RUN DEC:MACRO
*SRTCBL,SRTCBL/C=SRTPRM,SRTCBL,SRTCER,SRTUUO,SORT
.IF (ERROR) .GOTO TRUBLE
!
!  CREATE LISTINGS.
!
.RUN DEC:CREF
*DSK:SRTCBL.LZT=SRTCBL
.IF (ERROR) .GOTO TRUBLE
.GOTO DONCRF
!
NOLIST::
.ERROR
.RUN DEC:MACRO
*SRTCBL=SRTPRM,SRTCBL,SRTCER,SRTUUO,SORT
.IF (ERROR) .GOTO TRUBLE
!
DONCRF::
.ERROR
!  PLACE INTO LIBOL.REL.
!  SEE IF WE HAVE ORIGINAL LIBOL OR A SORT MODIFIED ONE.
!
.RUN DEC:MAKLIB
*SRTFOO=LIBOL/EXTRACT:SORT
.IF (NOERROR) .GOTO REPLAC
!
!  WE MUST REPLACE OLD CSORT WITH SORT.
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/MASTER:CSORT,SRTCBL/REPLACE:SORT
.IF (ERROR) .GOTO TRUBLE
.GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/MASTER:SORT,SRTCBL/REPLACE:SORT
.DELETE SRTFOO.REL
.IF (ERROR)!
.GOTO INDEX
!
INDEX::
!
!  INDEX LIBOL.REL
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/INDEX
.IF (ERROR) .GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
.DELETE SRTCBL.REL
.IF (ERROR)!
!
.GOTO FORLIB
TRUBLE::.PLEASE -- COBOL SORT CREATION UNSUCCESSFUL.^[
.GOTO FAIL
FORLIB::	!  NOW FOR FORLIB CHANGES.
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
!  TEST TO SEE IF FORTRAN SORT REQUIRED.
!
@ERROR %
@DIR FORLIB.REL
@IF (ERROR) @GOTO FINISH !NOT REQUIRED
@ERROR
!
!  ASSEMBLE SOURCES
!
@ERROR %
@DIR LISTEM.MAC
@IF (ERROR) @GOTO NOLIST	!CREF NOT WANTED
!
@ERROR
@MACRO
FORSRT,FORSRT/C=FORSRT
@IF (ERROR) @GOTO TRUBLE
!
!  CREATE LISTINGS.
!
@CREF
*DSK:FORSRT.LZT=FORSRT
@IF (ERROR) @GOTO TRUBLE
@GOTO DONCRF
!
NOLIST::
@ERROR
@MACRO
FORSRT=FORSRT
@IF (ERROR) @GOTO TRUBLE
!
DONCRF::
!  PLACE INTO FORLIB.REL.
!  SEE IF WE HAVE ORIGINAL FORLIB OR A SORT MODIFIED ONE.
!
@MAKLIB
*SRTFOO=FORLIB/EXTRACT:SORT
@IF (NOERROR) @GOTO REPLAC
!
!  ORIGINAL FORLIB--PUT SORT AT THE END.
!
@MAKLIB
*FORLIB=FORLIB,FORSRT/APPEND
@IF (ERROR) @GOTO TRUBLE
@GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
@MAKLIB
*FORLIB=FORLIB/MASTER:SORT,FORSRT/REPLACE:SORT
@DELETE SRTFOO.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
INDEX::
!
!  INDEX FORLIB.REL.
!
@MAKLIB
*FORLIB=FORLIB/INDEX
@IF (ERROR) @GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
@DELETE FORSRT.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
@GOTO FINISH
TRUBLE:@PLEASE -- FORTRAN SORT CREATION UNSUCCESSFUL!!!
@GOTO FAIL
TOPS10::
!  TEST TO SEE IF FORTRAN SORT REQUIRED.
!
.ERROR %
.DIRECT FORLIB.REL
.IF (ERROR) .GOTO FINISH	!NOT REQUIRED
.ERROR
!
!  ASSEMBLE SOURCES
!
.ERROR %
.DIR LISTEM.MAC
.IF (ERROR) .GOTO NOLIST	!CREF NOT WANTED
!
.ERROR
.RUN DEC:MACRO
*SRTFOR,SRTFOR/C=SRTPRM,SRTFOR,SRTSTA,SRTSCN,SRTUUO,SRTCER,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
!  CREATE LISTINGS.
!
.RUN DEC:CREF
*DSK:SRTFOR.LZT=SRTFOR
.IF (ERROR) .GOTO TRUBLE
.GOTO DONCRF
!
NOLIST::
.ERROR
.RUN DEC:MACRO
*SRTFOR=SRTPRM,SRTFOR,SRTSTA,SRTSCN,SRTUUO,SRTCER,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
DONCRF::
!  PLACE INTO FORLIB.REL.
!  SEE IF WE HAVE ORIGINAL FORLIB OR A SORT MODIFIED ONE.
!
.RUN DEC:MAKLIB
*SRTFOO=FORLIB/EXTRACT:SORT
.IF (NOERROR) .GOTO REPLAC
!
!  ORIGINAL FORLIB--PUT SORT AT THE END.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB,SRTFOR/APPEND
.IF (ERROR) .GOTO TRUBLE
.GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB/MASTER:SORT,SRTFOR/REPLACE:SORT
.DELETE SRTFOO.REL
.IF (ERROR)!
!
INDEX::
!
!  INDEX FORLIB.REL.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB/INDEX
.IF (ERROR) .GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
.DELETE SRTFOR.REL
.IF (ERROR)!
!
.GOTO FINISH
TRUBLE::.PLEASE -- FORTRAN SORT CREATION UNSUCCESSFUL.^[
.GOTO FAIL
COBOL::	!  HERE FOR COBOL SORT ONLY.
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
!
!  THIS IS FOR IN-HOUSE USE ONLY:
!
@SET SPOOLED-OUTPUT (TO) IMMEDIATE
@DEFINE DEC: DSK:,CBL20:<EXE>,DEC:
!
!  END OF IN-HOUSE USE ONLY SETUP.
!
!  MAKE A RECORD OF WHAT IS BEING USED.
!
@GET DEC:MACRO
@INFO VERSION
@GET DEC:MAKLIB
@INFO VERSION
@GET DEC:CREF
@INFO VERSION
@GET DSK:PA1050
@INFO VERSION
!
@VD DEC:MACRO.EXE,DEC:MAKLIB.EXE,DEC:LINK.EXE,DEC:CREF.EXE,SYS,UNV:MACTEN.UNV,UNV:MACSYM.UNV,UNV:MONSYM.UNV,DSK:PA1050.EXE,
@CHECK SEQ
@
!
@VD SORT.*,SRT*.*,LIBOL.REL,LIBSHR.REL,,FTDEFS.UNV,
@CHECK SEQ
@
!
!  TEST TO SEE IF COBOL SORT REQUIRED.
!
@ERROR %
@DIR LIBOL.REL
@IF (ERROR) @GOTO FINISH !NOT REQUIRED
@ERROR
!
!  ASSEMBLE SOURCES 
!
@ERROR %
@DIR LISTEM.MAC
@IF (ERROR) @GOTO NOLIST	!CREF NOT WANTED
!
@ERROR
@MACRO
*SRTCBL,SRTCBL/C=SRTPRM,SRTCBL,SRTCER,SRTJSS,SORT
@IF (ERROR) @GOTO TRUBLE
!
!  CREATE LISTINGS.
!
@CREF
*DSK:SRTCBL.LZT=SRTCBL
@IF (ERROR) @GOTO TRUBLE
@GOTO DONCRF
!
NOLIST::
@ERROR
@MACRO
*SRTCBL=SRTPRM,SRTCBL,SRTCER,SRTJSS,SORT
@IF (ERROR) @GOTO TRUBLE
!
DONCRF::
@ERROR
!  PLACE INTO LIBOL.REL.
!
@MAKLIB
*LIBOL=LIBOL/MASTER:SORT,SRTCBL/REPLACE:SORT
@IF (ERROR) @GOTO TRUBLE
!
!  INDEX LIBOL.REL.
!
@MAKLIB
*LIBOL=LIBOL/INDEX
@IF (ERROR) @GOTO TRUBLE
!
!CREATE LIBO12.EXE
!
@LINK
*LIBOL.MAP/MAP=/NOLOCAL LIBSHR,LIBOL/SEARCH,/SYMSEG:HIGH/GO
@IF (ERROR) @GOTO TRUBLE
@INFO MEM
@EXAMINE 0
@IF (ERROR) @GOTO REL2
@EXAMINE 600000
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
@GOTO SAVIT
!
REL2::
@600000/
@IF (ERROR) @GOTO TRUBLE !WRONG VERSION OF PA1050 USED
!
SAVIT::
!
!NOW SAVE IT. NOTE WE MUST GET RID OF PAGE 400 (A LINK BUG)
!BUT SAVE PAGE 0 AS IT MAKES IT EASIER TO PATCH
!
@SAVE DSK:LIBO12 0 1,600 677
@IF (ERROR) @GOTO TRUBLE
!
!
!  DELETE UNNEEDED FILES.
!
@DELETE SRTCBL.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
@GOTO FINISH
TRUBLE::@PLEASE -- COBOL SORT CREATION UNSUCCESSFUL!!!
@GOTO FAIL
TOPS10::
!MAKE A RECORD OF WHAT IS BEING USED
!
!  THIS IS FOR IN-HOUSE USE ONLY:
!
.ERROR
.SET NODEFER
.SET WATCH VERSION
. !
.RUN DEC:SETSRC
*LIB:[10,131005]
!
!  END OF IN-HOUSE USE ONLY SETUP.
!
.RUN DEC:DIRECT
*TTY:/CHECKSUM=DEC:PIP+MACRO+MAKLIB+DIRECT+CREF+LINK+LNK???+TECO
*TTY:/CHECKSUM=DEC:HELPER.REL+SCAN.REL+MACTEN.UNV+MACSYM.UNV+UUOSYM.UNV+SCNMAC.UNV
*TTY:/CHECKSUM=SORT.*+SRT???.*
*TTY:/CHECKSUM=LIBOL.REL+FORLIB.REL+FTDEFS.UNV
!
!  TEST TO SEE IF COBOL SORT REQUIRED.
!
.ERROR %
.RUN DEC:DIRECT
*LIBOL.REL
.
.IF (ERROR) .GOTO FORLIB !NOT REQUIRED
.ERROR
!
!  ASSEMBLE SOURCES
!
.ERROR %
.DIR LISTEM.MAC
.IF (ERROR) .GOTO NOLIST	!CREF NOT WANTED
!
.ERROR
.RUN DEC:MACRO
*SRTCBL,SRTCBL/C=SRTPRM,SRTCBL,SRTCER,SRTUUO,SORT
.IF (ERROR) .GOTO TRUBLE
!
!  CREATE LISTINGS.
!
.RUN DEC:CREF
*DSK:SRTCBL.LZT=SRTCBL
.IF (ERROR) .GOTO TRUBLE
.GOTO DONCRF
!
NOLIST::
.ERROR
.RUN DEC:MACRO
*SRTCBL=SRTPRM,SRTCBL,SRTCER,SRTUUO,SORT
.IF (ERROR) .GOTO TRUBLE
!
DONCRF::
!  PLACE INTO LIBOL.REL.
!  SEE IF WE HAVE ORIGINAL LIBOL OR A SORT MODIFIED ONE.
!
.RUN DEC:MAKLIB
*SRTFOO=LIBOL/EXTRACT:SORT
.IF (NOERROR) .GOTO REPLAC
!
!  WE MUST REPLACE OLD CSORT WITH SORT.
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/MASTER:CSORT,SRTCBL/REPLACE:SORT
.IF (ERROR) .GOTO TRUBLE
.GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/MASTER:SORT,SRTCBL/REPLACE:SORT
.DELETE SRTFOO.REL
.IF (ERROR)!
.GOTO INDEX
!
INDEX::
!
!  INDEX LIBOL.REL
!
.RUN DEC:MAKLIB
*LIBOL=LIBOL/INDEX
.IF (ERROR) .GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
.DELETE SRTCBL.REL
.IF (ERROR)!
!
.GOTO FINISH
TRUBLE::.PLEASE -- COBOL SORT CREATION UNSUCCESSFUL.^[
.GOTO FAIL
FORTRA::	!  HERE FOR FORTRAN SORT ONLY.
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
!
!  THIS IS FOR IN-HOUSE USE ONLY:
!
@SET SPOOLED-OUTPUT (TO) IMMEDIATE
@DEFINE DEC: DSK:,CBL20:<EXE>,DEC:
!
!  END OF IN-HOUSE USE ONLY SETUP.
!
!  MAKE A RECORD OF WHAT IS BEING USED.
!
@GET DEC:MACRO
@INFO VERSION
@GET DEC:MAKLIB
@INFO VERSION
@GET DEC:LINK
@INFO VERSION
@GET DEC:CREF
@INFO VERSION
@GET DSK:PA1050
@INFO VERSION
!
@VD DEC:MACRO.EXE,DEC:MAKLIB.EXE,DEC:LINK.EXE,DEC:CREF.EXE,SYS,UNV:MACTEN.UNV,UNV:MACSYM.UNV,UNV:MONSYM.UNV,DSK:PA1050.EXE,
@CHECK SEQ
@
!
VD FORSRT.MAC,
@CHECK SEQ
@
!  TEST TO SEE IF FORTRAN SORT REQUIRED.
!
@ERROR %
@DIR FORLIB.REL
@IF (ERROR) @GOTO FINISH !NOT REQUIRED
@ERROR
!
!  ASSEMBLE SOURCES
!
@ERROR %
@DIR LISTEM.MAC
@IF (ERROR) @GOTO NOLIST	!CREF NOT WANTED
!
@ERROR
@MACRO
FORSRT,FORSRT/C=FORSRT
@IF (ERROR) @GOTO TRUBLE
!
!  CREATE LISTINGS.
!
@CREF
*DSK:FORSRT.LZT=FORSRT
@IF (ERROR) @GOTO TRUBLE
@GOTO DONCRF
!
NOLIST::
@ERROR
@MACRO
FORSRT=FORSRT
@IF (ERROR) @GOTO TRUBLE
!
DONCRF::
!  PLACE INTO FORLIB.REL.
!  SEE IF WE HAVE ORIGINAL FORLIB OR A SORT MODIFIED ONE.
!
@MAKLIB
*SRTFOO=FORLIB/EXTRACT:SORT
@IF (NOERROR) @GOTO REPLAC
!
!  ORIGINAL FORLIB--PUT SORT AT THE END.
!
@MAKLIB
*FORLIB=FORLIB,FORSRT/APPEND
@IF (ERROR) @GOTO TRUBLE
@GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
@MAKLIB
*FORLIB=FORLIB/MASTER:SORT,FORSRT/REPLACE:SORT
@DELETE SRTFOO.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
INDEX::
!
!  INDEX FORLIB.REL.
!
@MAKLIB
*FORLIB=FORLIB/INDEX
@IF (ERROR) @GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
@DELETE FORSRT.REL
@IF (ERROR)!
@EXPUNGE
@IF (ERROR)!
!
@GOTO FINISH
TRUBLE::@PLEASE -- FORTRAN SORT CREATION UNSUCCESSFUL!!!
@GOTO FAIL
TOPS10::
!MAKE A RECORD OF WHAT IS BEING USED
!
!  THIS IS FOR IN-HOUSE USE ONLY:
!
.ERROR
.SET NODEFER
.SET WATCH VERSION
. !
.RUN DEC:SETSRC
*LIB:[10,131005]
!
!  END OF IN-HOUSE USE ONLY SETUP.
!
.RUN DEC:DIRECT
*TTY:/CHECKSUM=DEC:PIP+MACRO+MAKLIB+DIRECT+CREF+LINK+LNK???+TECO
*TTY:/CHECKSUM=DEC:HELPER.REL+SCAN.REL+MACTEN.UNV+MACSYM.UNV+UUOSYM.UNV+SCNMAC.UNV
*TTY:/CHECKSUM=SORT.*+SRT???.*
*TTY:/CHECKSUM=LIBOL.REL+FORLIB.REL+FTDEFS.UNV
!
!  TEST TO SEE IF FORTRAN SORT REQUIRED.
!
.ERROR %
.RUN DEC:DIRECT
*FORLIB.REL
.
.IF (ERROR) .GOTO FINISH	!NOT REQUIRED
.ERROR
!
!  ASSEMBLE SOURCES
!
.ERROR %
.DIR LISTEM.MAC
.IF (ERROR) .GOTO NOLIST	!CREF NOT WANTED
!
.ERROR
.RUN DEC:MACRO
*SRTFOR,SRTFOR/C=SRTPRM,SRTFOR,SRTSTA,SRTSCN,SRTUUO,SRTCER,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
!  CREATE LISTINGS.
!
.RUN DEC:CREF
*DSK:SRTFOR.LZT=SRTFOR
.IF (ERROR) .GOTO TRUBLE
.GOTO DONCRF
!
NOLIST::
.ERROR
.RUN DEC:MACRO
*SRTFOR=SRTPRM,SRTFOR,SRTSTA,SRTSCN,SRTUUO,SRTCER,SRTCMP,SORT
.IF (ERROR) .GOTO TRUBLE
!
DONCRF::
.ERROR
!  PLACE INTO FORLIB.REL.
!  SEE IF WE HAVE ORIGINAL FORLIB OR A SORT MODIFIED ONE.
!
.RUN DEC:MAKLIB
*SRTFOO=FORLIB/EXTRACT:SORT
.IF (NOERROR) .GOTO REPLAC
!
!  ORIGINAL FORLIB--PUT SORT AT THE END.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB,SRTFOR/APPEND
.IF (ERROR) .GOTO TRUBLE
.GOTO INDEX
!
REPLAC::
!
!  JUST REPLACE SORT MODULE.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB/MASTER:SORT,SRTFOR/REPLACE:SORT
.DELETE SRTFOO.REL
.IF (ERROR)!
!
INDEX::
!
!  INDEX FORLIB.REL.
!
.RUN DEC:MAKLIB
*FORLIB=FORLIB/INDEX
.IF (ERROR) .GOTO TRUBLE
!
!  DELETE UNNEEDED FILES.
!
.DELETE SRTFOR.REL
.IF (ERROR)!
!
.GOTO FINISH
TRUBLE::.PLEASE -- FORTRAN SORT CREATION UNSUCCESSFUL.^[
.GOTO FAIL
FINISH::
!
!TEST FOR WHICH SYSTEM
@GOTO TOPS20	!TOPS20 VERSION
.GOTO TOPS10	!TOPS10 VERSION
!
TOPS20::
@ERROR
!
!  SEE WHAT WE GOT.
!
@VD SORT.*,LIBOL.REL,FORLIB.REL,
@CHECK SEQ
@
!
!  TELL OPERATOR HOW WE DID.
!
@PLEASE -- SORT CREATION SUCCESSFUL
@GOTO OK
TOPS10::
.ERROR
!
!  SEE WHAT WE GOT.
!
.RUN DEC:DIRECT
*TTY:/CHECKSUM=SORT.*+LIBOL.REL+FORLIB.REL
!
!  TELL OPERATOR HOW WE DID.
!
.PLEASE -- SORT CREATION SUCCESSFUL.^[
.GOTO OK
FAIL::
OK::!END OF SORT.CTL