got wrong data while converting Binary data Zoned decimal

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER
Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

Re: got wrong data while converting Binary data Zoned decima

Postby Robert Sample » Mon Sep 30, 2019 11:43 pm

Actually, the lengths should be 10 and 5 -- I was looking at the 14 length you posted and didn't think through the data when posting earlier. A 2-byte binary value will be in the range of either -32768 to 32767 or 0 to 65535 depending on whether the value can be negative or not. A 4-byte binary value range will be -2147483648 to 2147483647 or 0 to 4294967296 depending on whether the value can be negative or not. Hence the 5 or 10 digits of zoned decimal data.


  • Similar Topics
    Replies
    Views
    Last post