4.5.2 Support to data type of COBOL Library Text File and binary format definition file

This section describes the support to data type of COBOL Library Text File before transformation and binary format definition file after transformation.

Organization of this subsection
(1) Support to element name
(2) Support to data type
(3) Support to sign of zone format/pack format numeric value
(4) Method of calculating the size of data type of COBOL

(1) Support to element name

When optional name is set in data item of COBOL, the already set optional name serves as the element name of the binary format definition file. When optional name has not been set, data name of COBOL before transformation as it becomes the element name of the binary format definition file.

For details on setting the optional name in element name, see " 4.5.3(3) Setting up data items".

(2) Support to data type

Following table describes the mapping of data type of COBOL and data type o binary format definition file after transformation.

Table 4-7 Mapping of data type of COBOL and data type of binary format definition file

No.Data type of COBOLData type of binary format definition fileData type in TP1/COBOL adapter
Data typeEmbedded characterXML schema type
1AlphabetCharacter stringSpacestringCharacter string data (string)
2AlphanumericCharacter stringSpacestringCharacter string data (string)
3NumberExternal decimal formatZone format numeric value--decimalDecimal data (BigDecimal)
4Internal decimal formatPack format numeric value--decimalN
5Binary formatWithout decimal pointSigned (unsigned) binary number--integerShort data (Short) ~Long data (Long)
6With decimal pointNDecimal data (BigDecimal)
7External floating decimal pointNN
8Internal floating decimal point4 bytesSingle precision data (Float)
98 bytesDouble precision data (Double)
10Alphanumeric edition itemCharacter stringSpacestringCharacter string data (string)
11Number edition itemCharacter stringSpacestringCharacter string data (string)
12Index data itemNN
13Japanese itemCharacter stringSpacestringCharacter string data (string)
14Japanese edition itemCharacter stringSpacestringCharacter string data (string)
15External bool itemNN
16Internal bool itemNN
Legend:
--: Corresponding item does not exist
X: Not supported in this function

(3) Support to sign of zone format/pack format numeric value

When generating zone format numeric value and pack format numeric value when transforming to data type of binary format definition file, generate when the settings of sign is in "Custom" status and perform settings in the item of simple contents element dialog. Following table describes the contents set in the item of simple contents element dialog.

Table 4-8 Setting contents of attribute

No.AttributeSetting contents
1Settings of signCustom
2Existence of sign
  • When "S" is specified in PICTURE character string: exists
  • In other cases: Do not exist
3Type of signSign bit
4Position of signLater

(4) Method of calculating the size of data type of COBOL

Following table describes the method for calculating size (byte) of data type.

Table 4-9 Method for calculating size of data type

Data type of COBOLSize (byte)
AlphabetDigits count is same.
Alphanumeric
External decimal format
Internal decimal format((Digits count) / 2) + 1
Binary formatCalculate from digits count.
  • In case of 1 digit~4 digits: 2
  • In case of 5 digits~9 digits: 4
  • In case of 10 digits~18 digits: 8
Alphanumeric edition itemDigits count is same.
Number edition item
Japanese item
Japanese edition item