COBOL と サービス インターフェイスのデータ タイプの対応

どの COBOL データ タイプが、Web サービスや Java サービス インターフェイスなどの利用可能なサービス インターフェイスのデータ タイプに対応するかについて説明します。
表 1. Comp フィールド
COBOL データ項目 インターフェイス フィールドのデフォルト タイプ
使用法 桁数 符号 Web Service Java .NET
comp-1 と comp-2 以外の comp フィールド 1-2 あり byte byte SByte
1-2 なし unsignedByte byte Byte
3-4 あり short short Int16
3-4 なし unsignedShort short UInt16
5-9 あり int int Int32
5-9 なし unsignedInt int UInt32
10-18 あり long long Int64
10-18 なし unsignedLong long UInt64
19+ integer BigInteger Decimal
comp-1 float float Single
comp-2 double double Double
表 2. ディスプレイ フィールドおよび外部浮動小数点フィールド
COBOL データ項目 インターフェイス フィールドのデフォルト タイプ
タイプ 10 進数 Web Service Java .NET
ディスプレイ、外部浮動小数点 0 integer BigInteger Decimal
>0 decimal BigDecimal Decimal
表 3. 英数字フィールドおよび編集された英数字フィールド
COBOL データ項目 インターフェイス フィールドのデフォルト タイプ
タイプ Web Service Java .NET
英数字、編集された英数字 string string string
表 4. ポインター フィールドおよびインデックス フィールド
COBOL データ項目 インターフェイス フィールドのデフォルト タイプ
タイプ Web Service Java .NET
ポインター、インデックス unsignedLong long UInt64