Page 1 of 1

QuikJob - packed to binary

PostPosted: Thu Dec 22, 2016 11:19 am
by kenken1+1
I was trying to multiply a 2-bytes packed value number(INF142-143) with 1 and move it to a 2-bytes binary value area(WST6-7) and the result I got is wrong (see the picture attached).
However, if I move the product to a 2-bytes packed value area(WST8-9), I'll get the correct value.
Can anyone explain why is it so?

Capture.PNG

Re: QuikJob - packed to binary

PostPosted: Thu Dec 22, 2016 1:37 pm
by prino
kenken1+1 wrote:I was trying to multiply a 2-bytes packed value number(INF142-143) with 1 and move it to a 2-bytes binary value area(WST6-7) and the result I got is wrong (see the picture attached).
However, if I move the product to a 2-bytes packed value area(WST8-9), I'll get the correct value.
Can anyone explain why is it so?

It's because ISPF and TSO have absolutely no understanding of packed values!

Re: QuikJob - packed to binary

PostPosted: Thu Dec 22, 2016 4:04 pm
by NicC
Originally posted under TSO & ISPF - hence Prino's post. There is no "Other Programming Languages" section so moved to "All other mainframe topics".