JP5464673B2 - Compilation support device, compilation support method, and program - Google Patents

Compilation support device, compilation support method, and program Download PDF

Info

Publication number
JP5464673B2
JP5464673B2 JP2011181865A JP2011181865A JP5464673B2 JP 5464673 B2 JP5464673 B2 JP 5464673B2 JP 2011181865 A JP2011181865 A JP 2011181865A JP 2011181865 A JP2011181865 A JP 2011181865A JP 5464673 B2 JP5464673 B2 JP 5464673B2
Authority
JP
Japan
Prior art keywords
data
program
line
name
extracted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011181865A
Other languages
Japanese (ja)
Other versions
JP2013045247A (en
Inventor
一人 長井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC System Technologies Ltd
Original Assignee
NEC System Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC System Technologies Ltd filed Critical NEC System Technologies Ltd
Priority to JP2011181865A priority Critical patent/JP5464673B2/en
Publication of JP2013045247A publication Critical patent/JP2013045247A/en
Application granted granted Critical
Publication of JP5464673B2 publication Critical patent/JP5464673B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Description

本発明は、コンパイルされたプログラム間の連絡に用いられる引数の適合性を判定するための、コンパイル支援装置、コンパイル支援方法、及びこれらを実現するためのプログラムに関する。   The present invention relates to a compile support apparatus, a compile support method, and a program for realizing these, for determining suitability of arguments used for communication between compiled programs.

COBOL言語には、事務処理を行なう上で欠かせない機能が数多く備えられており、COBOL言語を用いれば、事務処理系のプログラムを効率良く開発できる。このため、ソフトウェア市場における開発言語において、COBOL言語のシェアは、今なお約20%を占めている。   The COBOL language is provided with a number of functions that are indispensable for carrying out paperwork. By using the COBOL language, a paperwork system program can be developed efficiently. For this reason, the share of the COBOL language in the development language in the software market still occupies about 20%.

一方、近年、企業等においては、COBOL言語で構築されたレガシーシステムをオープンシステムへ移行するレガシーマイグレーションが盛んに行われている。このレガシーマイグレーションの実行方法の一つとしては、過去のCOBOL資産を流用せず、JAVA(登録商標)等のオープン系技術を使って全面的に再構築することが提案されているが、この場合は、膨大な開発期間とコストとが必要になる。   On the other hand, in recent years, in companies and the like, legacy migration for migrating a legacy system constructed in the COBOL language to an open system has been actively performed. As one method of executing this legacy migration, it has been proposed to completely reconstruct the system using open technology such as JAVA (registered trademark) without diverting past COBOL assets. Requires a huge development period and cost.

このため、COBOLコンパイラを用いて、COBOL言語で記述されたソースコード(以下「COBOLプログラム」とも言う。)を、オープンシステム上で実行可能なコードに書き換えることに注目が集まっている(例えば、特許文献1参照。)。   For this reason, attention has been focused on rewriting source code written in the COBOL language (hereinafter also referred to as “COBOL program”) into code executable on an open system using a COBOL compiler (for example, patents). Reference 1).

特開2010−086218号公報JP 2010-086218 A

しかしながら、ハードウェア及びOSのアーキテクチャにおいて、COBOL製品には、固有仕様が存在するため、コンパイル後の検証において多大な工数が必要となる場合がある。   However, in the hardware and OS architecture, since the COBOL product has a specific specification, a large amount of man-hour may be required for verification after compilation.

具体的には、コンパイル時に得られるリポジトリ情報は、集団項目に従属するデータ項目の定義を含まないため、通常、COBOLコンパイラによって、コンパイル時に、プログラム間連絡における引数の適合の有無を自動的に検出することは困難である。この結果、適切な引数が設定されているかどうかは、人的手段による検証によって行なわなければならず、多大な工数が必要となる。   Specifically, since the repository information obtained at compile time does not include the definition of data items subordinate to the group item, the COBOL compiler usually automatically detects whether or not the arguments are compatible during inter-program communication at compile time. It is difficult to do. As a result, whether or not an appropriate argument is set must be verified by human means, which requires a great deal of man-hours.

本発明の目的の一例は、上記問題を解消し、プログラム間連絡時の引数が、集団項目に従属するデータ項目に記述されている場合であっても、プログラム間におけるデータの不適合を自動的に検出し得る、コンパイル支援装置、コンパイル支援方法、及びプログラムを提供することにある。   An example of the object of the present invention is to solve the above-mentioned problem, and automatically incompatibility of data between programs even when an argument at the time of communication between programs is described in a data item subordinate to a group item. A compiling support apparatus, a compiling support method, and a program that can be detected.

上記目的を達成するため、本発明の一側面におけるコンパイル支援装置は、COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、装置であって、
データ属性検証部を備え、
前記データ属性検証部は、
前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定し、
特定した行からデータ名及びデータ属性を取り出し、
特定した行が集団項目に属する場合は、特定した行以降の同じ前記集団項目に属する行についても、データ名及びデータ属性を取り出し、
そして、前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が取り出した前記データ属性と一致しているかどうかを判定し、
判定の結果、一致していない場合に、そのことを示すフラグを設定する、
ことを特徴とする。
In order to achieve the above object, a compile support apparatus according to one aspect of the present invention adapts arguments between the first program written in the COBOL language and the second program called by the first program. An apparatus for determining the presence or absence of
A data attribute verification unit,
The data attribute verification unit
From the second data map list obtained by compiling the second program, specify a line including the same data name as the argument data name of the second program,
Extract the data name and data attribute from the specified line,
When the specified row belongs to the group item, the data name and the data attribute are extracted for the rows belonging to the same group item after the specified row,
Then, in the first data map list obtained by compiling the first program, in the line having the same data name as the extracted data name, the data attribute of the line is identical to the extracted data attribute. To determine whether or not
As a result of determination, if they do not match, set a flag to indicate that,
It is characterized by that.

また、上記目的を達成するため、本発明の一側面におけるコンパイル支援方法は、COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、方法であって、
(a)前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を有することを特徴とする。
In order to achieve the above object, a compile support method according to one aspect of the present invention includes an argument between a first program written in a COBOL language and a second program called by the first program. A method for determining the presence or absence of conformity of
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program;
(B) extracting a data name and a data attribute from the line specified in the step (a);
(C) If the line specified in the step (a) belongs to a group item, a data name and a data attribute are extracted for lines belonging to the same group item after the specified line;
(D) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c), and if the result of the determination does not match, a flag indicating that is set Step,
It is characterized by having.

更に、上記目的を達成するため、本発明の一側面におけるプログラムは、COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を、コンピュータによって判定するための、プログラムであって、
前記コンピュータに、
(a)前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を実行させることを特徴とする。
Furthermore, in order to achieve the above object, a program according to one aspect of the present invention is an adaptation of arguments between a first program written in the COBOL language and a second program called thereby. A program for determining whether or not there is a computer,
In the computer,
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program;
(B) extracting a data name and a data attribute from the line specified in the step (a);
(C) If the line specified in the step (a) belongs to a group item, a data name and a data attribute are extracted for lines belonging to the same group item after the specified line;
(D) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c), and if the result of the determination does not match, a flag indicating that is set Step,
Is executed.

以上のように本発明によれば、プログラム間連絡時の引数が、集団項目に従属するデータ項目に記述されている場合であっても、プログラム間におけるデータの不適合を自動的に検出することができる。   As described above, according to the present invention, it is possible to automatically detect data incompatibility between programs even when an argument at the time of communication between programs is described in a data item subordinate to a group item. it can.

図1は、本発明の実施の形態におけるコンパイル支援装置の構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a compile support apparatus according to an embodiment of the present invention. 図2は、本発明の実施の形態において用いられるリポジトリ情報の一例を示す図である。FIG. 2 is a diagram showing an example of repository information used in the embodiment of the present invention. 図3は、本発明の実施の形態におけるコンパイル支援装置の動作を示すフロー図である。FIG. 3 is a flowchart showing the operation of the compilation support apparatus according to the embodiment of the present invention. 図4は、本発明の実施の形態において作成されるプログラム関係情報の一例を示す図である。FIG. 4 is a diagram showing an example of the program related information created in the embodiment of the present invention. 図5は、本発明の実施の形態において得られる検証結果の一例を示す図である。FIG. 5 is a diagram showing an example of the verification result obtained in the embodiment of the present invention. 図6は、本発明の実施の形態において表示装置に表示される画面の一例を示す図である。FIG. 6 is a diagram showing an example of a screen displayed on the display device in the embodiment of the present invention. 図7は、本発明の実施の形態におけるコンパイル支援装置を実現するコンピュータの一例を示すブロック図である。FIG. 7 is a block diagram illustrating an example of a computer that implements the compilation support apparatus according to the embodiment of the present invention.

(実施の形態)
以下、本発明の実施の形態における、コンパイル支援装置、コンパイル支援方法、及びプログラムについて、図1〜図7を参照しながら説明する。
(Embodiment)
Hereinafter, a compile support apparatus, a compile support method, and a program according to an embodiment of the present invention will be described with reference to FIGS.

[装置構成]
最初に、本発明の実施の形態におけるコンパイル支援装置の構成について図1を用いて説明する。図1は、本発明の実施の形態におけるコンパイル支援装置の構成を示すブロック図である。
[Device configuration]
First, the configuration of the compile support apparatus according to the embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of a compile support apparatus according to an embodiment of the present invention.

図1に示す本実施の形態におけるコンパイル支援装置31は、COBOL言語で記述されたプログラムと、それによって呼び出されるプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための装置である。   A compile support apparatus 31 according to the present embodiment shown in FIG. 1 is an apparatus for determining whether or not there is an argument match between a program written in the COBOL language and a program called by the COBOL language. is there.

以降の説明において、COBOL言語で記述されたプログラムは「COBOLプログラム」と表記する。また、他のプログラムを呼び出すプログラムを「呼出し元プログラム」と表記する場合がある。更に、呼出し元プログラムによって読み出されるプログラムを「呼出し先プログラム」と表記する場合もある。   In the following description, a program written in the COBOL language is referred to as a “COBOL program”. A program that calls another program may be referred to as a “calling source program”. Further, a program read by the calling source program may be referred to as a “call destination program”.

図1に示すように、コンパイル支援装置31は、データ属性検証部312を備えている。データ属性検証部312は、まず、呼出し先プログラムをコンパイルして得られたデータマップリスト(以下、「呼出し先データマップリスト」と表記する。)の中から、呼出し先プログラムの引数のデータ名と同一のデータ名を含む行を特定する。   As illustrated in FIG. 1, the compile support apparatus 31 includes a data attribute verification unit 312. First, the data attribute verification unit 312 selects the data name of the argument of the call destination program from the data map list obtained by compiling the call destination program (hereinafter referred to as “call destination data map list”). Identify lines that contain the same data name.

次いで、特定した行からデータ名及びデータ属性を取り出す。更に、データ属性検証部312は、特定した行が集団項目に属する場合は、呼出し先データマップリストにおいて、特定した行以降の同じ集団項目に属する行についても、データ名及びデータ属性を取り出す。このとき、取り出されたデータ名とデータ属性とは、行毎に管理される。   Next, a data name and a data attribute are extracted from the identified line. Furthermore, when the specified row belongs to the group item, the data attribute verification unit 312 extracts the data name and the data attribute for the rows belonging to the same group item after the specified row in the call destination data map list. At this time, the extracted data name and data attribute are managed for each row.

そして、データ属性検証部312は、呼出し元プログラムをコンパイルして得られたデータマップリスト(以下、「呼出し元データマップリスト」と表記する。)中の、先に取り出したいずれかのデータ名とデータ名が同一の行を特定する。更に、データ属性検証部312は、特定した行のデータ属性が、先に取り出したデータ名と同じ行から取り出されたデータ属性と一致しているかどうかを判定する。   The data attribute verification unit 312 then selects any one of the data names previously extracted from the data map list (hereinafter referred to as “calling data map list”) obtained by compiling the calling program. Identify lines with the same data name. Further, the data attribute verification unit 312 determines whether or not the data attribute of the identified line matches the data attribute extracted from the same line as the previously extracted data name.

その後、判定の結果、一致していない場合は、データ属性検証部312は、そのことを示すフラグを設定する。本実施の形態において、フラグは、呼出し元データマップリストから取り出され、且つ判定の対象となったデータ名及びデータ属性に対して設定される。   After that, if the result of determination is that they do not match, the data attribute verification unit 312 sets a flag indicating that fact. In the present embodiment, the flag is set for the data name and the data attribute that are extracted from the caller data map list and are the objects of determination.

このように、本実施の形態では、呼出し先プログラムにおいて、引数が記述されているデータ項目が集団項目である場合は、その下位に従属するデータ項目についても、データ属性の検証対象となる。よって、本実施の形態によれば、プログラム間連絡時の引数が、集団項目に従属するデータ項目に記述されている場合であっても、プログラム間におけるデータの不適合が自動的に検出される。   Thus, in this embodiment, when the data item in which the argument is described is a group item in the called program, the data item subordinate to the data item is also subject to data attribute verification. Therefore, according to the present embodiment, even when the argument at the time of communication between programs is described in a data item subordinate to the group item, incompatibility of data between programs is automatically detected.

ここで、本実施の形態におけるコンパイル支援装置31の構成を更に具体的に説明する。図1に示すように、本実施の形態では、COBOLプログラムA11とCOBOLプログラムB21とが、データ属性の検証対象となり、これらのうち一方が、呼出し元プログラムとなり、他方が呼出し先プログラムになるとする。COBOLプログラムA11とCOBOLプログラムB21とは、COBOLコンパイラ12によってコンパイルされる。   Here, the configuration of the compile support apparatus 31 in the present embodiment will be described more specifically. As shown in FIG. 1, in this embodiment, it is assumed that the COBOL program A11 and the COBOL program B21 are data attribute verification targets, one of which is a call source program and the other is a call destination program. The COBOL program A11 and the COBOL program B21 are compiled by the COBOL compiler 12.

具体的には、COBOLコンパイラ12は、COBOLプログラムA11を入力として、目的プログラムA13と、データマップリストA14と、リポジトリ情報A15とを出力する。同様に、COBOLコンパイラ12は、COBOLプログラムB21を入力として、目的プログラムB23と、データマップリストB24と、リポジトリ情報B25とを出力する。   Specifically, the COBOL compiler 12 receives the COBOL program A11 and outputs a target program A13, a data map list A14, and repository information A15. Similarly, the COBOL compiler 12 receives the COBOL program B21 and outputs a target program B23, a data map list B24, and repository information B25.

データマップリストA14、及びデータマップリストB24は、それぞれ、対応するCOBOLプログラムの行毎に、レベル番号、データ名、データ属性、項目長、相対アドレスといった識別情報を有している。   Each of the data map list A14 and the data map list B24 has identification information such as a level number, a data name, a data attribute, an item length, and a relative address for each corresponding COBOL program line.

また、リポジトリ情報A15、及びリポジトリ情報B25は、それぞれ、図2に示すリポジトリ情報32と同様に、多数の要素情報を有している。図2は、本発明の実施の形態において用いられるリポジトリ情報の一例を示す図である。   Further, each of the repository information A15 and the repository information B25 has a lot of element information, like the repository information 32 shown in FIG. FIG. 2 is a diagram showing an example of repository information used in the embodiment of the present invention.

図2に示すように、リポジトリ情報32は、それが付随しているCOBOLプログラム、言い換えると、リポジトリ情報32によって呼び出されるプログラム(以下、「呼び出されるプログラム」と表記する。)の情報321を含む。即ち、リポジトリ情報32が、リポジトリ情報A15であれば、呼び出されるプログラムは、COBOLプログラムAとなる。また、リポジトリ情報32は、それが付随しているCOBOLプログラムが呼び出すプログラム(以下、「呼び出すプログラム」と表記する。)の情報の個数322と、「呼び出すプログラム」の情報323とを更に含む。   As shown in FIG. 2, the repository information 32 includes information 321 of a COBOL program accompanied by the repository information, in other words, a program called by the repository information 32 (hereinafter referred to as “called program”). That is, if the repository information 32 is the repository information A15, the called program is the COBOL program A. The repository information 32 further includes a number 322 of information of programs called by the COBOL program accompanied by the repository information (hereinafter referred to as “calling programs”) and information 323 of “calling programs”.

呼び出されるプログラムの情報321は、COBOLコンパイラ12によって、COBOLプログラムの手続き部と連絡節との記述内容に基づいて設定される。呼び出されるプログラムの情報は、プログラム名3211、引数の個数3212、引数のデータ名3214、引数のデータ属性3215、引数のデータ項目長3216を含む。   The information 321 of the program to be called is set by the COBOL compiler 12 based on the description contents of the procedure section and the link section of the COBOL program. The information of the called program includes a program name 3211, the number of arguments 3212, an argument data name 3214, an argument data attribute 3215, and an argument data item length 3216.

呼び出すプログラムの情報323は、呼び出すプログラムの個数322が0(ゼロ)より大きい場合に、COBOLコンパイラ12によって、COBOLプログラム(呼び出されるプログラム)のCALL文の引数の記述内容に基づいて、設定される。呼び出すプログラムの情報323は、プログラム名3231、引数の個数3232、引数のデータ名3234、引数のデータ属性3235、引数のデータ項目長3236を含む。   The information 323 of the program to be called is set by the COBOL compiler 12 based on the description contents of the CALL statement of the COBOL program (called program) when the number 322 of the programs to be called is larger than 0 (zero). The program information 323 to be called includes a program name 3231, the number of arguments 3232, an argument data name 3234, an argument data attribute 3235, and an argument data item length 3236.

また、図1に示すように、本実施の形態では、コンパイル支援装置31は、データ属性検証部311に加えて、リポジトリ情報照合部311と、データ表示部313とを備えている。また、コンパイル支援装置31には、液晶表示装置等のディスプレイ装置40が接続されている。   As shown in FIG. 1, in this embodiment, the compile support apparatus 31 includes a repository information matching unit 311 and a data display unit 313 in addition to the data attribute verification unit 311. Further, a display device 40 such as a liquid crystal display device is connected to the compilation support device 31.

リポジトリ情報照合部311は、コンパイルが実行された複数のプログラムを対象にして、コンパイルによって得られた、複数のプログラムそれぞれのリポジトリ情報に基づいて、呼出し元プログラムと呼出し先プログラムとを特定する。   The repository information matching unit 311 specifies a call source program and a call destination program based on repository information of each of the plurality of programs obtained by compiling for a plurality of programs that have been compiled.

具体的には、本実施の形態では、リポジトリ情報照合部311は、各プログラムの図2に示したリポジトリ情報32を用いて、呼出し元プログラムと呼出し先プログラムとが特定されたプログラム関係情報を作成し、これをデータ属性検証部312に出力する。データ属性検証部312は、プログラム関係情報を用いて、データ属性の検証を実行する。プログラム関係情報の具体例については、図4を用いて後述する。   Specifically, in the present embodiment, the repository information collating unit 311 creates program relation information in which the calling source program and the called destination program are specified using the repository information 32 shown in FIG. 2 of each program. This is output to the data attribute verification unit 312. The data attribute verification unit 312 performs verification of the data attribute using the program related information. A specific example of the program related information will be described later with reference to FIG.

また、本実施の形態では、データ属性検証部312は、呼出し先データマップリストの中から特定した行と、特定した行以降の同じ集団項目に属する行とから、データ名及びデータ属性に加えて、データ項目長を更に取り出すことができる。   In the present embodiment, the data attribute verification unit 312 adds the data name and data attribute from the line specified in the callee data map list and the lines belonging to the same group item after the specified line. The data item length can be further extracted.

この場合、データ属性検証部312は、呼出し元データマップリスト中の、先に取り出したいずれかのデータ名とデータ名が同一の行において、当該行のデータ項目長が、先に取り出したデータ名と同じ行から取り出されたデータ項目長と一致しているかどうかも判定する。また、データ属性検証部312は、データ項目長についての判定の結果、データ項目長が一致しない場合も、そのことを示すフラグを設定する。   In this case, the data attribute verification unit 312 determines that the data item length of the row is the data name extracted first in the row where the data name is the same as any of the previously extracted data names in the caller data map list. It is also determined whether it matches the data item length retrieved from the same line. The data attribute verification unit 312 also sets a flag indicating that the data item length does not match as a result of the determination on the data item length.

更に、本実施の形態では、データ属性検証部312は、検証の結果を「検証結果」としてまとめる。検証結果には、呼出し元データマップリストから取り出された、データ名、データ属性、及びデータ項目長に加え、設定された各種フラグも記述されている。検証結果の具体例については、図5を用いて後述する。   Furthermore, in the present embodiment, the data attribute verification unit 312 summarizes the verification results as “verification results”. In the verification result, in addition to the data name, data attribute, and data item length extracted from the caller data map list, various set flags are also described. A specific example of the verification result will be described later with reference to FIG.

また、データ表示部313は、呼出し元データマップリストの全部又は一部と、呼出し先データマップリストの全部又は一部と、フラグの設定状況とを、表示装置40の画面41に表示する。表示される画面41の具体例については、図6を用いて後述する。   Further, the data display unit 313 displays all or part of the call source data map list, all or part of the call destination data map list, and the flag setting status on the screen 41 of the display device 40. A specific example of the displayed screen 41 will be described later with reference to FIG.

[装置動作]
次に、本発明の実施の形態におけるコンパイル支援装置31の動作について図3を用いて説明する。図3は、本発明の実施の形態におけるコンパイル支援装置の動作を示すフロー図である。以下の説明においては、適宜図1及び図2を参酌する。また、本実施の形態では、コンパイル支援装置31を動作させることによって、コンパイル支援方法が実施される。よって、本実施の形態におけるコンパイル支援方法の説明は、以下のコンパイル支援装置31の動作説明に代える。
[Device operation]
Next, the operation of the compile support apparatus 31 in the embodiment of the present invention will be described with reference to FIG. FIG. 3 is a flowchart showing the operation of the compilation support apparatus according to the embodiment of the present invention. In the following description, FIGS. 1 and 2 are referred to as appropriate. In the present embodiment, the compile support method is implemented by operating the compile support apparatus 31. Therefore, the description of the compile support method in the present embodiment is replaced with the following description of the operation of the compile support apparatus 31.

図3に示すように、最初に、リポジトリ情報照合部311が、コンパイルによって得られた各プログラムのリポジトリ情報に基づいて、呼出し元プログラムと呼出し先プログラムとを特定し、プログラム関係情報を作成する(ステップA1)。   As shown in FIG. 3, first, the repository information matching unit 311 identifies a call source program and a call destination program based on the repository information of each program obtained by compilation, and creates program related information ( Step A1).

本実施の形態では、リポジトリ情報照合部311は、リポジトリ情報A15と、リポジトリ情報B25とを入力として、COBOLプログラムA11とCOBOLプログラムB21との間に、プログラム間連絡の関係があるかどうかを判定する。そして、リポジトリ情報照合部311は、判定結果をプログラム関係情報として、データ属性検証部312に出力する。   In the present embodiment, the repository information matching unit 311 receives the repository information A15 and the repository information B25 as input, and determines whether there is a communication relationship between programs between the COBOL program A11 and the COBOL program B21. . Then, the repository information matching unit 311 outputs the determination result to the data attribute verification unit 312 as program related information.

具体的には、リポジトリ情報照合部311は、リポジトリ情報A15内の呼び出されるプログラムの情報321のプログラム名3211が「COBOLプログラムA」となり、リポジトリ情報B25内の呼び出すプログラムの情報323のプログラム名3231が「COBOLプログラムA」となっているかどうかを判定する。   Specifically, the repository information collating unit 311 sets the program name 3211 of the called program information 321 in the repository information A15 to be “COBOL program A”, and the program name 3231 of the called program information 323 in the repository information B25. It is determined whether or not “COBOL program A” is set.

または、リポジトリ情報照合部311は、リポジトリ情報A15内の呼び出すプログラムの情報323のプログラム名3231が「COBOLプログラムB」となり、リポジトリ情報B25内の呼び出されるプログラムの情報321のプログラム名3211が「COBOLプログラムB」となっているかどうかを判定する。   Alternatively, the repository information matching unit 311 sets the program name 3231 of the program information 323 to be called in the repository information A15 to be “COBOL program B”, and the program name 3211 of the information 321 of the program to be called in the repository information B25 to be “COBOL program”. B ”is determined.

そして、判定の結果、イエスである場合は、リポジトリ情報照合部311は、COBOLプログラムAとCOBOLプログラムBとの間には、プログラム間連絡の関係があると判断する。この場合、リポジトリ情報照合部311は、呼出し元プログラムと呼出し先プログラムとを特定し、特定結果に基づいて、図4に示すプログラム関係情報314を作成し、これを出力する。一方、判定の結果、ノーである場合は、リポジトリ情報照合部311は、プログラム間連絡の関係がないと判断する。   If the determination result is YES, the repository information matching unit 311 determines that there is an inter-program communication relationship between the COBOL program A and the COBOL program B. In this case, the repository information matching unit 311 identifies the call source program and the call destination program, creates the program relation information 314 shown in FIG. 4 based on the identification result, and outputs this. On the other hand, if the result of determination is NO, the repository information matching unit 311 determines that there is no inter-program communication relationship.

図4は、本発明の実施の形態において作成されるプログラム関係情報の一例を示す図である。図4に示すように、リポジトリ情報照合部311は、呼出し元プログラムのリポジトリ情報32における、呼び出されるプログラムの情報321を、プログラム関係情報314の呼出し元プログラムの情報332として設定する。   FIG. 4 is a diagram showing an example of the program related information created in the embodiment of the present invention. As illustrated in FIG. 4, the repository information matching unit 311 sets the information 321 of the called program in the repository information 32 of the calling source program as the calling source program information 332 of the program related information 314.

また、リポジトリ情報照合部311は、呼出し元プログラムのリポジトリ情報32に含まれる「呼び出すプログラムの情報」323のうち、プログラム名が呼出し先プログラムのそれと一致している情報を特定する。そして、図4に示すように、リポジトリ情報照合部311は、特定した情報の数を、呼出し先プログラムの個数334に設定する。更に、リポジトリ情報照合部311は、呼出し先プログラムの情報335には、この特定した情報を設定する。   Further, the repository information matching unit 311 identifies information whose program name matches that of the called program among “information of the calling program” 323 included in the repository information 32 of the calling source program. Then, as illustrated in FIG. 4, the repository information matching unit 311 sets the number of specified information as the number 334 of the called programs. Further, the repository information matching unit 311 sets the specified information in the information 335 of the called program.

また、図4に示すように、リポジトリ情報照合部311は、呼出し元プログラムのデータマップリストを特定し、その名称を呼出し元プログラムのデータマップ名331に設定する。更に、リポジトリ情報照合部311は、呼出し先プログラムのデータマップリストを特定し、その名称を、呼び出し先プログラムのデータマップリスト名333に設定する。   As shown in FIG. 4, the repository information matching unit 311 identifies the data map list of the calling source program and sets the name to the data map name 331 of the calling source program. Further, the repository information matching unit 311 identifies the data map list of the called program, and sets the name in the data map list name 333 of the called program.

次に、ステップA1の実行後、データ属性検証部312は、プログラム関係情報314内の呼出し元プログラムの引数の個数3322が0(ゼロ)でないことを確認する。なお、0の場合は、データ属性検証部312は、処理を終了する。   Next, after the execution of step A1, the data attribute verification unit 312 confirms that the number 3322 of arguments of the calling source program in the program related information 314 is not 0 (zero). In the case of 0, the data attribute verification unit 312 ends the process.

そして、データ属性検証部312は、0でないことを確認すると、呼出し先プログラムのデータマップリスト名333に記述されたデータマップリストから、呼出し先プログラムの情報335に含まれる引数のデータ名3354にデータ名が一致している行を特定する(ステップA2)。   When the data attribute verification unit 312 confirms that it is not 0, data is transferred from the data map list described in the data map list name 333 of the call destination program to the data name 3354 of the argument included in the information 335 of the call destination program. A line having a matching name is specified (step A2).

次に、データ属性検証部312は、特定した行から、レベル番号3152、データ名3153、データ属性3154、及びデータ項目長3155を抽出する(ステップA3)。そして、データ属性検証部312は、抽出した情報を用いて、図5に示す検証結果315を作成する。図5は、本発明の実施の形態において得られる検証結果の一例を示す図である。   Next, the data attribute verification unit 312 extracts the level number 3152, the data name 3153, the data attribute 3154, and the data item length 3155 from the specified row (step A3). And the data attribute verification part 312 produces the verification result 315 shown in FIG. 5 using the extracted information. FIG. 5 is a diagram showing an example of the verification result obtained in the embodiment of the present invention.

次に、データ属性検証部312は、ステップA2で特定した行が集団項目に属しているかどかを、ステップA3で抽出されたレベル番号3152(図5参照)を用いて判定する(ステップA4)。ステップA4の判定の結果、ステップA2で特定した行が集団項目に属していない場合は、データ属性検証部312は、ステップA6を実行する。一方、ステップA4の判定の結果、ステップA2で特定した行が集団項目に属している場合は、データ属性検証部312は、ステップA5を実行する。   Next, the data attribute verification unit 312 determines whether the row specified in step A2 belongs to the group item using the level number 3152 (see FIG. 5) extracted in step A3 (step A4). As a result of the determination in step A4, when the line specified in step A2 does not belong to the group item, the data attribute verification unit 312 executes step A6. On the other hand, as a result of the determination in step A4, if the row specified in step A2 belongs to the group item, the data attribute verification unit 312 executes step A5.

ステップA5では、データ属性検証部312は、ステップA2で特定した行に対して下位に位置する行から、レベル番号3152、データ名3153、データ属性3154、及びデータ項目長3155の抽出を実行する(ステップA5)。また、データ属性検証部312は、ステップA5で抽出した情報も、図5に示す検証結果315に記述する。   In step A5, the data attribute verification unit 312 performs extraction of the level number 3152, the data name 3153, the data attribute 3154, and the data item length 3155 from the row positioned lower than the row specified in step A2 ( Step A5). The data attribute verification unit 312 also describes the information extracted in step A5 in the verification result 315 shown in FIG.

そして、データ属性検証部312は、ステップA3で抽出したレベル番号と同じレベル番号3152が出現するまで、又は、空行が出現するまで、ステップA5を実行する。また、本実施の形態では、データ属性検証部312は、ステップA2〜A5の処理を、呼出し先プログラムの個数334の数だけ繰り返し実行する。   Then, the data attribute verification unit 312 executes Step A5 until a level number 3152 that is the same as the level number extracted in Step A3 appears or a blank line appears. In the present embodiment, the data attribute verification unit 312 repeatedly executes the processing of steps A2 to A5 by the number of called programs 334.

次に、データ属性検証部312は、図5に示す検証結果315と、図4に示す呼び出し元プログラムのデータマップリスト名331に記述されているデータマップリストとを用いて、データ属性について検証を行なう(ステップA6)。   Next, the data attribute verification unit 312 verifies the data attribute using the verification result 315 shown in FIG. 5 and the data map list described in the data map list name 331 of the calling program shown in FIG. Perform (Step A6).

具体的には、ステップA6では、データ属性検証部312は、検証結果315と呼出し元データマップリストとを、データ名が一致する行において比較し、検証結果315におけるデータ属性3154が、呼出し元データマップリストにおけるデータ属性と相違しているかどうかを判断する。そして、データ属性検証部312は、相違している場合は、検証結果315において、フラグ3151を「1」に設定する。   Specifically, in step A6, the data attribute verification unit 312 compares the verification result 315 with the caller data map list in the line where the data name matches, and the data attribute 3154 in the verification result 315 indicates that the caller data Determine if it is different from the data attribute in the map list. If they are different, the data attribute verification unit 312 sets the flag 3151 to “1” in the verification result 315.

次に、データ属性検証部312は、図5に示す検証結果315と、図4に示す呼び出し元プログラムのデータマップリスト名331に記述されているデータマップリストとを用いて、データ項目長について検証を行なう(ステップA7)。   Next, the data attribute verification unit 312 verifies the data item length using the verification result 315 shown in FIG. 5 and the data map list described in the data map list name 331 of the calling program shown in FIG. (Step A7).

具体的には、ステップA6では、データ属性検証部312は、検証結果315と呼出し元データマップリストとを、データ名が一致する行において比較し、検証結果315におけるデータ項目長3155が、呼出し元データマップリストにおけるデータ項目長と相違しているかどうかを判断する。そして、データ属性検証部312は、相違している場合は、検証結果315において、フラグ3151を「2」に設定する。なお、データ属性検証部312は、図5の例では、検証結果315において、ステップA6及びA7のいずれにも該当しない行に対しては、「0(ゼロ)」を設定する。   Specifically, in step A6, the data attribute verification unit 312 compares the verification result 315 with the caller data map list in the line where the data name matches, and the data item length 3155 in the verification result 315 is the caller. Determine whether the data item length in the data map list is different. If there is a difference, the data attribute verification unit 312 sets the flag 3151 to “2” in the verification result 315. In the example of FIG. 5, the data attribute verification unit 312 sets “0 (zero)” to a row that does not correspond to any of steps A6 and A7 in the verification result 315.

ところで、ステップA6に加えて、ステップA7が実行されるのは、以下の理由による。まず、データ属性3154がポインタデータ項目の場合は、システムが32ビット及び64ビットのいずれであるかによってデータ項目長が相違する。そのため、COBOLプログラマは、REDEFINES句によってデータ領域を再定義する場合等において、データ項目長に基づいて、データ割付境界、及び集団項目の長さを考慮する必要があるが、「2」のフラグを設定することにより、COBOLプログラムにおける考慮が容易となる。   Incidentally, step A7 is executed in addition to step A6 for the following reason. First, when the data attribute 3154 is a pointer data item, the data item length differs depending on whether the system is 32-bit or 64-bit. Therefore, the COBOL programmer needs to consider the data allocation boundary and the length of the group item based on the data item length when redefining the data area by the REDEFINES clause. However, the flag “2” is set. By setting, it becomes easy to consider in the COBOL program.

次に、データ表示部313は、データ属性検証部312による検証結果を表示装置40の画面に表示する(ステップA8)。ステップA8の実行により、コンパイル支援装置31における処理は一旦終了する。   Next, the data display unit 313 displays the verification result by the data attribute verification unit 312 on the screen of the display device 40 (step A8). By executing step A8, the processing in the compilation support apparatus 31 is temporarily terminated.

具体的には、図6に示すように、データ表示部313は、プログラム間連絡時の呼出し先の引数のデータマップと呼出し元の引数のデータマップとを、対照的に表示装置40の画面41に表示する。また、図6の例では、データ表示部313は、検証結果315のフラグ3151が「1」のときは、該当する行を罫線で囲んで表示する。更に、データ表示部313は、検証結果315のフラグ3151が「2」のときは、該当する行の先頭にマークを表示する。   Specifically, as shown in FIG. 6, the data display unit 313 contrasts the call destination argument data map and the call source argument data map at the time of inter-program communication with the screen 41 of the display device 40. To display. In the example of FIG. 6, when the flag 3151 of the verification result 315 is “1”, the data display unit 313 displays the corresponding line surrounded by a ruled line. Further, when the flag 3151 of the verification result 315 is “2”, the data display unit 313 displays a mark at the head of the corresponding line.

本実施の形態におけるプログラムは、コンピュータに、図3に示すステップA1〜A8を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態におけるコンパイル支援装置31とコンパイル支援方法とを実現することができる。この場合、コンピュータのCPU(Central Processing Unit)は、リポジトリ情報照合部311、データ属性検証部312、及びデータ表示部313として機能し、処理を行なう。また、本実施の形態では、プログラム関係情報(図4参照)、検証結果(図5)は、コンピュータに備えられた、メモリ、ハードディスク等の記憶装置に、格納される。   The program in the present embodiment may be a program that causes a computer to execute steps A1 to A8 shown in FIG. By installing and executing this program in a computer, the compile support apparatus 31 and the compile support method in the present embodiment can be realized. In this case, a CPU (Central Processing Unit) of the computer functions as a repository information matching unit 311, a data attribute verification unit 312, and a data display unit 313 to perform processing. In this embodiment, the program related information (see FIG. 4) and the verification result (FIG. 5) are stored in a storage device such as a memory or a hard disk provided in the computer.

以上のように、本実施の形態によれば、プログラム間連絡時の引数が、集団項目に従属するデータ項目に記述されている場合であっても、プログラム間におけるデータの不適合が自動的に検出される。結果、COBOL資産をオープン環境へ移行する場合の人的手段による検証工数が削減される。   As described above, according to the present embodiment, even when an argument at the time of communication between programs is described in a data item subordinate to a group item, data incompatibility between programs is automatically detected. Is done. As a result, the number of verification steps by human means when migrating COBOL assets to an open environment is reduced.

