KEYDIST

ENSCRIBE(TM) KEY-SEQUENCED FILE KEY DISTRIBUTION DISPLAY UTILITY

The KEYDIST utility is designed to provide a "partial key" distribution for Key-Sequenced files and is intended to be used in preparing for file repartitioning. The utility accepts an IN file (which must be a Key-Sequenced file), an OUT file (which must be either a spooler location or an existing, unstructured, disk file), and a number representing the number of bytes of the primary key to use in grouping the records.

As currently implemented, the utility assumes the primary key begins in the first byte position (KEYOFFSET 0) of each record, and the number of bytes to be used in grouping the records is less than the length of the primary key (KEYLEN).

    SYNTAX

       KEYDIST--/IN--inputfilename,OUT--outputfilename/--numberofbytes--
    

where:

  • inputfilename must be a Key-Sequenced file to which you have READ access

  • outputfilename is either a spooler location or a previously created unstructured disk file (NOTE: the current version of KEYDIST cannot create/produce an EDIT file as output)

  • numberofbytes is the number of bytes of the primary key that you want KEYDIST to use to group records together

HOW IS KEYDIST NORMALLY USED

  1. In normal use KEYDIST is run against a file that may need to be repartitioned, specifying that 3 or more bytes are to be used to group the records. EXAMPLE:
             KEYDIST/IN $D1M.L1DATA.NAIQUE,OUT $S.#KEYDIST.NAIQUE,NOWAIT/5
        

  2. When the utility completes, "despool" the job into an EDIT file:
             PERUSE;JOB #KEYDIST.NAIQUE;LIST EDIT/OUT XNAIQUE/F/L
        

  3. Using IXF, FTP, or your prefered data transfer utility download the EDIT file (XNAIQUE) to your PC as a TEXT file.

  4. Start EXCEL and OPEN the TEXT file. Select FIXED column positions when asked. Choose TEXT for the first two (Key) fields when sked.

    When EXCEL is through reading in and converting the TEXT file you will have 3 fields in your spreadsheet: the first two fields will show the first "n" bytes that were selected in KEYDIST, the first field represents each byte by a three-digit decimal number, the second field represents each byte by its quoted ASCII character (unless the character cannot be displayed, in which case it will be represented by its three-digit decimal equivalent); the third field is the number of records whose keys have the same "n" bytes of the key in common.

  5. In EXCEL if you select the third column (the record count column) it will show you the sum of all the numbers in that column at the bottom-right of its screen (that will be the total records KEYDIST found in the entire file. If you select a range of numbers in that column, EXCEL will show total of those selected numbers.

    If you start at the beginning of the records column and select records while watching the total field, you can then look at the next (unselected) row to see what the key-break value should be for the NEXT partition in order to place the selected records into the PREVIOUS partition.

SAMPLE OUTPUT OF KEYDIST

                 _________________________________________________________
                /
               / Each byte of key shown as decimal value of byte
              /                   ________________________________________
             /                   /
            /                   / Each byte of key translated to ASCII
           /                   /                    ______________________
          /                   /                    /
         /                   /                    / # of records with key
        /                   /                    /          ______________
       /                   /                    /          /
     -------------------------------------------------------
    |  035,076,049,049,081 ("#","L","1","1","Q")          1 |
    |  035,076,049,049,083 ("#","L","1","1","S")          1 |
    |  035,076,049,065,081 ("#","L","1","A","Q")          1 |
    |  035,076,049,065,083 ("#","L","1","A","S")          1 |
    |  035,076,049,068,081 ("#","L","1","D","Q")          1 |
    |  035,076,049,068,082 ("#","L","1","D","R")          1 |
    |  035,076,049,069,081 ("#","L","1","E","Q")          2 |
    |  035,076,049,069,082 ("#","L","1","E","R")          1 |
     \ 035,/\6,049,071/\81 ("#","L","1","/\,"Q")          1 |
      \035/  \,049,07/  \3 ("#","L","1",/  \"S")       /\ 1 |
       \_/    \049,0/    \ ("/\,"L","1"/    \H")      /  \1 |
               \49,/      \_/  \"L","1/      \")     /    \ |
    |\     /\   \_/   /\        \L","/   /\   \)    /      \|
    | \   /07\       /,0\        \",/   /I"\   \   /   /\
    |  \_/,076\     /3,08\   /\   \/   /"I",\   \_/   /  \
    |  036,076,\   /76,071\_/$"\      /,"M","\       / 266\
    |  036,076,0\_/077,081 ("$",\    /","M","Q\     /    76\
    |  036,076,049,077,083 ("$","\  /1","M","S"\   /     38 |
    |  036,076,049,079,081 ("$","L\/"1","O","Q")\_/   75960 |
    |  036,076,049,079,083 ("$","L","1","O","S")      25323 |
    |  036,076,049,080,081 ("$","L","1","P","Q")      24152 |
    |  036,076,049,080,082 ("$","L","1","P","R")      24337 |
    |  036,076,049,082,068 ("$","L","1","R","D")       1194 |
    |  036,076,049,090,067 ("$","L","1","Z","C")     107130 |
     -------------------------------------------------------
    


Back to Products



Copyright 2007 Joseph Massucco LLC

Tandem, NonStop, HP, Enscribe, Guardian, NonStop Kernal, NSK, are trademarks of Hewlett-Packard Development Company, L.P.
IDX, LastWord, are trademarks of GE Healthcare