开发者

Is there an existing gem or script that converts comp-3/packed decimal format to number?

开发者 https://www.devze.com 2023-02-13 15:42 出处:网络
I\'m starting a new adventure to convert COBOL program to a Ruby program, I have to convert aa comp-3/packed decimal format to number.

I'm starting a new adventure to convert COBOL program to a Ruby program, I have to convert a a comp-3/packed decimal format to number.

From another pre开发者_运维技巧vious post, there is code that would convert from a number to comp-3, but not the inverse.


COMP-3 is typically an IBM only method of packed decimal. I have had issues in the past converting the packed decimal on IBM to other formats. I would normally have to pad my destination size by a byte to get the sizes to match up.

I'm not aware of any COMP conversion programs or utilities that would help you on this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号