また、一般に、COBOLプログラムが、COBOL言語以外で記述されたプログラムと連携する場合は、データ割付境界のデータ不整合により、目的プログラムの実行時にプログラム例外が発生することがある。これに対して、本実施の形態では、データ項目長の適合性も検証されるため、目的プログラム実行時のデータ不整合は、プログラム例外が発生する前に検証されることになる。   In general, when a COBOL program is linked with a program written in a language other than the COBOL language, a program exception may occur during execution of the target program due to data mismatch at the data allocation boundary. On the other hand, in the present embodiment, the suitability of the data item length is also verified, so that data inconsistency during execution of the target program is verified before a program exception occurs.

また、図1においては、図示していないが、COBOLプログラムと、C言語などのCOBOL言語以外の他言語で記述されたプログラム(以下「多言語プログラム」と表記する。)とを連携させる場合は、コンパイル支援装置31は、以下の態様であるのが好ましい。   Although not shown in FIG. 1, when a COBOL program and a program written in a language other than the COBOL language such as C language (hereinafter referred to as “multilingual program”) are linked. The compilation support device 31 preferably has the following mode.

具体的には、コンパイル支援装置31は、多言語プログラムのヘッダファイルの宣言部分から、COBOLのリポジトリへ情報を登録する機能と、他言語プログラムで生成したデータマップリストを解析する機能とを備えているのが好ましい。   Specifically, the compile support apparatus 31 has a function of registering information from the declaration part of the header file of a multilingual program to a COBOL repository and a function of analyzing a data map list generated by another language program. It is preferable.

また、コンパイル支援装置31は、応用例として、開発環境ツールと連携して動作する態様であるのも好ましい。この態様では、データマップ表示だけでなく、データ属性が不適合となるプログラムソースの該当箇所をプログラムエディタで位置付けることも可能となる。   Moreover, it is also preferable that the compilation support apparatus 31 is an aspect which operates in cooperation with a development environment tool as an application example. In this mode, not only the data map display but also the corresponding part of the program source where the data attribute is incompatible can be positioned by the program editor.

ここで、実施の形態におけるプログラムを実行することによって、コンパイル装置を実現するコンピュータについて図7を用いて説明する。図7は、本発明の実施の形態におけるコンパイル支援装置を実現するコンピュータの一例を示すブロック図である。   Here, a computer that realizes a compiling apparatus by executing a program in the embodiment will be described with reference to FIG. FIG. 7 is a block diagram illustrating an example of a computer that implements the compilation support apparatus according to the embodiment of the present invention.

図7に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。   As shown in FIG. 7, the computer 110 includes a CPU 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These units are connected to each other via a bus 121 so that data communication is possible.

CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。   The CPU 111 performs various calculations by developing the program (code) in the present embodiment stored in the storage device 113 in the main memory 112 and executing them in a predetermined order. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory). Further, the program in the present embodiment is provided in a state of being stored in a computer-readable recording medium 120. Note that the program in the present embodiment may be distributed on the Internet connected via the communication interface 117.

また、記憶装置113の具体例としては、ハードディスクの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。   Specific examples of the storage device 113 include a hard disk and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and an input device 118 such as a keyboard and a mouse. The display controller 115 is connected to the display device 119 and controls display on the display device 119. The data reader / writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and reads a program from the recording medium 120 and writes a processing result in the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and another computer.

また、記録媒体120の具体例としては、CF(Compact Flash)及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記憶媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体が挙げられる。   Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash) and SD (Secure Digital), magnetic storage media such as a flexible disk, or CD-ROM (Compact Disk). Optical storage media such as Read Only Memory).

上述した実施の形態の一部又は全部は、以下に記載する(付記1)〜(付記12)によって表現することができるが、以下の記載に限定されるものではない。   Part or all of the above-described embodiments can be expressed by (Appendix 1) to (Appendix 12) described below, but is not limited to the following description.

(付記1)
COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、装置であって、
データ属性検証部を備え
前記データ属性検証部は、
前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定し、
特定した行からデータ名及びデータ属性を取り出し、
特定した行が集団項目に属する場合は、特定した行以降の同じ前記集団項目に属する行についても、データ名及びデータ属性を取り出し、
そして、前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が取り出した前記データ属性と一致しているかどうかを判定し、
判定の結果、一致していない場合に、そのことを示すフラグを設定する、
ことを特徴とするコンパイル支援装置。
(Appendix 1)
An apparatus for determining whether or not there is an argument match between a first program written in a COBOL language and a second program called by the first program,
The data attribute verification unit comprising a data attribute verification unit,
From the second data map list obtained by compiling the second program, specify a line containing the same data name as the argument data name of the second program,
Extract the data name and data attribute from the specified line,
When the specified row belongs to the group item, the data name and the data attribute are extracted for the rows belonging to the same group item after the specified row,
Then, in the first data map list obtained by compiling the first program, in the line having the same data name as the extracted data name, the data attribute of the line is identical to the extracted data attribute. To determine whether or not
As a result of determination, if they do not match, set a flag to indicate that,
A compilation support apparatus characterized by the above.

(付記2)
前記データ属性検証部が、
特定した行と、特定した行以降の同じ前記集団項目に属する行とから、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、取り出した前記データ名とデータ名が同一の行において、当該行のデータ項目長が、取り出した前記データ項目長と一致しているかどうかも判定し、
判定の結果、データ項目長が一致しない場合は、そのことを示すフラグを設定する、
付記1に記載のコンパイル支援装置。
(Appendix 2)
The data attribute verification unit
In addition to the data name and data attribute, the data item length is further extracted from the specified line and the line belonging to the same group item after the specified line,
In the first data map list obtained by compiling the first program, in the line having the same data name as the extracted data name, the data item length of the line is the extracted data item length. Also determine if they match,
If the data item length does not match as a result of the determination, set a flag indicating that,
The compilation support apparatus according to appendix 1.

(付記3)
前記第1のデータマップリストの全部又は一部と、前記第2のデータマップリストの全部又は一部と、前記フラグの設定状況とを、画面に表示する、データ表示部を更に備えている、付記1または2に記載のコンパイル支援装置。
(Appendix 3)
A data display unit for displaying on the screen all or part of the first data map list, all or part of the second data map list, and the flag setting status; The compilation support apparatus according to appendix 1 or 2.

(付記4)
コンパイルが実行された複数のプログラムを対象にして、前記コンパイルによって得られた、複数のプログラムそれぞれのリポジトリ情報に基づいて、前記第1のプログラムと前記第2のプログラムとを特定する、リポジトリ情報照合部を、
更に備えている付記1〜3のいずれかに記載のコンパイル支援装置。
(Appendix 4)
Repository information collation for identifying a first program and a second program based on repository information of each of a plurality of programs obtained by the compilation for a plurality of programs that have been compiled Part
The compile support apparatus according to any one of appendices 1 to 3, further provided.

(付記5)
COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、方法であって、
(a)前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を有することを特徴とするコンパイル支援方法。
(Appendix 5)
A method for determining whether or not an argument is compatible between a first program written in a COBOL language and a second program called by the COBOL language,
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program;
(B) extracting a data name and a data attribute from the line specified in the step (a);
(C) If the line specified in the step (a) belongs to a group item, a data name and a data attribute are extracted for lines belonging to the same group item after the specified line;
(D) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c), and if the result of the determination does not match, a flag indicating that is set Step,
Compile support method characterized by comprising:

(付記6)
前記(b)のステップにおいて、前記(a)のステップで特定した行から、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
前記(c)のステップにおいて、前記(a)のステップで特定した行以降の同じ前記集団項目に属する行から、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
(e)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ項目長が、前記(b)又は(c)のステップで取り出した前記データ項目長と一致しているかどうかを判定し、判定の結果、データ項目長が一致しない場合は、そのことを示すフラグを設定する、ステップを更に有する、
付記5に記載のコンパイル支援方法。
(Appendix 6)
In the step (b), in addition to the data name and data attribute, the data item length is further extracted from the line specified in the step (a).
In the step (c), in addition to the data name and data attribute, the data item length is further extracted from the rows belonging to the same group item after the row specified in the step (a).
(E) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data item length of the row matches the data item length extracted in the step (b) or (c). Further comprising setting a flag to indicate,
The compilation support method according to appendix 5.

(付記7)
(f)前記第1のデータマップリストの全部又は一部と、前記第2のデータマップリストの全部又は一部と、前記フラグの設定状況とを、画面に表示する、ステップを更に有している、付記5または6に記載のコンパイル支援方法。
(Appendix 7)
(F) further comprising a step of displaying on the screen all or part of the first data map list, all or part of the second data map list, and the flag setting status. The compile support method according to appendix 5 or 6.

(付記8)
(g)コンパイルが実行された複数のプログラムを対象にして、前記コンパイルによって得られた、複数のプログラムそれぞれのリポジトリ情報に基づいて、前記第1のプログラムと前記第2のプログラムとを特定する、ステップを更に有している、
付記5〜7のいずれかに記載のコンパイル支援方法。
(Appendix 8)
(G) identifying the first program and the second program based on repository information of each of the plurality of programs obtained by the compilation for a plurality of programs that have been compiled; Further comprising steps,
The compilation support method according to any one of appendices 5 to 7.

(付記9)
COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を、コンピュータによって判定するための、プログラムであって、
前記コンピュータに、
(a)前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を実行させるプログラム。
(Appendix 9)
A program for determining, by a computer, whether or not there is an argument match between a first program written in a COBOL language and a second program called by the first program,
In the computer,
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program;
(B) extracting a data name and a data attribute from the line specified in the step (a);
(C) If the line specified in the step (a) belongs to a group item, a data name and a data attribute are extracted for lines belonging to the same group item after the specified line;
(D) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c), and if the result of the determination does not match, a flag indicating that is set Step,
A program that executes

(付記10)
前記(b)のステップにおいて、前記(a)のステップで特定した行から、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
前記(c)のステップにおいて、前記(a)のステップで特定した行以降の同じ前記集団項目に属する行から、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
前記コンピュータに、
(e)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ項目長が、前記(b)又は(c)のステップで取り出した前記データ項目長と一致しているかどうかを判定し、判定の結果、データ項目長が一致しない場合は、そのことを示すフラグを設定する、ステップを更に実行させる、
付記9に記載のプログラム。
(Appendix 10)
In the step (b), in addition to the data name and data attribute, the data item length is further extracted from the line specified in the step (a).
In the step (c), in addition to the data name and data attribute, the data item length is further extracted from the rows belonging to the same group item after the row specified in the step (a).
In the computer,
(E) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data item length of the row matches the data item length extracted in the step (b) or (c). Set a flag to indicate, further execute steps,
The program according to appendix 9.

(付記11)
前記コンピュータに、
(f)前記第1のデータマップリストの全部又は一部と、前記第2のデータマップリストの全部又は一部と、前記フラグの設定状況とを、画面に表示する、ステップを更に実行させる、付記9または10に記載のプログラム。
(Appendix 11)
In the computer,
(F) further displaying the whole or part of the first data map list, the whole or part of the second data map list, and the flag setting status on the screen; The program according to appendix 9 or 10.

(付記12)
前記コンピュータに、
(g)コンパイルが実行された複数のプログラムを対象にして、前記コンパイルによって得られた、複数のプログラムそれぞれのリポジトリ情報に基づいて、前記第1のプログラムと前記第2のプログラムとを特定する、ステップを更に実行させる、
付記9〜11のいずれかに記載のプログラム。
(Appendix 12)
In the computer,
(G) identifying the first program and the second program based on repository information of each of the plurality of programs obtained by the compilation for a plurality of programs that have been compiled; Let the step run further,
The program according to any one of appendices 9 to 11.

以上のように、本発明によれば、プログラム間連絡時の引数が、集団項目に従属するデータ項目に記述されている場合であっても、プログラム間におけるデータの不適合を自動的に検出することができる。本発明は、COBOL資産のマイグレーションの分野に適用でき、更に、システムのアーキテクチャ(32ビットと64ビット)依存を考慮する必要がある場合に有用である。   As described above, according to the present invention, it is possible to automatically detect data incompatibility between programs even when an argument at the time of communication between programs is described in a data item subordinate to a group item. Can do. The present invention can be applied to the field of COBOL asset migration, and is useful when it is necessary to consider the architecture (32-bit and 64-bit) of the system.

11 COBOLプログラムA
12 COBOLコンパイラ
13 目的プログラムA
14 データマップリストA
15 リポジトリ情報A
21 COBOLプログラムA
23 目的プログラムB
24 データマップリストB
25 リポジトリ情報B
31 コンパイル支援装置
40 ディスプレイ装置
41 画面
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
311 リポジトリ情報照合部
312 データ属性検証部
313 データ表示部
314 プログラム関係情報
315 検証結果
11 COBOL Program A
12 COBOL compiler 13 Objective program A
14 Data map list A
15 Repository information A
21 COBOL Program A
23 Objective Program B
24 Data map list B
25 Repository information B
31 Compile Support Device 40 Display Device 41 Screen 110 Computer 111 CPU
112 Main Memory 113 Storage Device 114 Input Interface 115 Display Controller 116 Data Reader / Writer 117 Communication Interface 118 Input Device 119 Display Device 120 Recording Medium 121 Bus 311 Repository Information Verification Unit 312 Data Attribute Verification Unit 313 Data Display Unit 314 Program Related Information 315 inspection result

Claims (6)

COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、装置であって、
データ属性検証部を備え、
前記データ属性検証部は、
前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定し、
特定した行からデータ名及びデータ属性を取り出し、
特定した行が集団項目に属する場合は、特定した行以降の同じ前記集団項目に属する行についても、データ名及びデータ属性を取り出し、
そして、前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が取り出した前記データ属性と一致しているかどうかを判定し、
判定の結果、一致していない場合に、そのことを示すフラグを設定する、
ことを特徴とするコンパイル支援装置。
An apparatus for determining whether or not there is an argument match between a first program written in a COBOL language and a second program called by the first program,
A data attribute verification unit,
The data attribute verification unit
From the second data map list obtained by compiling the second program, specify a line containing the same data name as the argument data name of the second program,
Extract the data name and data attribute from the specified line,
When the specified row belongs to the group item, the data name and the data attribute are extracted for the rows belonging to the same group item after the specified row,
Then, in the first data map list obtained by compiling the first program, in the line having the same data name as the extracted data name, the data attribute of the line is identical to the extracted data attribute. To determine whether or not
As a result of determination, if they do not match, set a flag to indicate that,
A compilation support apparatus characterized by the above.
前記データ属性検証部が、
特定した行と、特定した行以降の同じ前記集団項目に属する行とから、データ名及びデータ属性に加えて、データ項目長を更に取り出し、
前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、取り出した前記データ名とデータ名が同一の行において、当該行のデータ項目長が、取り出した前記データ項目長と一致しているかどうかも判定し、
判定の結果、データ項目長が一致しない場合は、そのことを示すフラグを設定する、
請求項1に記載のコンパイル支援装置。
The data attribute verification unit
In addition to the data name and data attribute, the data item length is further extracted from the specified line and the line belonging to the same group item after the specified line,
In the first data map list obtained by compiling the first program, in the line having the same data name as the extracted data name, the data item length of the line is the extracted data item length. Also determine if they match,
If the data item length does not match as a result of the determination, set a flag indicating that,
The compilation support apparatus according to claim 1.
前記第1のデータマップリストの全部又は一部と、前記第2のデータマップリストの全部又は一部と、前記フラグの設定状況とを、画面に表示する、データ表示部を更に備えている、請求項1または2に記載のコンパイル支援装置。   A data display unit for displaying on the screen all or part of the first data map list, all or part of the second data map list, and the flag setting status; The compilation support apparatus according to claim 1 or 2. コンパイルが実行された複数のプログラムを対象にして、前記コンパイルによって得られた、複数のプログラムそれぞれのリポジトリ情報に基づいて、前記第1のプログラムと前記第2のプログラムとを特定する、リポジトリ情報照合部を、
更に備えている請求項1〜3のいずれかに記載のコンパイル支援装置。
Repository information collation for identifying a first program and a second program based on repository information of each of a plurality of programs obtained by the compilation for a plurality of programs that have been compiled Part
The compile support apparatus according to claim 1, further comprising:
COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を判定するための、方法であって、
(a)コンピュータによって、前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記コンピュータによって、前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記コンピュータによって、前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記コンピュータによって、前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を有することを特徴とするコンパイル支援方法。
A method for determining whether or not an argument is compatible between a first program written in a COBOL language and a second program called by the COBOL language,
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program by a computer ; Steps,
(B) extracting a data name and a data attribute from the line specified in the step (a) by the computer ;
(C) by the computer, when the row specified in the step of (a) belongs to a group item, the step of extracting the data name and data attributes for the rows belonging to the same group item after the specified row;
(D) The same data name as the data name extracted in the step (b) or (c) in the first data map list obtained by compiling the first program by the computer. In the row, it is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c). Setting a flag to indicate, step,
Compile support method characterized by comprising:
COBOL言語で記述された第1のプログラムと、それによって呼び出される第2のプログラムとのコンパイル後における、両者間の引数の適合の有無を、コンピュータによって判定するための、プログラムであって、
前記コンピュータに、
(a)前記第2のプログラムをコンパイルして得られた第2のデータマップリストの中から、前記第2のプログラムの引数のデータ名と同一のデータ名を含む行を特定する、ステップと、
(b)前記(a)のステップで特定した行からデータ名及びデータ属性を取り出す、ステップと、
(c)前記(a)のステップで特定した行が集団項目に属する場合に、特定した行以降の同じ前記集団項目に属する行について、データ名及びデータ属性を取り出す、ステップと、
(d)前記第1のプログラムをコンパイルして得られた第1のデータマップリスト中の、前記(b)又は(c)のステップで取り出した前記データ名とデータ名が同一の行において、当該行のデータ属性が、前記(b)又は(c)のステップで取り出した前記データ属性と一致しているかどうかを判定し、判定の結果、一致していない場合に、そのことを示すフラグを設定する、ステップと、
を実行させるプログラム。
A program for determining, by a computer, whether or not there is an argument match between a first program written in a COBOL language and a second program called by the first program,
In the computer,
(A) identifying a line including the same data name as the argument data name of the second program from the second data map list obtained by compiling the second program;
(B) extracting a data name and a data attribute from the line specified in the step (a);
(C) If the line specified in the step (a) belongs to a group item, a data name and a data attribute are extracted for lines belonging to the same group item after the specified line;
(D) In the first data map list obtained by compiling the first program, in the line where the data name and the data name extracted in the step (b) or (c) are the same, It is determined whether or not the data attribute of the row matches the data attribute extracted in the step (b) or (c), and if the result of the determination does not match, a flag indicating that is set Step,
A program that executes
JP2011181865A 2011-08-23 2011-08-23 Compilation support device, compilation support method, and program Active JP5464673B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011181865A JP5464673B2 (en) 2011-08-23 2011-08-23 Compilation support device, compilation support method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011181865A JP5464673B2 (en) 2011-08-23 2011-08-23 Compilation support device, compilation support method, and program

Publications (2)

Publication Number Publication Date
JP2013045247A JP2013045247A (en) 2013-03-04
JP5464673B2 true JP5464673B2 (en) 2014-04-09

Family

ID=48009114

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011181865A Active JP5464673B2 (en) 2011-08-23 2011-08-23 Compilation support device, compilation support method, and program

Country Status (1)

Country Link
JP (1) JP5464673B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6261147B1 (en) * 2016-09-29 2018-01-17 Tis株式会社 Program conversion system and program conversion method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04149732A (en) * 1990-10-15 1992-05-22 Nec Corp Processing system for language processing program
JPH06290039A (en) * 1993-04-06 1994-10-18 Hitachi Ltd Method for changing program
JPH0736734A (en) * 1993-06-29 1995-02-07 Nec Corp Method for checking argument value
JP2004118494A (en) * 2002-09-26 2004-04-15 Hitachi Software Eng Co Ltd Checking program and checking method for interface between different language programs
JP4405571B1 (en) * 2008-08-27 2010-01-27 有限会社テクノ工房 program
JP5147626B2 (en) * 2008-09-30 2013-02-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Computer system for executing program including JAVA (registered trademark) code converted from COBOL code, and method and computer program thereof

Also Published As

Publication number Publication date
JP2013045247A (en) 2013-03-04

Similar Documents

Publication Publication Date Title
WO2021098148A1 (en) Software compiling method and apparatus, and electronic device and storage medium
CN111796831B (en) Compiling method and device for multi-chip compatibility
US9477450B2 (en) Manual refinement of specialized classes in runtime environments
JP5602597B2 (en) Method, computer program, and system for memory optimization of virtual machine code by segmenting foreign information
US9015702B2 (en) Determining compatibility of an application with different versions of an operating system
US10331824B2 (en) Dynamically loaded system-level simulation
US9116707B2 (en) Dependency resolution in polyphasic modules
US20160357536A1 (en) Capability attributes based application packaging
US8402435B1 (en) Systems and methods for organizing source code
US20040025083A1 (en) Generating test code for software
CN110275722A (en) Method, apparatus, equipment and storage medium for upgrade application
US9841958B2 (en) Extensible data parallel semantics
EP3635563B1 (en) Application analysis with flexible post-processing
KR20150024842A (en) Adaptive portable libraries
JP2019053729A (en) Test method and test apparatus of smart contract
JP2022545422A (en) Method, apparatus, apparatus, and medium for parallel execution of smart contracts
CN103631573A (en) Method and system for obtaining execution time of transferable functions
US7086033B2 (en) Software debugger having a monitor for monitoring conditional statements within a software program
US11422932B2 (en) Integrated reference and secondary marking
US20180189167A1 (en) Methods, circuits, apparatus, systems and associated software modules for evaluating code behavior
JP6048957B2 (en) Information processing apparatus, program, and information processing method
KR101798705B1 (en) Flexible metadata composition
US10496433B2 (en) Modification of context saving functions
US8930928B2 (en) Method for modifying the assembly output of a compiler
JP5464673B2 (en) Compilation support device, compilation support method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130115

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130926

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131002

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131128

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140116

R150 Certificate of patent or registration of utility model

Ref document number: 5464673

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350