Type COBOL Alphabetic |
DISPLAY |
A |
PIC A(20). |
Chaîne |
Type COBOL AlphaNumeric |
DISPLAY |
X et une combinaison de A, X et 9 |
PIC X(12). |
Chaîne |
Type COBOL Numeric |
COMP-5 ou BINARY, COMP, COMP-4 avec TRUNC(BIN). Lorsque l'option de compilation trunc(bin) est utilisée, la plage possible pour un nombre binaire (binary,
comp, comp-4) est limitée par les capacités de stockage, non par la chaîne image.
Comp-5 est toujours limité par les capacités de stockage. Les capacités de stockage sont déterminées par la taille de la chaîne image. |
S9(1) à S9(4) |
PIC S9 BINARY |
short |
|
|
S9(5) à S9(9) |
PIC S999999 BINARY. |
int |
|
|
S9(10) à S9(18) |
PIC S9999999999 BINARY. |
long |
|
|
9(1) à 9(4) |
PIC 9 BINARY. |
int |
|
|
9(5) à 9(9) |
PIC 999999 BINARY. |
long |
|
|
9(10) à 9(18) |
PIC 9999999999 BINARY. |
BigInteger |
|
|
Comme ci-dessus avec un décimal (V ou P) |
PIC S999V9 BINARY. |
BigDecimal |
|
DISPLAY, COMP-3, PACKED-DECIMAL ou BINARY, COMP, COMP-4
sans TRUNC(BIN) |
S9(1) à S9(4) 9(1) à 9(4) |
|
short |
|
|
S9(5) à S9(9) 9(5) à 9(9) |
|
int |
|
|
S9(10) à S9(18) 9(10) à 9(18) |
|
long |
|
|
Comme ci-dessus avec un décimal (V ou P) |
|
BigDecimal |
|
DISPLAY, COMP-3, PACKED-DECIMAL et ARITH(extend) |
S9(19) à S9(31) 9(19) à 9(31) |
|
BigInteger |
|
DISPLAY, COMP-3, PACKED-DECIMAL et ARITH(extend) |
S9(19) à S9(31) 9(19) à 9(31) et décimal (V ou P). |
|
BigDecimal |
Type COBOL AlphaNumericEdited |
DISPLAY |
A X 9 B 0 / |
|
Chaîne |
Type COBOL NumericEdited |
DISPLAY |
B P V Z 9 0 / , . + - CR DB * cs |
|
Chaîne |
Type COBOL DBCS |
DBCS |
G, B ou N avec DISPLAY-1. |
PIC G(10). |
Chaîne |
Type COBOL InternalFloat |
COMP-1 |
|
|
float |
|
COMP-2 |
|
|
double |
Type COBOL ExternalFloat |
|
+- 9 . V E 9 |
PIC +99V9E99. |
Chaîne |
Level 88 |
|
|
- 05 TXN_Resp_Code PIC X(3)
- 88 Business_Code value "AAA" THRU "XXX"
- 88 Business_Error value "XYX" THRU "ZYX"
- 88 Completed_Code value "COM"
|
L'ID d'accès pour l'élément principal est la méthode get pour chaque
level88. |
COBOL National |
NATIONAL |
PIC N(8) |
|
Chaîne |
|
|
PIC NBN |
|
Chaîne |
|
|
PIC $9.9 |
|
Chaîne |
|
|
PIC +9.9E+99 |
|
Chaîne |
|
|
PIC 999V9 |
|
BigDecimal |
|
|
PIC S999V9 SIGN LEADING SEPARATE |
|
BigDecimal |
|
|
PIC S999V9 SIGN TRAILING SEPARATE |
|
BigDecimal |