View previous topic :: View next topic
|
Author |
Message |
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi All,
I have a requirement wherein i am changing the BI to ZD. I want to know the relation between the length of input BI and the length of output ZD. |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello Tushar,
Would you kindly give us sample i/p & output? |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi Ekta,
In one of the document, i read that if you have 4 byte BI, that changes to 10 byte ZD. And nowhere the exact relation betwenn the two length was mentioned.
my rquirement is to change the S9(09) Comp to ZD. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Tushar,
What I usually do is use the Windows calculator, set it toHex and enter FF for each binary byte you expect in the I/P. Then set to Dec and count the decimal digits.
Eg., for 2 binary bytes enter FFFF; the decimal result is 65535 (5 digits). |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Thank's Jack. It was really helpful. |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi Jack,
I have a silly question -
a packed decimal is named because of the way the number is stored in the memory. Similarly it goes for binary.
But why the ZD has been named as zoned decimal. Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
In one of the document, i read that if you have 4 byte BI, that changes to 10 byte ZD. And nowhere the exact relation betwenn the two length was mentioned. |
Tushar,
Which sort product are you using (DFSORT = ICE messages or Syncsort = WER messages)? |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi Frank,
I am using ICETOOL. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
But why the ZD has been named as zoned decimal. Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone. |
A ZD value is stored internally like this:
zdzd...sd
By definition, the first nibble (z) of every byte but the last is called a "zone". The first nibble (s) of the last byte is the sign. d is a digit (0-9).
If you want to delve deeper than that, try a google search. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
Zonal/Zoned decimal is a format to use with EBCDIC input and output permitting a sign overpunch in the low order position of the field.
e.g.: + 1234 would be represented as: 1111/0001/1111/0010/1111/0011/1100/0100. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I am using ICETOOL. |
That doesn't tell me which product you're using. You could be using DFSORT's ICETOOL or you could be using Syncsort's SYNCTOOL. PGM=ICETOOL will invoke the one you're using.
Look at the //TOOLMSG output and tell me whether you see ICExxxs messages (e.g. ICE600I) or SYTxxxs messages. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Tushar,
Quote: |
Why we refer to displayable field as zoned decimal.
i am not able to figure any thing out of word zone. |
Once upon a time most data that was processed began life on "punched cards". These cards were 12x80. Ten of the positions were for zero thru nine (0-9). The other 2 were for the "zone punches" - "12-zone" (positive) and the "11-zone" (negative). These 2 were the top 2 on a card. The "sign" for a numeric field was "punched over" the least significant digit (the same way the sign is the high-order nibble of the low-order byte of a zoned-decimal number).
Incidentally, that same 80-column card is why the standard terminal is 80 characters wide. . . |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
and why most (if not all) of the utilities use 80 byte sysin data. |
|
Back to top |
|
|
|