uCosminexus Service Platform, Basic Development Guide

[Contents][Glossary][Index][Back][Next]

4.5.1 Description format of COBOL Library Text File that can be transformed

This section describes description format of COBOL Library Text File that can be used in function for generating binary format definition file from COBOL Library Text File.

This function considers the usage of COBOL85 language as prerequisite. However, you can use COLBOL Library Text File described according to rules and format explained here. For details on functions and methods of COBOL85 language, see "COBOL85 language".

Organization of this subsection
(1) File format that can be specified
(2) Description rules for COBOL Library Text File
(3) Description format of data item

(1) File format that can be specified

You can specify only fixed format (extension: other than cbf) as the COBOL Library Text File that you can use in this function. File having free format (extension: .cbf) is not supported.

(2) Description rules for COBOL Library Text File

COBOL Library Text File that you can use in this function conforms to the following description rules.

(3) Description format of data item

Description of data items such as alphabets or numbers must conform to the rules described in this point. If rules are not followed, syntax error occurs.

(a) Writing style of data item

Writing style of data item of COBOL is as follows:

Record number {Data name|FILLER}
[{PICTURE|PIC}[IS] character string]
[[USAGE [IS]]{COMPUTATIONAL-3|COMP-3|COMPUTATIONAL|COMP|DISPLAY|NATIONAL}]
[OCCURS integer [TIMES]].
(b) Syntax rules
  1. Level number must be unsigned integer of 1~2 digits and must be in the range of 1~49.
  2. Character count of data name must be in the range of 1~30.
  3. Count of data item and FILLER item must not exceed 32,760.
  4. Integer value that you specify in OCCURS clause must be in the range of 1~2,147,483,647.
  5. In PICTURE clause, you can specify only the contents given in "Table4-6 Characters that you can specify in PICTURE clause".
  6. Regarding the syntax rules of level number, data name, PICTURE clause, USAGE clause and OCCURS clause, rules other than the rules described in syntax rules in 1.~5. Conform to the syntax rules of COBOL85 language.
  7. Syntax rules of USAGE clause are as follows:
  8. You cannot specify USAGE in aggregation item.
    • If you specify DISPLAY, NATIONAL in the numeric value item, it is ignored.
    • If you specify USAGE in other than numeric value item, it is ignored.
    • Data item must comprise of only 1 record (group item of level number 01) and dependent items.
  9. You cannot specify COPY statement.

    Table 4-6 Characters that you can specify in PICTURE clause

    No Data type Character that you can specify in PICTURE clause Fraction part Range of available digits (including fraction part)
    Character Digits count
    1 Alphabet "A" 1 -- 1~2,147,483,647
    2 Alphanumeric "A", "X", "9" 1
    3 Number External decimal format "9" 1 Alphabets from "V" onwards 1~18
    "S", "V" 0
    4 Internal decimal format Similar to external decimal format
    5 Binary format "9" 1 N
    "S" 0
    6 Alphanumeric edition items "A", "X", "9", "B", "0", "/" 1 -- 1~2,147,483,647
    7 Number edition items "B", "/", "Z", "0", "9", ",", ".", "*", "+", "-" currency edition character 1 N 1~249
    "CR", "DB" 2
    "V" 0
    8 Japanese item "N" 2 -- 2~32,766
    9 Japanese edition item "N", "B" 2

    Legend:
    --: Corresponding item does not exist.
    N: Not supported in this function.

Note
Similar to normal COBOL, when "nn" (nn is number in the range of 1~2,147,483,647) is specified immediately after each character, character repetition count is set.
(c) Notes

The currency edition character or edition character such as "Z", or "0" that you specify in PICTURE clause is used only with the purpose of calculating the digits count. Edition function for embedding currency edition character in data item is not supported.