JP2014194705A - Program conversion device, program execution device, program conversion method and conversion program - Google Patents

Program conversion device, program execution device, program conversion method and conversion program Download PDF

Info

Publication number
JP2014194705A
JP2014194705A JP2013071161A JP2013071161A JP2014194705A JP 2014194705 A JP2014194705 A JP 2014194705A JP 2013071161 A JP2013071161 A JP 2013071161A JP 2013071161 A JP2013071161 A JP 2013071161A JP 2014194705 A JP2014194705 A JP 2014194705A
Authority
JP
Japan
Prior art keywords
program
specifying
instruction
format
data
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.)
Granted
Application number
JP2013071161A
Other languages
Japanese (ja)
Other versions
JP6097118B2 (en
Inventor
Yosuke Tajima
洋介 田島
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.)
Hitachi Systems Ltd
Original Assignee
Hitachi Systems 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 Hitachi Systems Ltd filed Critical Hitachi Systems Ltd
Priority to JP2013071161A priority Critical patent/JP6097118B2/en
Publication of JP2014194705A publication Critical patent/JP2014194705A/en
Application granted granted Critical
Publication of JP6097118B2 publication Critical patent/JP6097118B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technology for more easily shifting a program including an instruction dependent on hardware.SOLUTION: A program conversion device includes an instruction specification part for specifying a predetermined instruction of processing to a computer, a device specification part for specifying a device to be used for processing about an instruction, a data format specification part for specifying a format of data to be written to the device in the instruction, an end specification part for specifying whether to perform end processing after writing the data to the device in the instruction, and an instruction replacement part for specifying the specified device, a format of the data, and a program to be accessed in accordance with whether to perform end processing, and replacing a prescribed instruction with an instruction to access the program.

Description

本発明は、プログラム変換の技術に関するものである。   The present invention relates to a program conversion technique.

従来、ホストプログラムソースにランタイムテーブルに格納されたOS等が含まれていると判定したとき、ランタイムをコンパイラのパラメーターとして指定してホスト用のプログラムソースを読み込み、これをトークンに分解してオブジェクトコードを生成し、該オブジェクトコードの命令文にランタイム呼出が必要と判定し且つコンパイルにパラメーター指定があると判定したとき、ランタイムテーブルに格納したランタイムを呼び出すようにオブジェクトコードを生成し、該生成したオブジェクトコードをコンパイルしたサーバー実行オブジェクトに挿入する技術が存在する。特許文献1には、このような技術についての技術が記載されている。   Conventionally, when it is determined that the OS stored in the runtime table is included in the host program source, the host program source is read by specifying the runtime as a parameter of the compiler, this is broken down into tokens, and the object code Is generated, the object code is generated so that the runtime stored in the runtime table is called when it is determined that the runtime statement is necessary for the statement of the object code and the parameter specification is specified for the compilation. There are techniques for inserting code into a compiled server execution object. Patent Document 1 describes a technique related to such a technique.

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

上記技術では、ホストプログラムソースに、ハードウェアに依存する命令が含まれる場合を考慮されておらず、例えばFD装置(フレキシブルディスク駆動装置)やCMT装置(カートリッジ磁気テープ駆動装置)を制御する命令動作を移行させることは難しかった。   The above technique does not consider the case where the host program source includes hardware-dependent instructions. For example, an instruction operation for controlling an FD device (flexible disk drive device) or a CMT device (cartridge magnetic tape drive device). It was difficult to migrate.

本発明の目的は、ハードウェアに依存する命令が含まれるプログラムをより容易に移行する技術を提供することにある。   An object of the present invention is to provide a technique for more easily migrating a program including instructions that depend on hardware.

本願は、上記課題の少なくとも一部を解決する手段を複数含んでいるが、その例を挙げるならば、以下のとおりである。上記課題を解決すべく、本発明に係るプログラム変換装置は、コンピューターに対する処理の所定の命令を特定する命令特定部と、前記命令に係る処理に用いる装置を特定する装置特定部と、前記命令において前記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定部と、前記命令において前記装置への前記データの書き込み後に終了処理を行うか否かを特定する終了特定部と、特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じて呼び出すプログラムを特定し、前記所定の命令を、前記プログラムを呼び出す命令に置換する命令置換部と、を備えることを特徴とする。   The present application includes a plurality of means for solving at least a part of the above-described problems. Examples of such means are as follows. In order to solve the above-described problem, a program conversion apparatus according to the present invention includes an instruction specifying unit that specifies a predetermined instruction for processing to a computer, an apparatus specifying unit that specifies an apparatus used for processing related to the instruction, and the instruction. A data format specifying unit for specifying a format of data to be written to the device; an end specifying unit for specifying whether or not to perform end processing after writing the data to the device in the command; and the specified device, And a command replacement unit that identifies a program to be called according to a data format and whether or not to perform the termination process, and replaces the predetermined command with a command to call the program.

また、上記のプログラム変換装置においては、上記データフォーマット特定部は、上記装置がCMT装置である場合には、上記命令に応じて、ノンラベル形式と標準ラベル形式とを含む複数のフォーマットのうち一つのフォーマットを特定する、ことを特徴とするものであってもよい。   Further, in the program conversion device, the data format specifying unit, when the device is a CMT device, according to the command, selects one of a plurality of formats including a non-label format and a standard label format. The format may be specified.

また、上記のプログラム変換装置においては、ファイルごとに可変長あるいは固定長の形式を対応付けるカタログ情報を格納する記憶部を備え、上記データフォーマット特定部は、上記装置がCMT装置である場合には、上記データが固定長または可変長のいずれであるかを、上記データに係るファイルについて上記カタログ情報を用いて特定する、ことを特徴とするものであってもよい。   The program conversion apparatus includes a storage unit that stores catalog information that associates a variable length or fixed length format for each file, and the data format specifying unit, when the device is a CMT device, Whether the data has a fixed length or a variable length may be specified using the catalog information for the file related to the data.

また、上記のプログラム変換装置においては、上記データフォーマット特定部は、上記装置がFD装置である場合には、上記命令の種類に応じて、DOSフォーマットあるいはIBMフォーマットを含む複数のフォーマットのうち一つのフォーマットを特定する、ことを特徴とするものであってもよい。   In the program conversion device, the data format specifying unit may be one of a plurality of formats including a DOS format or an IBM format depending on the type of the instruction when the device is an FD device. The format may be specified.

また、上記のプログラム変換装置においては、上記終了特定部は、上記所定の命令の次に実行する命令が上記装置を用いるものである場合には、上記終了処理を行わないと特定する、ことを特徴とするものであってもよい。   In the program conversion device, the end specifying unit specifies that the end processing is not performed when an instruction to be executed next to the predetermined instruction uses the device. It may be a feature.

また、上記のプログラム変換装置においては、上記所定の命令は、JCLで記述された命令である、ことを特徴とするものであってもよい。   In the program conversion apparatus, the predetermined instruction may be an instruction written in JCL.

また、上記のプログラム変換装置においては、上記プログラムは、特定された上記装置、上記データのフォーマット、上記終了処理を行うか否かに応じた制御を記憶装置に対して行うプログラムである、ことを特徴とするものであってもよい。   Further, in the program conversion device, the program is a program that performs control on the storage device according to whether the specified device, the format of the data, or whether to perform the termination process. It may be a feature.

また、本発明に係るプログラム実行装置は、コンピューターに対する処理の所定の命令を実行する命令実行部と、上記命令に係る処理に用いる装置を特定する装置特定部と、上記命令において上記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定部と、上記命令において上記装置への上記データの書き込み後に終了処理を行うか否かを特定する終了特定部と、特定された上記装置、上記データのフォーマット、上記終了処理を行うか否かに応じて呼び出すプログラムを特定し、上記所定の命令を、上記プログラムを呼び出す命令に置換する命令置換部と、を備え、上記命令実行部は、上記所定の命令に代えて、上記プログラムを呼び出す命令を実行する、ことを特徴とする。   Further, the program execution device according to the present invention includes an instruction execution unit that executes a predetermined instruction for processing to a computer, a device specification unit that specifies a device used for processing related to the command, and data to be written to the device in the command A data format specifying unit for specifying the format of the data, an end specifying unit for specifying whether or not to perform end processing after writing the data to the device in the command, the specified device, the format of the data, An instruction replacement unit that identifies a program to be called according to whether or not to perform termination processing, and replaces the predetermined instruction with an instruction to call the program, wherein the instruction execution unit replaces the predetermined instruction And executing an instruction for calling the program.

また、本発明に係るプログラム変換方法は、コンピューターを用いたプログラム変換方法であって、上記コンピューターは、コンピューターに対する処理の所定の命令を特定する命令特定ステップと、上記命令に係る処理に用いる装置を特定する装置特定ステップと、上記命令において上記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定ステップと、上記命令において上記装置への上記データの書き込み後に終了処理を行うか否かを特定する終了特定ステップと、特定された上記装置、上記データのフォーマット、上記終了処理を行うか否かに応じて呼び出すプログラムを特定し、上記所定の命令を、上記プログラムを呼び出す命令に置換する命令置換ステップと、を実施することを特徴とする。   The program conversion method according to the present invention is a program conversion method using a computer, wherein the computer includes an instruction specifying step for specifying a predetermined instruction for processing to the computer, and an apparatus used for the processing related to the instruction. A device specifying step for specifying, a data format specifying step for specifying a format of data to be written to the device in the command, and an end specification for specifying whether or not to perform end processing after the data is written to the device in the command. An instruction replacement step for identifying a program to be called according to whether or not to perform the step, the specified device, the format of the data, and the termination process, and replacing the predetermined instruction with an instruction for calling the program; It is characterized by implementing.

また、本発明に係る変換プログラムは、コンピューターに、プログラム変換手順を実行させるプログラムであって、上記コンピューターを、制御手段として動作させ、上記制御手段に対して、コンピューターに対する処理の所定の命令を特定する命令特定手順と、上記命令に係る処理に用いる装置を特定する装置特定手順と、上記命令において上記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定手順と、上記命令において上記装置への上記データの書き込み後に終了処理を行うか否かを特定する終了特定手順と、特定された上記装置、上記データのフォーマット、上記終了処理を行うか否かに応じて呼び出すプログラムを特定し、上記所定の命令を、上記プログラムを呼び出す命令に置換する命令置換手順と、を実行させることを特徴とする。   The conversion program according to the present invention is a program that causes a computer to execute a program conversion procedure, operates the computer as a control unit, and specifies a predetermined instruction for processing the computer with respect to the control unit. An instruction specifying procedure, a device specifying procedure for specifying a device used for processing related to the command, a data format specifying procedure for specifying a format of data to be written to the device in the command, and the data to the device in the command The end specifying procedure for specifying whether or not to perform the end processing after writing, the specified device, the format of the data, the program to be called according to whether or not to perform the end processing, and the predetermined command Replace the instruction with an instruction to call the above program. Characterized in that to.

上記した以外の課題、構成および効果は、以下の実施形態の説明により明らかにされる。   Problems, configurations, and effects other than those described above will become apparent from the following description of embodiments.

本発明によると、ハードウェアに依存する命令が含まれるプログラムをより容易に移行することができる。   According to the present invention, it is possible to more easily migrate a program including hardware-dependent instructions.

本発明の実施形態に係る移行システムの構成例を示す図である。It is a figure which shows the structural example of the migration system which concerns on embodiment of this invention. プログラム使用装置対応情報記憶部に格納されるデータ構造を示す図である。It is a figure which shows the data structure stored in a program use apparatus corresponding | compatible information storage part. 命令使用装置対応情報記憶部に格納されるデータ構造を示す図である。It is a figure which shows the data structure stored in an instruction use apparatus corresponding | compatible information storage part. フォーマット情報記憶部に格納されるデータ構造を示す図である。It is a figure which shows the data structure stored in a format information storage part. カタログ情報記憶部に格納されるデータ構造を示す図である。It is a figure which shows the data structure stored in a catalog information storage part. プログラム変換装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of a program conversion apparatus. プログラム移行処理フローを示す図である。It is a figure which shows a program transfer process flow. 命令解析処理フローを示す図である。It is a figure which shows a command analysis process flow.

以下に、本発明に係る第一の実施形態を適用した移行システム1について、図面を参照して説明する。   Hereinafter, a migration system 1 to which a first embodiment according to the present invention is applied will be described with reference to the drawings.

図1は、本発明の第一の実施形態における移行システム1の構成例を示す図である。移行システム1には、プログラム変換装置100が含まれる。   FIG. 1 is a diagram showing a configuration example of a migration system 1 in the first embodiment of the present invention. The migration system 1 includes a program conversion device 100.

近年、オープンシステムの性能向上や低価格化が進み、レガシーシステムにかかる運用コストを圧縮するため、レガシーマイグレーションが進んでいる。レガシーマイグレーションとは、汎用機を用いたレガシーシステムを、サーバーを用いたオープンシステムへ移行することをいう。オープンシステムとは、システムに参加する装置間に規格の互換性を持たせて相互運用性を高め、主に、クライアントからサーバーに対して処理の要求を行い、サーバーからクライアントが処理結果を受け取ることで所定の処理を実現するクライアントサーバー型のシステムをいう。   In recent years, the performance of open systems has been improved and the price has been reduced, and legacy migration has been progressing in order to reduce the operating costs of legacy systems. Legacy migration refers to migration of a legacy system using a general-purpose machine to an open system using a server. An open system is a system in which interoperability is improved by making standards compatible between devices participating in the system. Mainly, processing requests are sent from the client to the server, and the client receives processing results from the server. A client-server system that implements predetermined processing.

本発明に係る移行システム1においては、汎用機のFD装置、CMT装置の自動制御方式を、汎用機のJCL(ジョブ制御言語)を解析し、装置制御部分のJCLの構文を所定の変換ルールに従ってオープンシステム用のJCLに変換することで、ハードウェア機種依存の構文を吸収し、オープンシステムでのFD装置、CMT装置の自動制御を確立する。   In the migration system 1 according to the present invention, the automatic control method of the FD device and the CMT device of the general-purpose machine is analyzed, the JCL (job control language) of the general-purpose machine is analyzed, and the JCL syntax of the device control part is in accordance with a predetermined conversion rule. By converting to JCL for open system, the hardware model-dependent syntax is absorbed and automatic control of FD device and CMT device in open system is established.

ストレートコンバージョンによるシステムのオープン化によれば、汎用機で使用していたCOBOLやJCLを含め、プログラムはサーバーへの移行後もそのまま使用することができるが、FD装置、CMT装置に対する制御はハードウェアに対する依存性があることから、オープン化後にFD装置、CMT装置を制御するためにJCL上でハードウェアの依存性を吸収する必要がある。   According to the opening of the system by straight conversion, the program can be used as it is even after moving to the server, including COBOL and JCL used in general-purpose machines, but the control for the FD device and CMT device is hardware. Therefore, it is necessary to absorb the hardware dependency on JCL in order to control the FD device and the CMT device after opening.

通常、ストレートコンバージョンによるオープン化手段を採用する場合は、短期間で汎用機環境からサーバー環境へと移行することが期待されているため、JCLの変換に必要な情報の調査などによる工数の増大を避けるため、装置を手動制御するという運用手順の変更で対応する場合も多い。しかし、このような移行を行ったシステムは、手動でFD装置、CMT装置を操作することによる作業効率の低下や人為的ミスが発生する問題をはらむ。   Normally, when adopting the open conversion method by straight conversion, it is expected to move from the general-purpose machine environment to the server environment in a short period of time, so increase the man-hours by investigating information necessary for JCL conversion. In order to avoid this, there are many cases where the operation procedure is changed by manually controlling the apparatus. However, a system that has performed such a transition has problems that a reduction in work efficiency and human error occur due to manual operation of the FD device and the CMT device.

移行後のオープンシステムではFD装置やCMT装置の使用を廃止する場合においては、これまでFD媒体やCMT媒体で保存していたデータをディスクへ移行する必要があるが、データの移行作業は使用している媒体の数に応じて幅が生じるのみならず、工数の増大につながってしまう場合が多い。   In the open system after migration, when the use of the FD device or CMT device is abolished, it is necessary to migrate the data stored in the FD medium or CMT medium to the disk, but the data migration work is used. In many cases, not only does the width increase depending on the number of media that are present, but also the number of man-hours increases.

そこで、本発明に係る移行システム1においては、後述する図7のプログラム変換処理において、命令解析処理と、プログラム変換処理と、をプログラム変換装置100において行うことで、FD装置やCMT装置を用いる既存のJCL等のオープンシステムに対応する変換を実現する方式とする。   Therefore, in the migration system 1 according to the present invention, in the program conversion process of FIG. 7 to be described later, an instruction analysis process and a program conversion process are performed in the program conversion apparatus 100, so that an existing FD apparatus or a CMT apparatus is used. A method for realizing conversion corresponding to an open system such as JCL.

図1の説明に戻る。プログラム変換装置100は、サーバー等の情報処理装置である。ほかにも例えば、プログラム変換装置100は、パソコンやスマートフォン、ワークステーション等各種の情報処理装置であればよい。   Returning to the description of FIG. The program conversion apparatus 100 is an information processing apparatus such as a server. In addition, for example, the program conversion apparatus 100 may be various information processing apparatuses such as a personal computer, a smartphone, and a workstation.

プログラム変換装置100は、制御部110と、記憶部120と、が含まれる。制御部110には、命令解析部111と、使用装置特定部112と、媒体フォーマット特定部113と、プログラム変換部114と、プログラム実行制御部115と、外部機器制御部116と、が含まれる。記憶部120には、プログラム記憶部121と、プログラム使用装置対応情報記憶部122と、命令使用装置対応情報記憶部123と、フォーマット情報記憶部124と、カタログ情報記憶部125と、ラッパープログラム記憶部126と、変換後プログラム記憶部127と、が含まれる。   The program conversion apparatus 100 includes a control unit 110 and a storage unit 120. The control unit 110 includes an instruction analysis unit 111, a used device identification unit 112, a medium format identification unit 113, a program conversion unit 114, a program execution control unit 115, and an external device control unit 116. The storage unit 120 includes a program storage unit 121, a program use device correspondence information storage unit 122, an instruction use device correspondence information storage unit 123, a format information storage unit 124, a catalog information storage unit 125, and a wrapper program storage unit. 126 and a post-conversion program storage unit 127.

図2は、プログラム使用装置対応情報記憶部122のデータ構造の例を示す図である。プログラム使用装置対応情報記憶部122には、条件122Aと、使用装置122Bと、が対応付けられて格納される。   FIG. 2 is a diagram illustrating an example of a data structure of the program using device correspondence information storage unit 122. The program use device correspondence information storage unit 122 stores the condition 122A and the use device 122B in association with each other.

条件122Aは、条件を特定する情報である。例えば、条件122Aは、「実行ステップにFDフォーマット指定情報あり」や「実行ステップにFDフォーマット指定情報なし」等の具体的な条件を特定する情報が格納される。   The condition 122A is information for specifying the condition. For example, the condition 122A stores information specifying specific conditions such as “there is FD format designation information in the execution step” and “no FD format designation information in the execution step”.

使用装置122Bは、条件122Aに応じて使用する装置の関連性を特定する情報である。例えば、条件122Aが「実行ステップにFDフォーマット指定情報あり」の場合に、使用装置122Bは「FD装置」を使用するという情報である。   The use device 122B is information for specifying the relevance of the device to be used according to the condition 122A. For example, when the condition 122A is “the execution step includes FD format designation information”, the use device 122B is information that the “FD device” is used.

図3は、命令使用装置対応情報記憶部123のデータ構造の例を示す図である。命令使用装置対応情報記憶部123には、条件123Aと、使用装置123Bと、が対応付けられて格納される。   FIG. 3 is a diagram illustrating an example of a data structure of the instruction using device correspondence information storage unit 123. The instruction use device correspondence information storage unit 123 stores the condition 123A and the use device 123B in association with each other.

条件123Aは、条件を特定する情報である。例えば、条件123Aは、「プログラム内にCMT装置指定情報あり」や「プログラム内にCMT装置指定情報なし」等の具体的な条件を特定する情報が格納される。   The condition 123A is information for specifying the condition. For example, the condition 123A stores information specifying specific conditions such as “there is CMT device designation information in the program” and “there is no CMT device designation information in the program”.

使用装置123Bは、条件123Aに応じて使用する装置の関連性を特定する情報である。例えば、条件123Aが「プログラム内にCMT装置指定情報あり」の場合に、使用装置123Bは「CMT装置」を使用するという情報である。   The use device 123B is information for specifying the relevance of the device to be used according to the condition 123A. For example, when the condition 123A is “there is CMT device designation information in the program”, the using device 123B is information that the “CMT device” is used.

図4は、フォーマット情報記憶部124のデータ構造の例を示す図である。フォーマット情報記憶部124には、条件124Aと、媒体フォーマット124Bと、が対応付けられて格納される。   FIG. 4 is a diagram illustrating an example of the data structure of the format information storage unit 124. The format information storage unit 124 stores the condition 124A and the medium format 124B in association with each other.

条件124Aは、条件を特定する情報である。例えば、条件124Aは、「プログラム内にノンラベル形式の指定情報あり」や「プログラム内にノンラベル形式の指定情報なし」等の具体的な条件を特定する情報が格納される。   The condition 124A is information for specifying the condition. For example, the condition 124A stores information specifying specific conditions such as “there is non-label format designation information in the program” and “no non-label format designation information in the program”.

媒体フォーマット124Bは、条件124Aに応じて記録する媒体のフォーマットの関連性を特定する情報である。例えば、条件124Aが「プログラム内にノンラベル形式の指定情報あり」の場合に、媒体フォーマット124Bは「ノンラベル形式」を使用するという情報である。   The medium format 124B is information for specifying the relevance of the format of the medium to be recorded according to the condition 124A. For example, when the condition 124A is “there is non-label format designation information in the program”, the medium format 124B is information that “non-label format” is used.

図5は、カタログ情報記憶部125のデータ構造の例を示す図である。カタログ情報記憶部125には、ファイル125Aと、ファイル形式125Bと、レコード長125Cと、ブロック長125Dと、が対応付けられて格納される。   FIG. 5 is a diagram illustrating an example of the data structure of the catalog information storage unit 125. In the catalog information storage unit 125, a file 125A, a file format 125B, a record length 125C, and a block length 125D are stored in association with each other.

ファイル125Aは、ファイルを特定する情報である。例えば、ファイル125Aは、「ファイル1」や「ファイル2」等の具体的なファイルを特定する情報が格納される。   The file 125A is information for specifying a file. For example, the file 125A stores information specifying a specific file such as “file 1” or “file 2”.

ファイル形式125Bは、ファイル125Aのデータの形式を特定する情報である。例えば、ファイル125Aが「ファイル1」の場合に、ファイル形式125Bは「固定長」であるとの情報である。   The file format 125B is information for specifying the data format of the file 125A. For example, when the file 125A is “file 1”, the information indicates that the file format 125B is “fixed length”.

レコード長125Cは、ファイル125Aのデータのレコード長を特定する情報である。例えば、ファイル125Aが「ファイル1」の場合に、レコード長125Cは「111」バイトであるという情報である。   The record length 125C is information for specifying the record length of the data in the file 125A. For example, when the file 125A is “file 1”, the record length 125C is “111” bytes.

ブロック長125Dは、ファイル125Aのデータのブロック長を特定する情報である。例えば、ファイル125Aが「ファイル1」の場合に、ブロック長125Dは「999」バイトであるという情報である。   The block length 125D is information for specifying the data block length of the file 125A. For example, when the file 125A is “file 1”, the block length 125D is “999” bytes.

図1の説明に戻る。命令解析部111は、移行元のプログラムすなわちJCL等のプログラムを解析し、変換を要するハードウェア駆動制御の命令を特定する。また、命令解析部111は、命令において装置へのデータの書き込み後に終了処理を行うか否についての特定も行う。すなわち、命令解析部111は、コンピューターに対する処理の所定の命令を特定し、終了処理の必要性についての判断を行うといえる。   Returning to the description of FIG. The instruction analysis unit 111 analyzes a migration source program, that is, a program such as JCL, and specifies a hardware drive control instruction that requires conversion. In addition, the instruction analysis unit 111 also specifies whether or not to perform end processing after writing data to the apparatus in the instruction. That is, it can be said that the instruction analysis unit 111 specifies a predetermined instruction for processing to the computer and determines whether or not the end process is necessary.

使用装置特定部112は、プログラム使用装置対応情報記憶部122および命令使用装置対応情報記憶部123を読み込んで、条件122Aおよび条件123Aの条件を満たすか否かを判定し、満たす場合にはそれぞれに対応する使用装置122B、使用装置123Bの情報を用いて、関連性のある装置を対応付ける。なお、使用装置122Bが「未詳」である場合また使用装置123Bが「不使用」である場合には、使用装置特定部112は装置を対応付けることはしない。すなわち、使用装置特定部112は、命令に係る処理に用いる装置を特定するといえる。   The use device specifying unit 112 reads the program use device correspondence information storage unit 122 and the instruction use device correspondence information storage unit 123 to determine whether or not the conditions 122A and 123A are satisfied. Using the information of the corresponding use device 122B and use device 123B, the related devices are associated with each other. Note that when the used device 122B is “unknown” or when the used device 123B is “not used”, the used device specifying unit 112 does not associate the device. That is, it can be said that the used device specifying unit 112 specifies a device used for processing related to the command.

媒体フォーマット特定部113は、フォーマット情報記憶部124を読み込んで、条件124Aの条件を満たすか否かを判定し、満たす場合には対応する媒体フォーマット124Bの情報を用いて関連性のある媒体フォーマットを対応付ける。すなわち、媒体フォーマット特定部113は、命令において装置へ書き込むデータのフォーマットを特定するといえる。特に、媒体フォーマット特定部113は、使用装置がCMT装置である場合には、命令に応じて、ノンラベル形式と標準ラベル形式とを含む複数のフォーマットのうち一つのフォーマットを特定する。さらに、媒体フォーマット特定部113は、書き込むデータが固定長または可変長のいずれであるかを、データに係るファイルについてカタログ情報を用いて特定する。また、媒体フォーマット特定部113は、使用装置がFD装置である場合には、命令の種類に応じて、DOSフォーマットとIBMフォーマットとを含む複数のフォーマットのうち一つのフォーマットを特定する。   The medium format specifying unit 113 reads the format information storage unit 124, determines whether or not the condition 124A is satisfied, and if so, uses the information of the corresponding medium format 124B to select a relevant medium format. Associate. That is, it can be said that the medium format specifying unit 113 specifies the format of data to be written to the device in the command. In particular, when the using device is a CMT device, the medium format specifying unit 113 specifies one format among a plurality of formats including a non-label format and a standard label format in accordance with a command. Further, the medium format specifying unit 113 specifies whether the data to be written has a fixed length or a variable length by using catalog information for a file related to the data. In addition, when the using device is an FD device, the medium format specifying unit 113 specifies one format among a plurality of formats including a DOS format and an IBM format according to the type of instruction.

プログラム変換部114は、命令解析部111により解析された結果対応付けられた装置やフォーマットの情報を用いて、ラッパープログラム記憶部126に格納されたFD装置やCMT装置の制御を行う命令文を特定する。そして、プログラム変換部114は、移行元のプログラムすなわちJCLの命令を当該ラッパープログラムの呼び出し命令に置換する。そして、プログラム変換部114は、命令を置換されたプログラムを変換後プログラム記憶部127に格納させる。すなわち、プログラム変換部114は、特定された装置、データのフォーマット、終了処理を行うか否かに応じて呼び出すプログラムを特定し、所定の命令を、プログラムを呼び出す命令に置換する命令置換部であるといえる。   The program conversion unit 114 specifies a command statement for controlling the FD device and the CMT device stored in the wrapper program storage unit 126 using the information of the device and the format associated with the result analyzed by the command analysis unit 111. To do. Then, the program conversion unit 114 replaces the migration source program, that is, the JCL instruction with the call instruction of the wrapper program. Then, the program conversion unit 114 causes the converted program storage unit 127 to store the program whose instruction has been replaced. In other words, the program conversion unit 114 is an instruction replacement unit that specifies a program to be called according to the specified device, data format, and whether to perform termination processing, and replaces a predetermined instruction with an instruction to call the program. It can be said.

プログラム実行制御部115は、変換後プログラム記憶部127に格納されたプログラムの実行を制御する。具体的には、JCLに含まれる命令にしたがって処理を実行し、ラッパープログラムの呼び出し命令については、ラッパープログラム記憶部126から対応するラッパープログラムを特定し、実行を開始させる。   The program execution control unit 115 controls the execution of the program stored in the converted program storage unit 127. Specifically, processing is executed in accordance with an instruction included in the JCL, and for the wrapper program call instruction, the corresponding wrapper program is specified from the wrapper program storage unit 126 and execution is started.

外部機器制御部116は、プログラム変換装置100の外部に接続された機器の動作を制御する。例えば、外部機器制御部116は、FD装置、CMT装置等の機器の動作を制御する。   The external device control unit 116 controls the operation of a device connected to the outside of the program conversion apparatus 100. For example, the external device control unit 116 controls operations of devices such as an FD device and a CMT device.

図6は、プログラム変換装置100のハードウェア構成例を示す図である。プログラム変換装置100は、演算装置102と、外部記憶装置103と、主記憶装置104と、出力装置105と、通信装置106と、FD装置107と、CMT装置108と、各装置をつなぐバス109と、を少なくとも備える。また、他に、プログラム変換装置100は、キーボード、マウスといった入力装置101を備えるものであってもよい。   FIG. 6 is a diagram illustrating a hardware configuration example of the program conversion apparatus 100. The program conversion apparatus 100 includes an arithmetic device 102, an external storage device 103, a main storage device 104, an output device 105, a communication device 106, an FD device 107, a CMT device 108, and a bus 109 that connects the devices. At least. In addition, the program conversion apparatus 100 may include an input device 101 such as a keyboard and a mouse.

演算装置102は、例えばCPU(Central Processing Unit)などの演算装置である。   The arithmetic device 102 is an arithmetic device such as a CPU (Central Processing Unit).

外部記憶装置103は、デジタル情報を記憶可能な、いわゆるハードディスク(Hard Disk Drive)やSSD(Solid State Drive)あるいはフラッシュメモリなどの不揮発性記憶装置である。   The external storage device 103 is a non-volatile storage device such as a so-called hard disk (Hard Disk Drive), SSD (Solid State Drive) or flash memory capable of storing digital information.

主記憶装置104は、例えばRAM(Random Access Memory)などのメモリ装置である。   The main storage device 104 is a memory device such as a RAM (Random Access Memory).

出力装置105は、例えば液晶ディスプレイや、有機EL(Electro Luminescence)ディスプレイ等の表示装置である。   The output device 105 is a display device such as a liquid crystal display or an organic EL (Electro Luminescence) display.

通信装置106は、図示しないネットワーク等を介して他の装置と通信経路を確立し、情報を送受信するネットワークカード等の装置である。   The communication device 106 is a device such as a network card that establishes a communication path with another device via a network (not shown) and transmits / receives information.

FD装置107は、フレキシブルディスクを駆動して記憶されたデータの読み出しを行う。また、FD装置107は、フレキシブルディスクを駆動して所定のデータを書き込む。   The FD device 107 reads a stored data by driving a flexible disk. In addition, the FD device 107 drives a flexible disk and writes predetermined data.

CMT装置108は、カートリッジ型の磁気テープを駆動して記憶されたデータの読み出しを行う。また、CMT装置108は、カートリッジ型の磁気テープを駆動して所定のデータを書き込む。   The CMT device 108 drives a cartridge type magnetic tape and reads stored data. The CMT device 108 drives a cartridge type magnetic tape to write predetermined data.

入力装置101は、キーボードやマウス、タッチパネル等の各種入力装置である。   The input device 101 is various input devices such as a keyboard, a mouse, and a touch panel.

入力装置101と、演算装置102と、外部記憶装置103と、主記憶装置104と、出力装置105と、通信装置106と、FD装置107と、CMT装置108とは、バス109等の接続導線により互いに接続される。   The input device 101, the arithmetic device 102, the external storage device 103, the main storage device 104, the output device 105, the communication device 106, the FD device 107, and the CMT device 108 are connected by connecting wires such as a bus 109. Connected to each other.

上記したプログラム変換装置100の命令解析部111、使用装置特定部112、媒体フォーマット特定部113、プログラム変換部114、プログラム実行制御部115、外部機器制御部116は、演算装置102に処理を行わせるプログラムによって実現される。このプログラムは、主記憶装置104、外部記憶装置103または図示しないROM装置内に記憶され、実行にあたって主記憶装置104上にロードされ、演算装置102により実行される。   The instruction analysis unit 111, the used device identification unit 112, the medium format identification unit 113, the program conversion unit 114, the program execution control unit 115, and the external device control unit 116 of the program conversion device 100 cause the arithmetic device 102 to perform processing. Realized by the program. The program is stored in the main storage device 104, the external storage device 103, or a ROM device (not shown), loaded onto the main storage device 104 for execution, and executed by the arithmetic device 102.

また、プログラム変換装置100の記憶部120は、主記憶装置104及び外部記憶装置103により実現される。以上が、プログラム変換装置100のハードウェア構成例である。   The storage unit 120 of the program conversion apparatus 100 is realized by the main storage device 104 and the external storage device 103. The above is the hardware configuration example of the program conversion apparatus 100.

[動作の説明] 次に、本実施形態におけるプログラム変換装置100の動作を説明する。図7は、本実施形態におけるプログラム変換装置100が実施するプログラム移行処理のフロー図である。   [Description of Operation] Next, the operation of the program conversion apparatus 100 in the present embodiment will be described. FIG. 7 is a flowchart of a program migration process executed by the program conversion apparatus 100 according to this embodiment.

プログラム移行処理は、プログラム変換装置100が稼動を開始し、処理の開始を指示されると、開始される。   The program migration process is started when the program conversion apparatus 100 starts operating and is instructed to start the process.

まず、命令解析部111は、命令解析処理を開始する(ステップS001)。具体的には、命令解析処理においては、命令解析部111は、プログラム記憶部121と、プログラム使用装置対応情報記憶部122と、命令使用装置対応情報記憶部123と、フォーマット情報記憶部124と、カタログ情報記憶部125と、を用いて、図8に示す命令解析処理を実行する。   First, the instruction analysis unit 111 starts instruction analysis processing (step S001). Specifically, in the instruction analysis process, the instruction analysis unit 111 includes a program storage unit 121, a program use device correspondence information storage unit 122, an instruction use device correspondence information storage unit 123, a format information storage unit 124, The command analysis processing shown in FIG. 8 is executed using the catalog information storage unit 125.

そして、プログラム変換部114は、命令解析処理の結果を受け取り、プログラムの変換を開始する(ステップS002)。具体的には、プログラム変換部114は、プログラム記憶部121に格納されたプログラムおよびラッパープログラム記憶部126に格納されたラッパープログラムを用いてプログラムを
変換する。そして、プログラム変換部114は、変換したプログラムを変換後プログラム記憶部127に格納させる。
Then, the program conversion unit 114 receives the result of the instruction analysis process and starts program conversion (step S002). Specifically, the program conversion unit 114 converts a program using a program stored in the program storage unit 121 and a wrapper program stored in the wrapper program storage unit 126. Then, the program conversion unit 114 stores the converted program in the post-conversion program storage unit 127.

以上が、プログラム移行処理の処理フローである。プログラム移行処理を実行することで、汎用機で用いるJCL等のプログラムを、オープン系システムにて用いるJCL等のプログラムに変換することができる。   The above is the process flow of the program migration process. By executing the program migration processing, a program such as JCL used in a general-purpose machine can be converted into a program such as JCL used in an open system.

図8は、本実施形態におけるプログラム変換装置100が実施する命令解析処理のフロー図である。命令解析処理は、プログラム移行処理のステップS001において、変換する対象のプログラムに記述された各実行ステップを対象として、開始される。   FIG. 8 is a flowchart of instruction analysis processing executed by the program conversion apparatus 100 according to this embodiment. The instruction analysis process is started for each execution step described in the program to be converted in step S001 of the program transfer process.

まず、使用装置特定部112は、実行ステップはFD装置を使用するか否かを判定する(ステップS101)。具体的には、使用装置特定部112は、実行ステップにおいて呼び出すプログラムについて、プログラム使用装置対応情報記憶部122の条件122Aに相当するか否かを特定し、相当する場合には、使用装置122Bの情報を取得して、FD装置を使用するか否か判定する。   First, the using device specifying unit 112 determines whether or not the execution step uses an FD device (step S101). Specifically, the use device specifying unit 112 specifies whether or not the program to be called in the execution step corresponds to the condition 122A of the program use device correspondence information storage unit 122. Information is acquired to determine whether or not to use the FD device.

実行ステップはFD装置を使用する場合(ステップS101において「Yes」の場合)には、媒体フォーマット特定部113は、実行ステップで使用するFDのフォーマットを特定する(ステップS102)。具体的には、媒体フォーマット特定部113は、実行ステップにて呼び出すプログラムにおいて指定するフォーマット情報(例えば、IBMフォーマットまたはDOSフォーマット等)を特定する。   When the execution step uses an FD device (in the case of “Yes” in step S101), the medium format specifying unit 113 specifies the format of the FD used in the execution step (step S102). Specifically, the medium format specifying unit 113 specifies format information (for example, an IBM format or a DOS format) specified in a program called in the execution step.

そして、命令解析部111は、実行ステップでFDアクセスを継続させるか否かを特定する(ステップS103)。具体的には、命令解析部111は、実行ステップの次の実行ステップにおいてFDアクセスを行う処理が実施されるか否かを特定し、FDアクセスを行う処理が実施される場合には、FDアクセスを継続させ、実施されない場合には、FDアクセスを継続させないことを特定する。   Then, the instruction analysis unit 111 specifies whether or not to continue the FD access in the execution step (step S103). Specifically, the instruction analysis unit 111 specifies whether or not the process for performing the FD access is performed in the execution step subsequent to the execution step, and when the process for performing the FD access is performed, the FD access If it is not implemented, it is specified that the FD access is not continued.

そして、命令解析部111は、実行ステップにおいて呼び出すラッパープログラムを引き当て、特定する(ステップS104)。具体的には、命令解析部111は、実行ステップにて使用する装置、使用するフォーマット、次の実行ステップにおいても継続してアクセスするか否かに応じて、使用するラッパープログラムをラッパープログラム記憶部126から特定する。そして、命令解析部111は、命令解析処理を終了させる。なお、本実施形態にかかるラッパープログラムとしては、以下の13パターンを想定している。   Then, the instruction analysis unit 111 allocates and specifies a wrapper program to be called in the execution step (step S104). Specifically, the instruction analysis unit 111 determines the wrapper program storage unit to use according to the device to be used in the execution step, the format to be used, and whether to continuously access in the next execution step. 126. Then, the instruction analysis unit 111 ends the instruction analysis process. Note that the following 13 patterns are assumed as the wrapper program according to the present embodiment.

第1のパターンは、FD装置に対して、DOSフォーマットにより指定ファイルをコピーする処理であって、終了処理を行わない(継続処理を行う)コマンドを実行する第1のラッパープログラムである。   The first pattern is a first wrapper program that executes a command for copying a specified file to the FD device in the DOS format and does not perform a termination process (performs a continuation process).

第2のパターンは、FD装置に対して、DOSフォーマットにより指定ファイルをコピーする処理であって、終了処理を行う(継続処理を行わない)コマンドを実行する第2のラッパープログラムである。   The second pattern is a second wrapper program for executing a command for performing a termination process (not performing a continuation process), which is a process for copying a specified file in the DOS format to the FD apparatus.

第3のパターンは、FD装置に対して、IBMフォーマットにより指定ファイルをコピーする処理であって、終了処理を行わない(継続処理を行う)コマンドを実行する第3のラッパープログラムである。   The third pattern is a third wrapper program that executes a command for copying a specified file in the IBM format to the FD device, and does not perform a termination process (performs a continuation process).

第4のパターンは、FD装置に対して、IBMフォーマットにより指定ファイルをコピーする処理であって、終了処理を行う(継続処理を行わない)コマンドを実行する第4のラッパープログラムである。   The fourth pattern is a fourth wrapper program for executing a command for performing a termination process (not performing a continuation process), which is a process for copying a specified file to the FD apparatus in the IBM format.

第5のパターンは、CMT装置に対して、ノンラベル形式により指定ファイルをコピーする処理であって、終了処理を行わない(継続処理を行う)コマンドを実行する第5のラッパープログラムである。   The fifth pattern is a fifth wrapper program that executes a command for copying a designated file in a non-label format to the CMT apparatus and executing a command that does not perform termination processing (performs continuation processing).

第6のパターンは、CMT装置に対して、ノンラベル形式により指定ファイルをコピーする処理であって、終了処理を行う(継続処理を行わない)コマンドを実行する第6のラッパープログラムである。   The sixth pattern is a sixth wrapper program for executing a command for performing a termination process (not performing a continuation process), which is a process for copying a designated file to the CMT apparatus in a non-label format.

第7のパターンは、CMT装置に対して、ノンラベル形式によりテープ内のデータを全件コピーする処理を行うコマンドを実行する第7のラッパープログラムである。   The seventh pattern is a seventh wrapper program that executes a command for performing a process of copying all data in the tape in a non-label format to the CMT apparatus.

第8のパターンは、CMT装置に対して、標準ラベル形式により固定長の指定ファイルをコピーする処理であって、終了処理を行わない(継続処理を行う)コマンドを実行する第8のラッパープログラムである。   The eighth pattern is an eighth wrapper program for executing a command that does not perform a termination process (performs a continuation process), which is a process for copying a fixed-length designated file in a standard label format to the CMT device. is there.

第9のパターンは、CMT装置に対して、標準ラベル形式により固定長の指定ファイルをコピーする処理であって、終了処理を行う(継続処理を行わない)コマンドを実行する第9のラッパープログラムである。   The ninth pattern is a ninth wrapper program for executing a command for performing a termination process (not performing a continuation process), which is a process for copying a fixed-length designated file in a standard label format to the CMT device. is there.

第10のパターンは、CMT装置に対して、標準ラベル形式によりテープ内の固定長の指定ファイルを全件コピーする処理を行う第10のラッパープログラムである。   The tenth pattern is a tenth wrapper program that performs a process of copying all fixed-length designated files in the tape to the CMT apparatus in a standard label format.

第11のパターンは、CMT装置に対して、標準ラベル形式により可変長の指定ファイルをコピーする処理であって、終了処理を行わない(継続処理を行う)コマンドを実行する第11のラッパープログラムである。   The eleventh pattern is an eleventh wrapper program for executing a command that does not perform termination processing (performs continuation processing), which is processing for copying a specified file having a variable length in the standard label format to the CMT device. is there.

第12のパターンは、CMT装置に対して、標準ラベル形式により可変長の指定ファイルをコピーする処理であって、終了処理を行う(継続処理を行わない)コマンドを実行する第12のラッパープログラムである。   The twelfth pattern is a twelfth wrapper program for executing a command for performing a termination process (no continuation process), which is a process of copying a variable-length designated file in the standard label format to the CMT device. is there.

第13のパターンは、CMT装置に対して、標準ラベル形式によりテープ内の可変長の指定ファイルを全件コピーする処理を行う第13のラッパープログラムである。   The thirteenth pattern is a thirteenth wrapper program that performs processing for copying all variable length designated files in the tape in the standard label format to the CMT apparatus.

なお、以上13パターンそれぞれについて別個独立したラッパープログラムを対応付ける必要はなく、複数のパターンを入力引数等のパラメーターにより切り替えることのできるラッパープログラムを対応付けるようにしてもよい。   Note that it is not necessary to associate a separate and independent wrapper program for each of the above 13 patterns, and a wrapper program that can switch a plurality of patterns by a parameter such as an input argument may be associated.

実行ステップはFD装置を使用しない場合(ステップS101において「No」の場合)には、使用装置特定部112は、実行ステップの入出力にCMTの指定があるか否か判定する(ステップS105)。具体的には、使用装置特定部112は、実行ステップにおいて呼び出すプログラムについて、命令使用装置対応情報記憶部123の条件123Aに相当するか否かを特定し、相当する場合には、使用装置123Bの情報を取得して、CMT装置を使用するか否か判定する。実行ステップではCMT装置の指定がない場合には、命令解析部111は、命令解析処理を終了させる。   When the execution step does not use the FD device (in the case of “No” in step S101), the using device specifying unit 112 determines whether or not the CMT is specified in the input / output of the execution step (step S105). Specifically, the using device specifying unit 112 specifies whether or not the program called in the execution step corresponds to the condition 123A of the instruction using device correspondence information storage unit 123. Information is acquired to determine whether to use the CMT device. If no CMT device is specified in the execution step, the command analysis unit 111 ends the command analysis processing.

実行ステップの入出力にCMTの指定がある場合(ステップS105にて「Yes」の場合)には、媒体フォーマット特定部113は、実行ステップの入出力はノンラベル指定があるか否かを判定する(ステップS106)。具体的には、媒体フォーマット特定部113は、実行ステップにおいて、フォーマット情報記憶部124の条件124Aに相当するか否かを特定し、相当する場合には、媒体フォーマット124Bの情報を取得してノンラベル形式に該当するか否かに応じてノンラベル指定があると判定する。そうでない場合には、標準ラベル指定があると判定する。   When the input / output of the execution step has a CMT designation (in the case of “Yes” in step S105), the medium format specifying unit 113 determines whether the input / output of the execution step has a non-label designation ( Step S106). Specifically, in the execution step, the medium format specifying unit 113 specifies whether or not it corresponds to the condition 124A of the format information storage unit 124, and if so, acquires information on the medium format 124B and performs non-labeling. It is determined that there is a non-label designation depending on whether it corresponds to the format. Otherwise, it is determined that there is a standard label designation.

実行ステップの入出力はノンラベル指定がある場合(ステップS106にて「Yes」の場合)には、命令解析部111は、実行ステップの入出力は共にCMTであるか否かを判定する(ステップS107)。具体的には、命令解析部111は、実行ステップの入出力が共にCMTであるか否かを判定する。共にCMTである場合には、命令解析部111は、制御をステップS104に進める。   If there is a non-label designation for the input / output of the execution step (“Yes” in step S106), the instruction analysis unit 111 determines whether both of the input / output of the execution step are CMT (step S107). ). Specifically, the instruction analysis unit 111 determines whether or not the input and output of the execution step are both CMT. If both are CMT, the command analysis unit 111 advances the control to step S104.

実行ステップの入出力のいずれかがCMTではない場合(ステップS107にて「No」の場合)には、命令解析部111は、実行ステップの次のステップでもCMT指定を行っているか否か特定する(ステップS108)。具体的には、命令解析部111は、実行ステップの次の実行ステップにおいてCMTアクセスを行う処理が実施されるか否かを特定し、CMTアクセスを行う処理が実施される場合には、CMTアクセスを継続させ、実施されない場合には、CMTアクセスを継続させないことを特定する。そして、命令解析部111は、制御をステップS104に進める。   If any of the input / output of the execution step is not CMT (“No” in step S107), the instruction analysis unit 111 identifies whether CMT designation is also performed in the next step of the execution step. (Step S108). Specifically, the instruction analysis unit 111 specifies whether or not a process for performing CMT access is performed in an execution step subsequent to the execution step, and when a process for performing CMT access is performed, the CMT access If it is not implemented, it is specified that CMT access is not continued. Then, the instruction analysis unit 111 advances the control to step S104.

実行ステップの入出力はノンラベル指定がない場合(ステップS106にて「No」の場合)には、命令解析部111は、実行ステップで使用するファイルは固定長か否かを特定する(ステップS109)。具体的には、命令解析部111は、カタログ情報記憶部125を参照して、実行ステップで使用するファイルのファイル形式125Bの情報を読み出し、読み出した情報が「固定長」であれば、固定長であると特定する。そうでない場合には、固定長でないと特定する。   If there is no non-label designation for the input / output of the execution step (“No” in step S106), the instruction analysis unit 111 identifies whether the file used in the execution step has a fixed length (step S109). . Specifically, the instruction analysis unit 111 reads the information of the file format 125B of the file used in the execution step with reference to the catalog information storage unit 125, and if the read information is “fixed length”, the fixed length To be identified. If not, specify not fixed length.

次に、命令解析部111は、実行ステップの入出力は共にCMTであるか否かを判定する(ステップS110)。具体的には、命令解析部111は、実行ステップの入出力が共にCMTであるか否かを判定する。共にCMTである場合には、命令解析部111は、制御をステップS104に進める。   Next, the instruction analysis unit 111 determines whether or not the input and output of the execution step are both CMT (step S110). Specifically, the instruction analysis unit 111 determines whether or not the input and output of the execution step are both CMT. If both are CMT, the command analysis unit 111 advances the control to step S104.

実行ステップの入出力のいずれかがCMTではない場合(ステップS110にて「No」の場合)には、命令解析部111は、実行ステップの次のステップでもCMT指定を行っているか否か特定する(ステップS111)。具体的には、命令解析部111は、実行ステップの次の実行ステップにおいてCMTアクセスを行う処理が実施されるか否かを特定し、CMTアクセスを行う処理が実施される場合には、CMTアクセスを継続させ、実施されない場合には、CMTアクセスを継続させないことを特定する。そして、命令解析部111は、制御をステップS104に進める。   If any of the input / output of the execution step is not CMT (“No” in step S110), the instruction analysis unit 111 identifies whether CMT designation is also performed in the next step of the execution step. (Step S111). Specifically, the instruction analysis unit 111 specifies whether or not a process for performing CMT access is performed in an execution step subsequent to the execution step, and when a process for performing CMT access is performed, the CMT access If it is not implemented, it is specified that CMT access is not continued. Then, the instruction analysis unit 111 advances the control to step S104.

以上が、命令解析処理の処理フローである。命令解析処理によると、汎用機で用いるJCL等のプログラムを、オープン系システムにて用いるJCL等のプログラムに変換する際に、置換すべき命令を特定することができる。   The above is the process flow of the instruction analysis process. According to the instruction analysis process, when a program such as JCL used in a general-purpose machine is converted into a program such as JCL used in an open system, an instruction to be replaced can be specified.

以上が、本発明に係る第一の実施形態を適用した移行システム1について説明した。当該実施形態によると、汎用機において用いていたハードウェア依存の既存のプログラムについて、ハードの依存性を低く抑えることができる。   The above is the description of the migration system 1 to which the first embodiment according to the present invention is applied. According to the present embodiment, the hardware dependency of the existing hardware-dependent program used in the general-purpose machine can be kept low.

本発明は、上記の第一の実施形態に制限されない。上記の第一の実施形態は、本発明の技術的思想の範囲内で様々な変形が可能である。例えば、上記の第一の実施形態においては、JCLをオープンシステムにおいて実行可能なJCLとして変換して保管する例を示しているが、これに限られず、JCLの実行時に変換して実行するようにしてもよい。このようにすることで、JCLの変換作業を予めせずとも、オープン環境においてオンデマンドで実行可能となる技術を提供することができる。   The present invention is not limited to the first embodiment described above. The first embodiment described above can be variously modified within the scope of the technical idea of the present invention. For example, in the first embodiment described above, an example is shown in which JCL is converted and stored as JCL that can be executed in an open system. However, the present invention is not limited to this, and is converted and executed when JCL is executed. May be. In this way, it is possible to provide a technique that can be executed on demand in an open environment without performing JCL conversion work in advance.

なお、本実施形態のプログラム移行処理においては、命令解析処理と、プログラム変換処理とを別のステップとしているが、命令解析処理の途中でプログラムの変換が可能となった場合には随時変換するようにしてもよい。   In the program migration process of this embodiment, the instruction analysis process and the program conversion process are separate steps. However, if the program can be converted in the middle of the instruction analysis process, it is converted as needed. It may be.

また、本実施形態のプログラム移行処理は、工程を下記5つのステップに分割するようにしてもよい。例えば、第1の工程「使用命令の調査」では、プログラム使用装置対応情報記憶部122を参照して、JCL中に指定されているプログラム名やユーティリティ名からFD装置やCMT装置を使用しているかの判定を行う。第2の工程「装置指定の調査」では、命令使用装置対応情報記憶部123を参照して、JCL中の記述がどの媒体を指定しているかを判定する。たとえば、本判定でDOS形式のFDを使用するユーティリティまたは、IBM形式のFDを使用するユーティリティを使用している場合には、FDを使用していることを確定する。   Further, in the program migration process of the present embodiment, the process may be divided into the following five steps. For example, in the first step “investigation of used instructions”, whether the FD device or the CMT device is used from the program name or utility name specified in the JCL with reference to the program use device correspondence information storage unit 122. Judgment is made. In the second step “investigation of device designation”, it is determined with reference to the instruction using device correspondence information storage unit 123 which medium is designated by the description in the JCL. For example, when a utility using a DOS format FD or a utility using an IBM format FD is used in this determination, it is determined that the FD is used.

また、第3の工程「媒体フォーマットの調査」では、フォーマット情報記憶部124を参照して、JCL中の記述が媒体のどのフォーマットを指定しているかを特定する。前判定でDOSフォーマットのFDを使用するユーティリティを使用している場合には、DOSフォーマット形式であり、IBMフォーマットのFDを使用するユーティリティを使用している場合には、IBMフォーマットのFDを使用する処理であることが特定される。   Further, in the third step “examine media format”, the format information storage unit 124 is referred to, and the format in the medium specified by the description in the JCL is specified. If a utility that uses the DOS format FD is used in the pre-determination, the DOS format format is used. If a utility that uses the IBM format FD is used, the IBM format FD is used. It is identified as a process.

また、本判定においては、CMTを指定してあり、かつノンラベル形式をしていている場合には、ノンラベル形式のCMTを使用していると判定する。前述の指定がない場合には、標準ラベル形式のCMTを使用していると判定する。   In this determination, if the CMT is designated and the non-label format is used, it is determined that the non-label format CMT is used. If there is no such designation, it is determined that the standard label format CMT is used.

また、第4の工程「処理内容の調査」では、次ステップの後続処理の有無などを調べる。たとえば、FDの入れ替えが指定されている場合などは後続処理があると判定する。第5の工程「ファイル情報の調査」ではFD、CMT処理で使用されているファイルの形式などをJCL中のファイル名でカタログテーブルを検索して特定する。これらのステップを通して既存のJCL中にどのような処理が指定されているかを分類する。   Further, in the fourth process “inspection of processing contents”, the presence / absence of subsequent processing of the next step is checked. For example, when FD replacement is designated, it is determined that there is subsequent processing. In the fifth step “file information check”, the file format used in the FD and CMT processing is specified by searching the catalog table with the file name in the JCL. Through these steps, what processing is specified in the existing JCL is classified.

上記5つのステップでFD装置、CMT装置を使用していないと判定されたものは修正対象としないと判定する。既存JCL修正に先立ち、既存JCL構文解析で分類したパターンごとにラッパープログラムを作成しておき、ラッパープログラムを介してユーティリティの制御を行うようにする。既存JCLのFD処理、CMT処理が記述されたステップを、対応するラッパープログラムを呼び出す形に修正を行い、得られた修正版のJCLをサーバー用JCLとする。   If it is determined that the FD device or the CMT device is not used in the above five steps, it is determined that it is not a correction target. Prior to the modification of the existing JCL, a wrapper program is created for each pattern classified by the existing JCL syntax analysis, and the utility is controlled via the wrapper program. The steps in which the FD processing and CMT processing of the existing JCL are described are corrected to call the corresponding wrapper program, and the obtained corrected JCL is used as the server JCL.

JCL実行では、前工程で変換した個々のサーバー用JCLを実行することでラッパープログラムを介してFD装置、CMT装置を汎用機と同様に自動制御を実現する。   In JCL execution, automatic control of the FD device and the CMT device is realized in the same way as a general-purpose machine through a wrapper program by executing the JCL for each server converted in the previous process.

また、上記した実施形態の技術的要素は、単独で適用されてもよいし、プログラム部品とハードウェア部品のような複数の部分に分けられて適用されるようにしてもよい。   Further, the technical elements of the above-described embodiments may be applied independently, or may be applied by being divided into a plurality of parts such as program parts and hardware parts.

また、上記した第一の実施形態においては、FD装置107とCMT装置108とは、プログラム変換装置100のバスに接続されているが、これに限られない。例えば、ネットワーク等を介してプログラム変換装置100とは異なる他の装置にFD装置107およびCMT装置108が接続されるものであってもよい。その場合、ラッパープログラムは、ネットワーク等を介して他の装置に接続してFD装置107およびCMT装置108を制御するプログラムとなる。   In the first embodiment described above, the FD device 107 and the CMT device 108 are connected to the bus of the program conversion device 100, but the present invention is not limited to this. For example, the FD device 107 and the CMT device 108 may be connected to another device different from the program conversion device 100 via a network or the like. In this case, the wrapper program is a program that controls the FD device 107 and the CMT device 108 by connecting to another device via a network or the like.

以上、本発明について、実施形態を中心に説明した。   In the above, this invention was demonstrated centering on embodiment.

1・・・移行システム、100・・・プログラム変換装置、110・・・制御部、111・・・命令解析部、112・・・使用装置特定部、113・・・媒体フォーマット特定部、114・・・プログラム変換部、115・・・プログラム実行制御部、116・・・外部機器制御部、120・・・記憶部 DESCRIPTION OF SYMBOLS 1 ... Migration system, 100 ... Program conversion apparatus, 110 ... Control part, 111 ... Instruction analysis part, 112 ... Use apparatus specific | specification part, 113 ... Medium format specific part, 114. ..Program conversion unit, 115 ... Program execution control unit, 116 ... External device control unit, 120 ... Storage unit

Claims (10)

