Google
 

Trailing-Edge - PDP-10 Archives - BB-H506D-SM_1983 - sort/documentation/srt4c.doc
There are 3 other files named srt4c.doc in the archive. Click here to see a list.


SRT4C.DOC -- Changes from SORT V4B(435) to V4C(467).
June 1981






























COPYRIGHT (C) 1981 BY
DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.


THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
TRANSFERRED.

THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
CORPORATION.

DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
SRT4C.DOC                                                       Page 2


SRT4C.DOC -- Changes from SORT V4B(435) to V4C(467).



1.0  SUMMARY

1.1  Functions

SORT is the high performance sort/merge package for the  DECSYSTEM-20.
SORT may be run as a stand-alone sort/merge, or embedded in a COBOL or
FORTRAN program.

This release, SORT V4C(467), contains all published edits  up  to  and
including edit 467 and fully replaces SORT V4B.


1.2  Monitor

SORT runs under all supported monitors,  and  has  been  tested  under
Release 4.

See section 4 for details of how to rebuild SORT.


1.3  Software Dependencies

SORT V4C requires Release 4 versions of  MONSYM.UNV,  MACSYM.UNV  and,
for COBOL, MACREL.REL.  These files are included on the tape.

The internal COBOL-74 SORT  requires  version  12A  or  later  of  the
COBOL-74  object  time system, C74O12.EXE and C74LIB.REL, to reside on
SYS:.

The internal FORTRAN SORT requires the FORTRAN library, FORLIB.REL, to
reside on SYS:.


1.4  Relevant Documentation

SORT is documented in the following manuals:

DECSYSTEM-20 User's Guide, AA-4179B-TM
DECSYSTEM-20 SORT/MERGE User's Guide, AA-4186C-TM
COBOL-74 Language Manual AA-5059A-TK
FORTRAN Reference Manual, AA-4158B-TM
These may be found in Software Notebooks 1, 7, 8, and 9.
SRT4C.DOC                                                       Page 3


2.0  EXTERNAL CHANGES

The stand-alone sort no longer requires  FOROTS  to  process  floating
point keys.

The following  new  switches  have  been  added.   They  are  not  yet
documented.

/NOCRLF
This switch tells SORT that BOTH the input and the  output  files  are
fixed size ASCII records containing no carriage control characters.

/AFTER-ADVANCING and /BEFORE-ADVANCING 
These switches tell SORT where the carriage-control characters  go  in
relation  to  the  record.   /AFTER  is the normal way, /BEFORE is the
COBOL-74 compatible way.  These switches affect output  only  as  SORT
can  read  either  format  correctly  and  just  ignore the extraneous
cr-lfs.

/MAX-TEMP-FILES
This switch specifies the maximum number of temporary files  that  can
be used during the SORT or MERGE.

The  quote  character  used  to  delimit  literal  collating  sequence
characters can now be either single or double quote, but must occur in
matched pairs.


3.0  KNOWN BUGS AND DEFICIENCIES

As of Feb-80, the following deficiencies are known:

1.  TOPS-20 Release 3A only.
Stand alone SORT does not recover correctly from encountering a  short
last record when the input is from magnetic tape.  This a problem with
the DUMPI JSYS which is fixed by SIRUS PCO  20-MONITO-118  and  is  in
Release 4.
SRT4C.DOC                                                       Page 4


4.0  INSTALLATION INSTRUCTIONS


4.1  Contents of the SORT Distribution Tape.

For details of the combined COBOL/SORT tape see COBOL.INS.

The SORT distribution tape is written in DUMPER  format  and  contains
the complete SORT/MERGE system.  There are four save sets.

The save sets are:


1.  SORT-DOCUMENTATION

2.  SORT-BINARY

3.  SORT-SOURCE

4.  SORT-BUILD

The SORT-DOCUMENTATION save set contains the following files:

         SORT.BD    -- directory of SORT-BINARY save set
         SORT.SD    -- directory of SORT-SOURCE save set
         SORT.RD    -- directory of SORT-BUILD save set
         SRT4C.BWR  -- the Beware file for SORT 4C
         SRT4C.DOC  -- the Doc file for SORT 4C

The SORT-BINARY save set contains the  files  required  to  run  SORT.
These files are normally kept on SYS:.

The SORT-SOURCE save set contains all the  source  files  required  to
build SORT.

The SORT-BUILD save set contains the Rel, Log, UNV  files  etc.   from
the final build.


4.2  Instructions for Loading and Installing SORT

Mount the SORT or COBOL/SORT tape  on  logical  MTA0:   and  type  the
following commands:

DUMPER
TAPE MTA0:
REWIND
DENSITY 1600-BPI
SKIP 1
RESTORE <*>SORT.EXE (TO) <SUBSYS>*.*.-1,
<*>SORT.HLP (TO) <SUBSYS>*.*.-1
REWIND
SRT4C.DOC                                                       Page 5


4.3  Instructions for Building SORT

Full building instructions for SORT can be found in SORT.CTL.

To simplify the build process, all logical names  required  have  been
placed  in  a file called SORT.CMD.  The user should examine this file
and make appropriate changes.  The SORT command file SORT.CTL  does  a
TAKE of SORT.CMD to set up the logical name environment.

To generate stand-alone SORT, load all of  the  SORT-SOURCE  save  set
into SORT-SOURCE:, load SORT.CTL and SORT.CMD from the SORT-BUILD save
set into SORT-BUILD, modify SORT.CMD and type:

     SUBMIT SORT/TIME:0:30:00

If  C74LIB.REL,  C74SHR.REL,  FTDEFS.UNV   and   METUNV.UNV   are   in
COBOL-74-BUILD:,  a  COBOL-74  SORT  will  be  built and inserted into
C74O12.EXE and C74LIB.REL.

If FORLIB.REL is in SORT-BUILD:, a FORTRAN  SORT  will  be  built  and
inserted into FORLIB.REL.


To build only a COBOL-74 SORT type:

     SUBMIT SORT/TIME:0:20:00/TAG:CBL74


To build only a FORTRAN SORT type:

     SUBMIT SORT/TIME:0:20:00/TAG:FORTRA

The following table contains  the  assembly  switches,  their  default
value, location and intended use.

  Assembly   Default  Defined    Use when Switch has
  Switch     Value    in module  a non-zero value
  ------------------------------------------------------------------
  FTOPS20    1        SRTPRM     Build SORT for a DECSYSTEM-20
  FTKL10     1        SRTPRM     Use KL instructions (BIS etc.)
  FTKI10     1        SRTPRM     Use KI instructions (DMOVE etc.)
  FTDEBUG    0        SRTPRM     Debugging aids and additional info
  FTCOBOL    1        SRTCBL     Build SORT for COBOL
SRT4C.DOC                                                       Page 6


5.0  INTERNAL CHANGES

The sources of SORT consist of:

SRTVER.MAC  An optional file containing feature test switch settings.
SRTPRM.MAC  The common parameter definitions
SRTSTA.MAC  The common stand-alone code
SRTCMD.MAC  The DECSYSTEM-20 command scanner
SRTJSS.MAC  DECSYSTEM-20 specific code
SRTCER.MAC  Standard error message routines
SRTCMP.MAC  The comparison generator
SRTFLT.MAC  The floating point code
SORT.MAC    The common algorithms

In addition the COBOL SORT has:
SRTCBL.MAC  The interface for COBOL

and the FORTRAN SORT has:
FORSRT.MAC  The FORTRAN interface to the stand-alone SORT.


Several changes have been made to SORT to  take  advantage  of  future
releases   of   the   operating   systems.   Although  SORT  will  run
successfully with all currently  supported  operating  systems,  these
changes  may  have  some  slight  impact on performance and size.  The
largest change is edit [C20] which  will  make  it  possible  for  the
stand-alone and FORTRAN SORT to run in a non-zero section with Release
5 of TOPS-20.  This change was mostly to clean up  the  left  half  of
index registers, however it is a rather large patch.


The following edits were made to SORT as a result of bugs found:

436  Official edit number for edit CCC of version 4B.

437  Fix TOPS-20 bug with SIXBIT unblocked files,  SRTJFO  and  SRTCCF
     errors.

440  Fix fixed EBCDIC with odd number of bytes in file.

441  Fix reformatted buffer pool memory allocation.

442  Fix problem with EBCDIC record descriptor word corruption.

443  Eliminate  sequence  number  overflow   warning   (%SRTSNO)   and
     associated instability.

444 Fix a TOPS-20 bug in which SOUT garbages output containing nulls.

445 Fix a TOPS-10 bug caused by not clearing .RBALC in ENTER block.

446 Fix a bug which garbaged COMP-3 key extraction.

447 Fix the /NOCREATE bit in TOPS-10 GENSTR routine.
SRT4C.DOC                                                       Page 7


450 Allow explicit ALPHANUMERIC keys with EBCDIC.

451 Not required in SORT 4C (part of edit C18).

452 Not required in SORT 4C.

453 Make TOPS-20 HELP command look in HLP:  instead of SYS:.

454 On TOPS-20 don't clear MRGSW (in CLRANS) after setting it.

455 Save T4 in ERRRTI (see also C28).

456 Not required in SORT 4C.

457 Allow TOPS-20 SORT to CONTINUE  after  "?QUOTA  EXCEEDED  OR  DISK
     FULL" message.

460 Build the collating table (COLBUF) correctly for SIXBIT files when
     the user specifies his own collating sequence.

461 Correct the calculation of MINKEY when there are extracted keys.

462 First character of a collating sequence specified  in  a  file  is
     lost.

463 On TOPS-20 close the TAKE and LOG files when SORT exits if a  TAKE
     file was being processed.

464 On TOPS-20 fix edit 457 to put out "$" before  the  error  message
     for batch.
         Also fix the continue after PMAP failure so  that  pages  are
     not lost.

465 On TOPS-20 fix the calculation of the number of bytes  written  to
     the output file.

466 Not required in SORT 4C.

467 Allow the space character to be specified using the quote facility
     in an alternate collating sequence file.

C01  The magnetic tape switches /PARITY, /DENSITY, and /INDUSTRY  were
     scanned,  but  never  used  on  TOPS-20.   This meant that EBCDIC
     magnetic tapes were not read or written in a way compatible  with
     COBOL.   Changes  were made to SORT-10/20 to utilize these switch
     values in a similar manner to the /REWIND and /UNLOAD switches.

C02  The fastest (least CPU and elapsed time) technique for doing  I/O
     to  magnetic  tapes  on  TOPS-20  is  the DUMPI/DUMPO JSYS's.  To
     properly use these JSYS's, double buffered, non-blocking  I/O  is
     required.   This  is  more complicated than the normal SINR/SOUTR
     JSYS's, because it is the responsibility on the user  program  to
     keep  track  of  which buffer is being filled and which buffer is
     being emptied.  SORT-20 was not doing this properly.
SRT4C.DOC                                                       Page 8


C03  The processing of End-Of-File on magnetic tape was not being done
     correctly.   On  input,  the  last  block  was  causing errors on
     TOPS-20, and on output, the last block contained junk at the  end
     for both TOPS-10 and TOPS-20.

C04  File names typed in lower case were not being converted to SIXBIT
     magnetic tape labels properly.

C05  Since magnetic tape buffers are often larger than a  page,  under
     certain  conditions  when  SORT-20  went to open the output file,
     there was not enough room left.  The  default  MEMORY  allocation
     subroutines were corrected for this oversight.

C06  Many problems existed with magnetic tape blocking factors:
     EBCDIC requires an 8-bit byte on magnetic tape and a  9-bit  byte
     everywhere else.  SORT-20 was just totally ignoring this fact.
     The record and block header words for variable length EBCDIC were
     not taken into account when calculating block sizes.
     The test to suppress padding between blocks for the  first  block
     was faulty.
     Various other small bugs existed in these areas.

C07  The code to deal with magnetic tape  End-Of-Tape  processing  did
     not  work  under  all  circumstances.   Also, when reading back a
     multi-tape file, the  reel  numbers  were  not  checked  properly
     causing erroneous error messages.

C08  The code to deal with labeling of magnetic  tapes  did  not  work
     except  under  rare  situations  on TOPS-20.  There were numerous
     problems:
     Dumping the last buffer, writing EOF marks, writing  labels,  and
     closing the files were not accomplished in the correct order.
     The code to deal with short buffers did not work at all.
     Also, when a EOF is read or written, the DUMPI/DUMPO  JSYS's  are
     re-synchronized   with   the   buffers.   This  was  not  handled
     correctly.

C09  Since COBOL defaults /BLOCKED:1 and /INDUSTRY for EBCDIC magnetic
     tapes, SORT-10/20 needed this feature also.

C10  SORT-20 sometimes created a TAKE command log file  and  sometimes
     did  not,  when  no log file specification was made.  SORT-20 was
     corrected to never write a TAKE command log file  unless  one  is
     explicitly requested.

C11  To allow merges on multiple files from a single magnetic tape,  a
     /POSITION  switch  was  implemented.   The /REWIND switch used in
     conjunction with the /POSITION switch allows  for  absolute  file
     addressing.

C12  Since magnetic tape auto-labeling  was  comming  to  TOPS-20  (in
     Release  4),  support  for  this  new  TOPS-20  feature  would be
     required.  SORT-10 already supported auto-labeled magnetic tapes.
     However, there are three levels of auto-labeling on TOPS-20:
     A system without auto-labeling
SRT4C.DOC                                                       Page 9


     An unlabeled tape on an auto-labeling system
     A labeled tape on an auto-labeling system.

C13  FOROTS version 6 will be released in the near future.   This  new
     version of FOROTS works significantly differently from version 5.
     The stand-alone version of  SORT-10/20  merged  FOROTS  into  its
     memory  and used FOROTS for floating point number interpretation.
     This tied SORT and FORTRAN  together.   However,  the  techniques
     used to initialize FOROTS will no longer work for the new version
     of FOROTS.  Furthermore, when  SORT  is  called  from  a  FORTRAN
     program, SORT-10/20 uses the FOROTS memory management subroutines
     to allocate and deallocate memory.   These  subroutines  allocate
     memory  in  a very different manner in the new version of FOROTS.
     FOROTS used to allocate new memory at .JBFF.  This meant  that  a
     block  of  memory allocated by FOROTS could be expanded if no new
     memory was allocated after it.  However, in the  new  version  of
     FOROTS,  memory  is  allocated  just  below  the  high segment of
     FOROTS.  The last block of memory  can  no  longer  be  expanded.
     These  major  revisions  to  FOROTS  require  major  revisions to
     SORT-10/20.
     First, the FLIRT subroutine in FOROTS which  interprets  floating
     point  numbers  was  rewritten  to  become  part  of  SORT-10/20.
     Second,  many  changes  were  made  to  redesign  SORT's   memory
     management.   This redesign cleaned up many potential problems in
     SORT-10/20.  The following restrictions were strictly adhered to.
     All  memory management is done by two routines.  No references to
     the Job Data Area are allowed except for  defaulting  the  memory
     usage  in  the  standalone  versions  of  SORT-10/20 and in these
     memory management subroutines.  FOROTS and LIBOL  are  called  by
     these  memory  management  subroutines  for the FORTRAN and COBOL
     versions of SORT-10/20.

C14  In the past  MACRO-10/20  had  been  unable  to  handle  negative
     relocations  properly.   To  circumvent this problem, inefficient
     code was written in SORT-10.  Since  this  restriction  was  been
     eliminated in MACRO, the code in SORT-10 was corrected.

C15  The code in SORT-10 used to determine which structures should  be
     used  by  default  for  temporary  files  did  not work properly.
     SORT-10  attempted  to  used   write-locked   and   create-locked
     structures.

C16  In SORT-20 the ALPHANUMERIC key modifier  for  EBCDIC  was  being
     rejected, even though, if no modifier was specified, ALPHANUMERIC
     was assumed.

C17  Blocked DSK files were  hastily  added  to  SORT-20.   The  logic
     behind  the  code  had  many  holes.   This  code  needed  to  be
     rewritten.

C18  In version 7.02 of TOPS-10 a new feature  is  being  added  which
     will  allow  disk  buffers  to  be  larger  than  one disk block.
     Initial tests indicate that SORT-10 can  be  made  to  run  in  a
     smaller elapsed time if this new feature is utilized.
SRT4C.DOC                                                      Page 10


C19  TOPS-10 7.01 allows a user program  to  have  more  than  16  I/O
     channels,  however  they can only be used by the FILOP.  UUO.  As
     much code as possible is being converted now  to  use  the  6.03A
     supported  functions.   The  release of SORT-10 after 6.03A is no
     longer  supported  will  use  26  extended   channels   for   the
     intermediate files.  This should improve COBOL SORT time and free
     some channels for the COBOL program.

C20 Clean up code to allow SORT to run in a non-zero memory section in
     the future.

C21 Fix memory reallocation bug in SORT-10.

C22 Fix problem  with  unlabeled  magnetic  tapes  through  MOUNTR  in
     SORT-20.

C23 Fix problem with determining high segment size in SORT-10.

C24 Fix problem with Physical Limit 0 in SORT-10.

C25 Add Support for new PULSAR label types in SORT-10.

C26 Fix bug concerning .TMP files and no UFDs in SORT-10.

C27 Renamed to edit 444.

C28 Fix record truncation on input destroying ACs.

C29 Fix default memory for SORT-10 on KI's and KL's

N01 Some minor code bumming.

N02 Give error message if not enought input files for MERGE.

N03 Change the .LINK pseudo-op number to avoid conflict with  COBOL-74
     /R.

N04 Fix COBOL SORT on KA-10 to assemble correctly again.

N05 Give file  not  found  message  as  early  as  possible  to  avoid
     unnecessary memory expansion.

N06 Reset CORSTK if an error occurs in SCAN (TOPS-10 only).

N07 Fix edit C29 to work for COBOL SORT (TOPS-10 only).

N08 More fixes to DEFCOR to account for VMDDT and V/M limits  (TOPS-10
     only).

N09 Fix calculation of number of temp  files  on  TOPS-10.   This  was
     wrong if an internal merge was required.

N10 Delete FTCOL feature test switch, the code is always generated.

N11 Add switches NOCRLF, AFTER-ADVANCING, and BEFORE-ADVANCING.
SRT4C.DOC                                                      Page 11


N12 If TOPS-10 7-series monitor use FILOP.s for all I/O operations.

N13 On TOPS-20 don't turn on page creation interupt if RMS  turned  it
     off.

N14 On TOPS-10 bypass protection check if job is [1,2] or JACCT.

N15 Fix read from NUL:  device on TOPS-20.

N16 Fix bug with very large keys using more than FTEXSX space.

N17 Use extended channels if TOPS-10 7.01.

N18 Fix bad sort for SIXBIT key /K:n:3 where n is a multiple of 6.

N19 Return /ERROR-CODE in 3 ASCII  characters  rather  than  6  SIXBIT
     ones.

N20 On TOPS-10 increase  number  of  temp  files  to  26  if  extended
     channels available.

N21 On TOPS-10 put segmentation back the way  it  was,  put  new  code
     under FTVM conditional.

N22 On TOPS-10 fix default core allocation "off by  one"  bug  causing
     not enough core error.

N23 Make SORT with double precision COMP keys work again.

N24 Make FILOP.  DELETE work in  both  7.01  and  7.02  (problem  with
     FO.UOC bit).

N25 Allow either " or  '  to  delimit  quoted  characters  in  literal
     collating sequence.

N26 On TOPS-20 fix bug with multiple input files on magtape.

N27 Fix memory allocation in SORT for very large FORTRAN programs.



The following edits were mode to FORSRT.MAC:

  5 Clean up code to allow SORT to run in a non-zero memory section on
     TOPS20.

  6 More non-zero section code for TOPS-20.



6.0  SUGGESTIONS

None.
SRT4C.DOC                                                      Page 12


[End of SRT4C.DOC]