Skip to content

Conversation

@yutaro-sakamoto
Copy link
Contributor

@yutaro-sakamoto yutaro-sakamoto commented Mar 26, 2024

This pull request adds a new option -info-json-dir proposed in #219.
If this option specifies an directory, the compiler writes information of COBOL programs into JSON files in the directory.
The following is an example.

callee.cbl

       IDENTIFICATION   DIVISION.
       PROGRAM-ID.      callee.
       DATA             DIVISION.
       WORKING-STORAGE  SECTION.
       LINKAGE          SECTION.
       01 P1            PIC X ANY LENGTH.
       01 P2            PIC 99.
       PROCEDURE        DIVISION USING P1 P2.
           GOBACK.

the JSON file

{
  "json_format_version": "1.0.0",
  "opensourcecobol4j_version": "1.0.20",
  "program_id": "callee",
  "procedure_division_using_parameters": [
    {
      "name": "P1",
      "type": "String"
    },
    {
      "name": "P2",
      "type": "int"
    }
  ]
}

We should continue to improve this option so that JSON files holds more information of COBOL programs.

@yutaro-sakamoto yutaro-sakamoto merged commit a790f00 into opensourcecobol:develop Mar 27, 2024
@yutaro-sakamoto yutaro-sakamoto deleted the feat/info-json branch June 26, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant