Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
No calculation is needed to move from comp-3 (packed) to zoned decimal. The number of digits specified in the comp-3 field definition will be moved into a zoned decimal field as long as the number of digits in the receiving field is big enough.
For example (from above) a field of S9(009)V9(2) COMP-3 will "move" 11 digits - the zoned decimal receiving field should be S9(009)V9(2). The difference in the fields will be that one is in character format (easily readable by the eyes) and the other is "packed" which is not easily readable by the eyes until it is shown/viewed in hex.