uvhd free download

'uvhd' is a FREE download from UV Software, see link at bottom.

It is a file investigation utility that displays records in vertical hexadecimal. uvhd is especially useful for files with packed/binary fields &/or that do not have the LineFeeds required by most Unix/Linux/Windows system utilities. uvhd is an easy-to-use interactive utility with 25 help screens documenting commands (browse, search, update, select, drop, print, translate, scan/replace, count records, accumulate fields, sequence number, sequence check, etc).

uvhd can help diagnose problems with data file conversions & FTP transfers because it shows the hexadecimal values of packed/binary fields, record headers, & record terminators. These fields can not be shown by the usual unix editors.

uvhd displays any file-type

By default uvhd will display any file in vertical hexadecimal in chunks of 256 bytes. uvhd will display discrete records when you specify the option for the several known file-types. Part 5 of the documentation (see link at bottom) describes the various file types commonly used on Unix/Linux/Windows systems by applications that have been transferred from a mainframe.

Goto:   Begin this document End this document UVSI Home-Page

uvhd sample display EBCDIC file


 uvhd dat1/custmas0 r256s2a  <-- display EBCDIC demo file, using option 'a'
 ==========================      to translate the character lines to ASCII
 rec#=1 rsize=256 fptr=0 fsize=8192 rcount=32
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
         FFFFFF4444CECDCDCCD4DDEDDE4DEC44444FFFF4CDECD4DDCC4444444444DCDC
         130140000055597955504636920334B000018150266550961400000000005151
      64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ...V@...
         CDD4444444444CC4EFEFCF4444FFF6FFF6FFFF4DCDDE4EDCDCC4444401357000
         946000000000023059218100002500754055310319980695538000000246C000
     128 .........W.....-.........X'..f.....m*..................V'...f...
         0000000005300016000000002570063100095000000000000000013570016000
         0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0056C00
     192 .E@...V'........c..............f..............f.C 19950531
         047000570000000088000000001800068000130000000069C4FFFFFFFF444444
         35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000

Notes re uvhd EBCDIC file display

  1. This is one of the many demo files used to illustrate Vancouver Utilities. 'custmas0' is the EBCDIC version vs 'custmas1' the ASCII version which can also be seen in the uvhd documentation (see link at bottom).

  2. Note the options 'r256s2a'. Option 'r' (r256) defines the Record-size as 256, Option 's' (s2) space 2 inserts a blank line between the 3 line groups of the vertical hexadecimal display (characters, zones,& digits).

  3. Especially note option 'a' which translates the character line to Ascii so we can read character fields of EBCDIC files on unix/linux machines.

  4. Mainframers will easily recognize the EBCDIC vertical hex zone/digit codes. For example the 1st character above is '1' which is x'F1' in horizontal hex & you can see the zone/digit F/1 on the zones & digits lines below. The letter 'E' (of EVERGREEN MOTORS) in EBCDIC is x'C5' (zone 'C' & digit '5').

    Packed Decimal fields

  5. Note that there are 24 * 5 byte packed fields in bytes 120-240 (monthly sales for this-year & last-year). Each 3 line vertical hex group displays 64 bytes, so byte 120 is 56 bytes into the 2nd row. In horizontal hex the 1st packed field is x'001234567C' which is $12,345.67.

  6. You can easily identify the end of each 5 byte packed field by the sign, x'_C' (positive) or x'_D' (negative).

  7. The characters above the packed fields are meaningless/coincidental results of displaying packed field digits as characters. x'001234567C' just happens to display as '...V@' since any non-displayable character is shown as a '.', x'56' is a 'V' in ASCII,& x'7C' is a '@' in ASCII.

Goto:   Begin this document End this document UVSI Home-Page

uvhd sample display ASCII variable length RDW file


 uvhd dat1/vendorpay3 z4    <-- investigate vendorpay3 file
 =======================      - option 'z4' for file-type RDW
                10        20        30        40        50        60
 r#  1 0123456789012345678901234567890123456789012345678901234567890123
     0 .>..DELL10 P  20100131  INV00010  000195000 Dell server 2900..
       03004444332522333333332244533333223333333332466627677672333300
       0E0045CC10000020100131009E60001000000195000045CC035265202900DA
 rec#=1 rsize=62 rcount=8 fsize=513 fptr=0
                10        20        30        40        50        60
 r#  2 0123456789012345678901234567890123456789012345678901234567890123
     0 .D..HP0010 P  20100215  INV00020  000350000 HP XW 9400 Workstati
       0400453333252233333333224453333322333333333245255233332567677676
       0400800010000020100215009E600020000003500000800870940007F2B34149
    64 on..
       6600
       FEDA
 rec#=2 rsize=68 rcount=7 fsize=513 fptr=62

Notes re uvhd display ASCII RDW file

  1. Above shows the first 2 records of vendorpay3. Option 'z4' tells uvhd that this is an RDW file (variable length with rec-size in 1st 2 bytes binary). Third & fourth bytes are nulls & data begins in the 5th byte.

  2. uvhd shows the record-size below the hexdump - see 'rsize=62' under 1st and 'rsize=68' under 2nd. These decimal values have been converted from the binary record prefixes.

  3. The binary rec-size of 1st record is x'003E' = 3*16+14 = 48+14 = 62 The binary rec-size of 2nd record is x'0044' = 4*16+04 = 64+04 = 68

  4. RDW files are commonly used to FTP variable length files from mainframes to Unix/Linux/Windows. Binary mode is required to preserve the record prefixes so the files would still be EBCDIC (vs ASCII shown here).

  5. The data in RDW files starts in the 5th byte (byte 4 zero relative). See 'DELL10' in the 1st record above. The vertical hex display shows the ASCII codes for the zones & digits on the 2 lines below the character line. In horizontal hex these are x'44454C4C3130'. In an EBCDIC file these would be x'C4C5D3D3F1F0'.

  6. You could use uvhd's write command with option 'ta' to translate the data portion to ASCII preserving the binary prefixes. And you could use other options to write out an all text file dropping prefixes & inserting LineFeeds after the last non-blank. Or you could write fixed length records with blank padding to a specified record-size.

  7. The records above are terminated with Carriage-Return + Line-Feed (CR+LF). The CR/LF terminators are redundant here since the RDW record prefixes defines the record size in binary. I wanted to illustrate both RDW and Text file terminators in 1 example. Record terminators are often a problem in FTP transfers since they are not shown by the usual unix/linux editors.

Goto:   Begin this document End this document UVSI Home-Page

uvhdcob = uvhd + COBOL copybook fieldnames

'uvhdcob' is similar to uvhd, but also displays the COBOL copybook fieldnames beside the data file field contents. Here is a sample display, showing copybook fieldnames on left, start/end bytes in center,& data contents on right:


 uvhdcob dat1/vendorpay3 cobol/maps/vendorpay z4  <-- sample command
 ===============================================
 record#    1                 start end typ<------ data ----->
 001 venpay-num                   0   5    DELL10
 002 venpay-type                  6   9     P
 003 venpay-date                 10  19    20100131
 004 venpay-inv                  20  29    INV00010
 005 venpay-amt                  30  38 n  000195000
 006 venpay-item                 40  63    Dell server 2900
 rec#=1 rcount=8 rsize=60 fsize=496 fptr=0
 null=next,r#=rec,s=search,u=update,x=undo,p=print,w=write,v=verify,
 c=chkseq#,t=tally,q=quit,?=help -->

The command line above specifies both the data-file, copybook-file,& file-type. You can specify data-file-name only if you set up a control file to relate the data-file-name to the copybook-file-name.

Links to more information

 http://www.uvsoftware.ca                 - UV Software Home Page
 http://www.uvsoftware.ca/libuvhd.htm     - download uvhd (free)
 http://www.uvsoftware.ca/uvhd.htm        - full documentation for uvhd
 http://www.uvsoftware.ca/uvhd.htm#Part_5 - uvhd tutorials for various filetypes
 http://www.uvsoftware.ca/uvhdcob.htm     - full documentation for uvhdcob
 http://www.uvsoftware.ca/uvintro.htm#G1  - customer list & reference letters
 http://www.uvsoftware.ca/uvprices.htm    - prices & partner agreements
 http://www.uvsoftware.ca/jclcnv1demo.htm - JCL Conversion to Unix/Linux scripts
 http://www.uvsoftware.ca/jclcnv2real.htm - instructions for your conversion vs demos
 http://www.uvsoftware.ca/datacnv1.htm     - DATA conversion pr
 http://www.uvsoftware.ca/uvsort.htm      - uvsort (replaces DFSORT/SYNCSORT)
 http://www.uvsoftware.ca/news/           - all newsletters past & present

I invite your feedback. Let me know if these news letters are useful to you, and any suggestions you may have for improvements.

Thank You, Owen Townsend owen@uvsoftware.ca, www.uvsoftware.ca

Goto:   Begin this document End this document UVSI Home-Page