Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
COBOL プログラムを Ruby プログラムに変換する新しい冒険を始めています。comp-3/packed decimal 形式を数値に変換する必要があります。
別の以前の投稿から、数値から comp-3 に変換するコードがありますが、逆には変換しません。
COMP-3 は通常、IBM のみのパック 10 進数の方法です。過去に、IBM のパック 10 進数を他の形式に変換する際に問題が発生しました。サイズを一致させるには、通常、目的のサイズを 1 バイトずつパディングする必要があります。
これに役立つ COMP 変換プログラムやユーティリティは知りません。