コンピューターに対する処理の所定の命令を特定する命令特定部と、
前記命令に係る処理に用いる装置を特定する装置特定部と、
前記命令において前記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定部と、
前記命令において前記装置への前記データの書き込み後に終了処理を行うか否かを特定する終了特定部と、
特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じて呼び出すプログラムを特定し、前記所定の命令を、前記プログラムを呼び出す命令に置換する命令置換部と、
を備えることを特徴とするプログラム変換装置。
An instruction specifying unit for specifying a predetermined instruction for processing to the computer;
A device specifying unit for specifying a device used for processing related to the command;
A data format specifying unit for specifying a format of data to be written to the device in the command;
An end specifying unit for specifying whether or not to perform end processing after writing the data to the device in the command;
An instruction replacement unit that identifies the program to be called according to whether or not to perform the specified process, the format of the data, and the termination process, and replaces the predetermined instruction with an instruction to call the program;
A program conversion apparatus comprising:
請求項1に記載のプログラム変換装置であって、
前記データフォーマット特定部は、前記装置がCMT装置である場合には、前記命令に応じて、ノンラベル形式と標準ラベル形式とを含む複数のフォーマットのうち一つのフォーマットを特定する、
ことを特徴とするプログラム変換装置。
The program conversion device according to claim 1,
When the device is a CMT device, the data format specifying unit specifies one format among a plurality of formats including a non-label format and a standard label format according to the command.
The program conversion apparatus characterized by the above-mentioned.
請求項1または2に記載のプログラム変換装置であって、
ファイルごとに可変長あるいは固定長の形式を対応付けるカタログ情報を格納する記憶部を備え、
前記データフォーマット特定部は、前記装置がCMT装置である場合には、前記データが固定長または可変長のいずれであるかを、前記データに係るファイルについて前記カタログ情報を用いて特定する、
ことを特徴とするプログラム変換装置。
The program conversion device according to claim 1 or 2,
It has a storage unit that stores catalog information that associates variable length or fixed length formats for each file.
The data format specifying unit specifies, when the device is a CMT device, whether the data is a fixed length or a variable length using the catalog information for a file related to the data.
The program conversion apparatus characterized by the above-mentioned.
請求項1〜3のいずれか一項に記載のプログラム変換装置であって、
前記データフォーマット特定部は、前記装置がFD装置である場合には、前記命令の種類に応じて、DOSフォーマットあるいはIBMフォーマットを含む複数のフォーマットのうち一つのフォーマットを特定する、
ことを特徴とするプログラム変換装置。
The program conversion device according to any one of claims 1 to 3,
When the device is an FD device, the data format specifying unit specifies one format among a plurality of formats including a DOS format or an IBM format according to the type of the instruction.
The program conversion apparatus characterized by the above-mentioned.
請求項1〜4のいずれか一項に記載のプログラム変換装置であって、
前記終了特定部は、前記所定の命令の次に実行する命令が前記装置を用いるものである場合には、前記終了処理を行わないと特定する、
ことを特徴とするプログラム変換装置。
The program conversion device according to any one of claims 1 to 4,
The end specifying unit specifies that the end process is not performed when an instruction to be executed next to the predetermined instruction uses the device.
The program conversion apparatus characterized by the above-mentioned.
請求項1〜5のいずれか一項に記載のプログラム変換装置であって、
前記所定の命令は、JCLで記述された命令である、
ことを特徴とするプログラム変換装置。
A program conversion device according to any one of claims 1 to 5,
The predetermined instruction is an instruction written in JCL.
The program conversion apparatus characterized by the above-mentioned.
請求項1〜6のいずれか一項に記載のプログラム変換装置であって、
前記呼び出すプログラムは、特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じた制御を記憶装置に対して行うプログラムである、
ことを特徴とするプログラム変換装置。
The program conversion device according to any one of claims 1 to 6,
The program to be called is a program for performing control on a storage device according to whether the specified device, the format of the data, or the termination process is performed.
The program conversion apparatus characterized by the above-mentioned.
コンピューターに対する処理の所定の命令を実行する命令実行部と、
前記命令に係る処理に用いる装置を特定する装置特定部と、
前記命令において前記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定部と、
前記命令において前記装置への前記データの書き込み後に終了処理を行うか否かを特定する終了特定部と、
特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じて呼び出すプログラムを特定し、前記所定の命令を、前記プログラムを呼び出す命令に置換する命令置換部と、を備え、
前記命令実行部は、前記所定の命令に代えて、前記プログラムを呼び出す命令を実行する、
ことを特徴とするプログラム実行装置。
An instruction execution unit for executing predetermined instructions for processing to the computer;
A device specifying unit for specifying a device used for processing related to the command;
A data format specifying unit for specifying a format of data to be written to the device in the command;
An end specifying unit for specifying whether or not to perform end processing after writing the data to the device in the command;
An instruction replacement unit that specifies the device to be identified, a format of the data, a program to be called according to whether or not to perform the termination process, and replaces the predetermined instruction with an instruction to call the program;
The instruction execution unit executes an instruction for calling the program instead of the predetermined instruction.
A program execution device.
コンピューターを用いたプログラム変換方法であって、
前記コンピューターは、
コンピューターに対する処理の所定の命令を特定する命令特定ステップと、
前記命令に係る処理に用いる装置を特定する装置特定ステップと、
前記命令において前記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定ステップと、
前記命令において前記装置への前記データの書き込み後に終了処理を行うか否かを特定する終了特定ステップと、
特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じて呼び出すプログラムを特定し、前記所定の命令を、前記プログラムを呼び出す命令に置換する命令置換ステップと、
を実施することを特徴とするプログラム変換方法。
A program conversion method using a computer,
The computer
An instruction specifying step for specifying a predetermined instruction for processing to the computer;
A device specifying step for specifying a device used for processing related to the command;
A data format specifying step for specifying a format of data to be written to the device in the command;
An end specifying step for specifying whether or not to perform end processing after writing the data to the device in the command;
An instruction replacing step of identifying the program to be called according to whether the specified device, the format of the data, or whether to perform the termination process, and replacing the predetermined instruction with an instruction to call the program;
The program conversion method characterized by implementing.
コンピューターに、プログラム変換手順を実行させるプログラムであって、
前記コンピューターを、制御手段として動作させ、
前記制御手段に対して、
コンピューターに対する処理の所定の命令を特定する命令特定手順と、
前記命令に係る処理に用いる装置を特定する装置特定手順と、
前記命令において前記装置へ書き込むデータのフォーマットを特定するデータフォーマット特定手順と、
前記命令において前記装置への前記データの書き込み後に終了処理を行うか否かを特定する終了特定手順と、
特定された前記装置、前記データのフォーマット、前記終了処理を行うか否かに応じて呼び出すプログラムを特定し、前記所定の命令を、前記プログラムを呼び出す命令に置換する命令置換手順と、
を実行させることを特徴とするプログラム。
A program that causes a computer to execute a program conversion procedure,
Operating the computer as control means;
For the control means,
An instruction specifying procedure for specifying a predetermined instruction for processing to the computer;
A device specifying procedure for specifying a device to be used for processing related to the command;
A data format specifying procedure for specifying a format of data to be written to the device in the command;
An end specifying procedure for specifying whether or not to perform end processing after writing the data to the device in the command;
An instruction replacement procedure for specifying the device to be called according to whether the specified device, the format of the data, or whether to perform the termination process, and replacing the predetermined instruction with an instruction for calling the program;
A program characterized by having executed.
JP2013071161A 2013-03-29 2013-03-29 Program conversion device, program execution device, program conversion method, and conversion program Expired - Fee Related JP6097118B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013071161A JP6097118B2 (en) 2013-03-29 2013-03-29 Program conversion device, program execution device, program conversion method, and conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013071161A JP6097118B2 (en) 2013-03-29 2013-03-29 Program conversion device, program execution device, program conversion method, and conversion program

Publications (2)

Publication Number Publication Date
JP2014194705A true JP2014194705A (en) 2014-10-09
JP6097118B2 JP6097118B2 (en) 2017-03-15

Family

ID=51839903

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013071161A Expired - Fee Related JP6097118B2 (en) 2013-03-29 2013-03-29 Program conversion device, program execution device, program conversion method, and conversion program

Country Status (1)

Country Link
JP (1) JP6097118B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017058728A (en) * 2015-09-14 2017-03-23 富士通株式会社 Program, information processing apparatus, and method of automatically generating job control language

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06318151A (en) * 1992-09-09 1994-11-15 Central Syst Kk Device and method for conversion between flowchart and processing program
JPH08147156A (en) * 1994-11-21 1996-06-07 Shunei Iida Program transporting system
US5678044A (en) * 1995-06-02 1997-10-14 Electronic Data Systems Corporation System and method for improved rehosting of software systems
US20050076168A1 (en) * 2003-10-06 2005-04-07 Sun Microsystems, Inc. Logical devices as a wrapper for physical devices in a system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06318151A (en) * 1992-09-09 1994-11-15 Central Syst Kk Device and method for conversion between flowchart and processing program
JPH08147156A (en) * 1994-11-21 1996-06-07 Shunei Iida Program transporting system
US5678044A (en) * 1995-06-02 1997-10-14 Electronic Data Systems Corporation System and method for improved rehosting of software systems
US20050076168A1 (en) * 2003-10-06 2005-04-07 Sun Microsystems, Inc. Logical devices as a wrapper for physical devices in a system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017058728A (en) * 2015-09-14 2017-03-23 富士通株式会社 Program, information processing apparatus, and method of automatically generating job control language

Also Published As

Publication number Publication date
JP6097118B2 (en) 2017-03-15

Similar Documents

Publication Publication Date Title
JP5129929B2 (en) How to instrument code with restrictive calling conventions
KR101699981B1 (en) Memory optimization of virtual machine code by partitioning extraneous information
JP5284905B2 (en) Data migration method and program
US20240045850A1 (en) Systems and methods for database orientation transformation
CN110941456B (en) On-demand loading of dynamic scripting language code to reduce memory usage
CN107766130B (en) Method and device for migrating virtual machine to container
CN103853535A (en) Method and device for modifying middleware
CN107544811B (en) Method, storage medium, electronic device and system for hiding dylib file in IOS platform
JP5475199B2 (en) File processing apparatus for executing preprocessed file and recording medium for performing the method by computer
JP5536593B2 (en) Optimization device, optimization method, and compiler program
US20210165643A1 (en) User Interface Resource File Optimization
US20100180281A1 (en) Offline migration from prior operating system installation
JP6097118B2 (en) Program conversion device, program execution device, program conversion method, and conversion program
US9597039B2 (en) Devices, methods and computer readable mediums for on demand personalization of a user interface
CN106484375B (en) Instruction block loading method, soft switch equipment and system
CN112069189A (en) Method and system for updating multi-level mapping table, terminal device and storage medium
CN110806891A (en) Method and device for generating software version of embedded equipment
JP2016224559A (en) Program creation support device, control method and program
CN101673242A (en) Method and device for formatting hard disk
JP5686686B2 (en) Program trace management apparatus, program trace management method and program
US20110099534A1 (en) Information processing apparatus, execution program operation modification method, and recording medium
JP6295914B2 (en) Programmable controller system, its support device, programmable controller
JP5061086B2 (en) Job management method, execution apparatus and program thereof
JP6639238B2 (en) Programs and computers
US9928045B2 (en) Information processing apparatus, compile method and non-transitory recording medium storing compile program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160318

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170130

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: 20170207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170217

R150 Certificate of patent or registration of utility model

Ref document number: 6097118

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees