HP3000-L Archives

August 1997, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jerry Fochtman <[log in to unmask]>
Reply To:
Jerry Fochtman <[log in to unmask]>
Date:
Tue, 19 Aug 1997 10:31:20 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (117 lines)
At 07:30 AM 8/19/97 -0700, Glenn Cole wrote:
>> If Native Mode COBOL is used, it will utilize SORT/XL.  SORT/XL uses
>> 2 unnamed scratch files and as such, one cannot issue a file equation
>> for them.
>
>Holy moly, Jerry! That strikes me as a heck of an incompatibility.
>I wonder why I haven't heard in the last -- what is it? -- TEN YEARS
>that the :FILE equation method no longer works. But wait a sec...

Probably the reason it hasn't been an issue is because SORT/XL isn't
subject to the 10,000 input limit that all of this served to work-around
(unless one's input is from tape...).

The following is a snip from the SORT0MERGE/XL Users Guide, from the
section titled "SORT-MERGE/XL Files":

-------------------------------------------------------------------------

Scratch File

The scratch file is used as a work area by SORT/XL. It is not used by
MERGE/XL. The formal designator for the file is SORTSCR in Compatibility
Mode.  In Native Mode, there is an unnamed scratch file.  Refer to the
discussion of the >INPUT command for SORT/XL to estimate the size of the
scratch file.  All extents for the file are allocated at once.

-------------------------------------------------------------------------

>> In terms of the maximum number of records SORT/XL can handle one has
>> to use the basic formula used by sort for building these files which
>> is outlined in the manual.
>
>"can handle." Does that mean even without any indication that more
>than 10,000 recs are to be sorted? So issuing a :FILE equation just
>doesn't have any effect as far as max recs goes?
>
>So it's not so much an incompatibility as it is an ineffective command.


Here's the text from the INPUT command which discusses the work space
calculation:

------------------------------------------------------------------------

Native Mode Scratch File Size

Native mode scratch files contain two types of records:  Work Records and
End-of-Subfile Records.  The following algorithm calculates the size of
one native mode scratch file.

          Work Record Length (#Work Records + #End-of-Subfile Records)
                               = #Bytes in 1 scratch file
          Where:
                             #Work Records = #Input Records

                         #End-of-Subfile Records = #Input Records / 50

              and Work Record Length = Input Record Length + Expansion Bytes

The value of Expansion Bytes depends on the number and type of keys that
the user specifies.  Expansion Bytes is expressed as:

     #key 5's + #Key 9's + 2(#key 4's + #key 6's + 3key 7's +#key 8's +#key
12's)
 + 3(#key 13's) +3

The space used for a sort occuring in native mode will be two times the
value returned by this formula.

________________________________________________________________________

NOTE  This formula illustrates a worst case situation.

________________________________________________________________________

Native Mode Scratch Filenames

You cab issue file equations for the native mode scratch files only to
specify a particular device which must be a disc.  For example:

     FILE HPSORTS1; DEV=2

     FILE HPSORTS2; DEV=2


----------------------------------------------------------------------

The Key types are defined elsewhere in the manual....

Because it states farther up that it uses unnamed scratch files, SORT
must retrieve the device specification from these file equations and
use them for the unnamed scratch files.  That's probably why the device
info is the only file attribute that the manual outlines for these
file equations....

A few years back Alfredo did a talk about how to read a manual. I
seem to recall he equated reading a manual to reading a love story.
Unfortunately I think the Sort/Merge manual is more like a mystery
novel!  One has to figure out how to put together several pieces
spead out throughout the manual to understand the mysterious workings
of sort/merge's work space...



/jf
                              _\\///_
                             (' o-o ')
___________________________ooOo_( )_OOoo____________________________________

         This day in 1812 - "Old Ironsides" fought its famous battle with
                            the British ship "Guerriere"
___________________________________Oooo_____________________________________
                            oooO  (    )
                           (    )  )  /
                            \  (   (_/
                             \_)

ATOM RSS1 RSS2