Google
 

Trailing-Edge - PDP-10 Archives - BB-D489E-SB - 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-10.
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
7.01.  It has not been tested on a KA-10 cpu.

See section 4 for details of how to rebuild SORT.


1.3  Software Dependencies

The internal COBOL-68 SORT  requires  version  12A  or  later  of  the
COBOL-68 object time system, LIBOL.REL, to reside on SYS:.

The internal COBOL-74 SORT  requires  version  12A  or  later  of  the
COBOL-74 object time system, 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-10 SORT/MERGE User's Guide, AA-0997D-TB
COBOL-68 Language Reference Manual, AA-5057A-TK
COBOL-74 Language Manual, AA-5059A-TK
DECsystem-10 FORTRAN Programmer's Reference Manual, AA-0944E-TB

These may be found in Software Notebooks 8, 9, 10, and 11.
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 and /BEFORE 
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.

/MAXTEMP
This switch specifies the maximum number of temporary files  that  can
be used during the SORT or MERGE.

All flavours of SORT have been changed to  use  extended  channels  if
7.01  is  running.   In addition the maximum number of temporary files
allowed has been raise from 15 to 26.  This  should  make  COBOL  SORT
more efficient.

If FTVM is turned on, a Virtual Memory version of SORT can  be  built.
This  version  is  not usable as a stand-alone SORT, but can be called
from FORTRAN.  This version of SORT is called FSORT to distinguish  it
from  the  regular  stand-alone SORT.  It requires that the subroutine
FORSRT be assembled and inserted into FORLIB rather  than  the  SRTFOR
version  of FORTRAN SORT.  This version will only run on 7.01 or later
monitors.  It uses the MERGE UUO to read in a  non-shareable  copy  of
FSORT when the SORT function is required.  The only difference between
FSORT and SORT is that FSORT allocates its memory with a PAGE  UUO  at
run  time.  All the power of stand-alone SORT will be available to the
FORTRAN user using this version, it does use SCAN.

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.  SORT may give the message:

     %SRTNCS Not enough core specified

when no /CORE switch or MEMORY SIZE clause was given.  The sort should
proceed normally, however.
SRT4C.DOC                                                       Page 4


2.  Though FORTRAN SORT's calling sequence is similar  to  stand-alone
SORT's, the following differences are known:

         1.  Continuation lines (in indirect files) are not allowed.

         2.  Indirect files must be on DSK:   in  the  user's  default
         path.

         3.  File extensions must be typed explicitly.

         4.  Switches must always follow file specifications to  which
         they apply.

3.  On VM systems, COBOL SORT  destroys  pages  left  around  by  MCS,
VMDDT,  and  the page fault handler when it reduces core after a sort.
The page fault handler is not affected too  much,  however,  since  it
will be brought in again if totally wiped out.

4.  SORT and COBOL overlays do not always work together correctly.
SRT4C.DOC                                                       Page 5


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 BACKUP INTERCHANGE format and
contains the complete SORT/MERGE system.  There are five save sets.

The save sets are:


1.  SORT-DOCUMENTATION

2.  SORT-SOURCE

3.  SORT-KL-BUILD

4.  SORT-KI-BUILD

5.  SORT-KA-BUILD

The SORT-DOCUMENTATION save set contains the following files:

         SORT.SD    -- directory of SORT-SOURCE save set
         SORT.KLD   -- directory of SORT-KL-BUILD save set
         SORT.KID   -- directory of SORT-KI-BUILD save set
         SORT.KAD   -- directory of SORT-KA-BUILD save set
         SORT.HLP   -- the HELP file for SORT
         SRT4C.BWR  -- the Beware file for SORT 4C
         SRT4C.DOC  -- the Doc file for SORT 4C

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

The SORT-K*-BUILD save set contains the Rel, Log, UNV files etc.  from
the final build.
SRT4C.DOC                                                       Page 6


4.2  Instructions for Loading and Installing SORT

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

R BACKUP
TAPE MTA0:
REWIND
DENSITY 1600-BPI
RESTORE SORT.HLP
REWIND
SKIP 2   !FOR KL-10
SKIP 3   !FOR KI-10
SKIP 4   !FOR KA-10
RESTORE SORT.EXE
REWIND

Then copy SORT.EXE to SYS:  (or NEW:) and SORT.HLP to HLP:.


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.  If MIC were supported and worked under BATCH then
they would be in a MIC file SORT.MIC.  However, this is  not  true  so
that  they  are in a file called SORT.TEC.  If BLDSRT.CTL is SUBMITTED
and the file SORT.TEC exists then BLDSRT runs TECO to modify  SORT.CTL
by  the  contents  of  SORT.TEC to produce a new control file SORT.CTM
which it then SUBMITs, otherwise it just SUBMITs SORT.CTL.   The  user
should examine the file SORT.TEC and make appropriate changes.

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

     SUBMIT BLDSRT

If LIBOL.REL, FTDEFS.UNV and  METUNV.UNV  are  in  your  directory,  a
COBOL-68 SORT will be built and inserted into LIBOL.REL.

If C74LIB.REL, FTDEFS.UNV and METUNV.UNV  are  in  your  directory,  a
COBOL-74 SORT will be built and inserted into C74LIB.REL.

If FORLIB.REL is in your directory, a FORTRAN SORT will be  built  and
inserted into FORLIB.REL.

To build only a COBOL-68 SORT type:

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


To build only a COBOL-74 SORT type:
SRT4C.DOC                                                       Page 7


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


To build only a FORTRAN SORT type:

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


To build only a Virtual memory FORTRAN SORT type:

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

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    0        SRTPRM     Build SORT for a DECSYSTEM-20
  FTKL10     0        SRTPRM     Use KL instructions (BIS etc.)
  FTKI10     0        SRTPRM     Use KI instructions (DMOVE etc.)
  FTDEBUG    0        SRTPRM     Debugging aids and additional info
  FTCOBOL    1        SRTCBL     Build SORT for COBOL
  FTFORTRAN  0        SRTCBL     Building COBOL, so turn off FORTRAN
  FTFORTRAN  1        SRTFOR     Build SORT for FORTRAN
  FTCOBOL    0        SRTFOR     Building FORTRAN, so turn off COBOL
  FTVM       0        SRTPRM     Build  a  Virtual  Memory  SORT   for
  FORTRAN
SRT4C.DOC                                                       Page 8


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
SRTSCN.MAC  The interface to SCAN
SRTUUO.MAC  DECsystem-10 specific code
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:
SRTCER.MAC  Standard error message routines.
SRTFOR.MAC  The non-V/M FORTRAN interface.
FORSRT.MAC  The FORTRAN interface to the V/M FSORT.


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.  Other changes
were to TOPS-10 specific code to take advantage of  extended  channels
in 7.01, and big disk buffers in 7.02.


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.
SRT4C.DOC                                                       Page 9


447 Fix the /NOCREATE bit in TOPS-10 GENSTR routine.

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
SRT4C.DOC                                                      Page 10


     being emptied.  SORT-20 was not doing this properly.

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.
SRT4C.DOC                                                      Page 11


     However, there are three levels of auto-labeling on TOPS-20:
     A system without auto-labeling
     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
SRT4C.DOC                                                      Page 12


     smaller elapsed time if this new feature is utilized.

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.
SRT4C.DOC                                                      Page 13


N11 Add switches NOCRLF, AFTER, and BEFORE.

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
SRT4C.DOC                                                      Page 14


None.



[End of SRT4C.DOC]