CN102147789B - VSAM (virtual storage access method) file cross-platform textualized conversion system and method - Google Patents
VSAM (virtual storage access method) file cross-platform textualized conversion system and method Download PDFInfo
- Publication number
- CN102147789B CN102147789B CN 201010112401 CN201010112401A CN102147789B CN 102147789 B CN102147789 B CN 102147789B CN 201010112401 CN201010112401 CN 201010112401 CN 201010112401 A CN201010112401 A CN 201010112401A CN 102147789 B CN102147789 B CN 102147789B
- Authority
- CN
- China
- Prior art keywords
- vsam
- record
- data
- file
- cast
- 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.)
- Expired - Fee Related
Links
Images
Abstract
The invention discloses a VSAM (virtual storage access method) file cross-platform textualized conversion system and a method. The invention aims at converting a virtual storage access method (VSAM) file used in a host system into a VSAM file applicable to an open system. The system comprises a recording model compilation unit, a recording model base, a data block locating and extracting unit, a recorded data locating and extracting unit and a data type analyzing and converting unit, wherein the recording model compilation unit is used for compiling a VSAM recording structure into a recording model and storing the recording model in a model base; the recording model base is used for storing all compiled and recognized recording models; the data block locating and extracting unit locates and extracts all data blocks from the VSAM file; the recorded data locating and extracting unit analyzes and extracts all effective records in the data blocks; the data type analyzing and converting unit comprises a character coding and converting table which is used for recording a middle character set converting reference table; and the data type analyzing and converting unit is used for analyzing and converting field values in the records to textualized data according to the recording model.
Description
Technical field
The present invention relates to a kind of for the virtual storage access method that uses in host computer system or call virtual store access method (VSAM) file and re-use and be converted to converting system and method for the applicable VSAM file of open system.
Background technology
" host computer system " is an industrial technology term, and it refers to by government organs or large industry and commerce group, such as the mainframe computer of the manufacturing of American I BM company and use.Host computer system is mainly used in carrying out the required calculating of industry and commerce activity of major company and financial institution.The cost of manufacture of this host computer system is high, and cost of manufacture increases year by year.Therefore, the host computer system environment substitutes such as Linux or UNIX or Windows etc. progressively by open system environment in recent years.And Linux or UNIX or Windows are designed to realize the operating system that links from the hardware and software of different Technological Problems In Computer Manufacturing enterprises.
Virtual storage access method or to be called virtual store access method (Virtual StorageAccess Method, be called for short VSAM) be a kind of file management system used in the IBM host operating system.In the VSAM file system, data are with form tissue and the storage of logical record, record length can be fixed length or elongated, and VSAM is with index key or the relative byte location arrangement memory location of recording, and the VSAM file management system provides orderly instruction to create and access record in the VSAM file.
Along with the fast development of database technology, various database products such as DB2, Oracle etc. are more and more ripe and stable, and data base management system (DBMS) replaces the VSAM file system gradually, becomes the main tool of application system data store and management.Data based demand in original VSAM file also needs to move in the new application platform and data management system, a kind of common demand is with VSAM file record text, be converted to tradable intermediate form, such as the text of set form or the data interchange format file of extend markup language (XML) definition, data in this intermediate form file can be employed system introducing or directly use, and also can be used for the swap data between the system.Because the character in the VSAM file adopts expansion two, decimal interchange code (ExtendedBinary-Coded Decimal Interchange Code usually, be called for short EBCDIC), therefore usually the character conversion in the VSAM file need to be become widely used ASCII character or Unicode coding during text output, this just need to increase the operation of character code type conversion in the process of text output.
The common method of VSAM file record textization is in VSAM host operating system environment, and the order and the instrument that utilize the VSAM file management system to provide are derived the record in the VSAM file and the format conversion outputs in the text.But, be redeveloped into the host computer system environment that tradition is used fully open system environment and will pay expensive cost, and will spend long time, its complicated operation of while, text inefficiency.
Summary of the invention
The object of the invention is to depend on the specific software and hardware environment such as host operating system and VSAM file management system for existing VSAM body of an instrument method, cost is higher, the problem of text complicated operation, inefficiency, and provide a kind of system and method for the new cross-platform text conversion of VSAM file, to reduce VSAM body of an instrument hardware and software cost, reduce the degree of complicated operation, improve the efficient of conversion operations.
In order to realize above-mentioned purpose, the present invention proposes a kind of method and system of new VSAM body of an instrument conversion.Core of the present invention is that VSAM body of an instrument process does not need to rely on specific host platform and VSAM file management system, but automatically extract the location by analysis and the record to VSAM file structure and character code mode, a cross-platform VSAM body of an instrument method is provided, can in PC (PC) and common operating system (as: Linux, Windows etc.) environment, carries out text to the VSAM file based on the system of the method.
Above-mentioned VSAM body of an instrument converting system comprises:
A VSAM record cast compilation unit; This VSAM record cast compilation unit is used for the VSAM interrecord structure is compiled into record cast, and record cast is stored in the model bank;
A VSAM record cast storehouse; This VSAM record cast storehouse is used for storage, and all have compiled the VSAM record cast of identification;
The location extraction unit of one or more VSAM data blocks; This VSAM data block location extraction unit is located from the VSAM file and is extracted all data blocks;
The location extraction unit of one or more VSAM record data; This VSAM record data location extraction unit analysis is also extracted all effective records in the data block;
One or more VSAM data types are resolved converting unit; This VSAM data type is resolved in the converting unit and is comprised a character code conversion table, and this character code conversion table is used for record character set conversion reference table; The VSAM data type is resolved converting unit according to record cast, each field value in the record is resolved convert the text data to.
Based on above-mentioned text converting system, the present invention proposes the method for the cross-platform text conversion of a kind of VSAM file, this method may further comprise the steps:
1, creates VSAM file record model.
2, input needs the VSAM file of text;
3, obtain the data model that records in this document;
4, locate and extract a data block;
5, obtain buffer descriptor information;
6, according to effectively recording number and record length in the descriptor, obtain a record;
7, according to record cast, field in the record is resolved and transcoding, generate target string;
8, repeating step 4~7, until the effective recording processing of all in the data block is complete;
9, repeating step 4~8, until the end of file;
10, target string is outputed in the file destination;
Wherein, the realization that step 1 is concrete comprises the steps:
1A, input interrecord structure definition information;
1B, interrecord structure definition information is compiled into record cast
1C, previous step is generated record cast add in the record cast storehouse.
Based on the method for the cross-platform text conversion of aforementioned VSAM file, the present invention also provides a kind of recording medium, and this recorded medium stores can be carried out the program of the method for the cross-platform text conversion of VSAM file.
The invention has the beneficial effects as follows, compared with prior art, by to VSAM file structure and interrecord structure modeling, adopt automatically to locate and extract the record data in the VSAM file and carry out code parsing and conversion among the present invention, the text data after then will changing output in the file destination.So that VSAM text process need not to depend on specific platform and file system, can the operation of cross-platform enforcement text, reduce text process cost and complexity, improved efficient.
The present invention is more clear to be understood with being convenient in order to make, and below by drawings and Examples it is described in further details.
Description of drawings
Fig. 1 is the structured flowchart of embodiment of the system of the cross-platform text conversion of VSAM file of the present invention;
Fig. 2 is the process flow diagram of the cross-platform text conversion method of VSAM file of the present invention embodiment;
Fig. 3 is the process flow diagram that the step 1 described in Fig. 2 creates record cast;
Embodiment
Referring to accompanying drawing 1.The VSAM file conversion that to use in host computer system 10 comprises for the converting system of text data applicable in for open system 30:
A VSAM record cast compilation unit 21; This VSAM record cast compilation unit 21 is used for the VSAM interrecord structure is compiled into record cast, and record cast is stored in the model bank 22;
A VSAM record cast storehouse 22; This VSAM record cast storehouse 22 is used for storage, and all have compiled the VSAM record cast of identification;
The location extraction unit 23 of one or more VSAM data blocks; This VSAM data block location extraction unit 23 is located from the VSAM file and is extracted all data blocks;
The location extraction unit 24 of one or more VSAM record data; All effective records in the data block are analyzed and extracted to this VSAM record data location extraction unit 24;
The parsing converting unit 25 of one or more VSAM data types; This VSAM data type is resolved in the converting unit 25 and is comprised a character code conversion table 251, and this character code conversion table 251 is used for record character set conversion reference table; The VSAM data type is resolved converting unit 25 according to record cast, each field value in the record is resolved convert the text data to.
Above-mentioned " host computer system " is an industrial technology term, and it refers to by government organs or large industry and commerce group, such as the mainframe computer of the manufacturing of American I BM company and use.Host computer system is mainly used in carrying out the required calculating of industry and commerce activity of major company and financial institution.
Above-mentioned open system is an industrial technology term, and it refers to the operating system for the link between the hardware and software of realizing different Technological Problems In Computer Manufacturing enterprises, such as Linux or UNIX or Windows etc.
Above-mentioned VSAM file is for using the index sequential file of dynamic index method, and it comprises the packet of data segment and index segment, rather than independent data.Described index segment is included in the data directory in the described data segment in the same packet.
With reference to accompanying drawing 2, the VSAM file conversion that will use in host computer system 10 of the present embodiment comprises the steps: for the conversion method of text data applicable in for open system 30
Step 201 creates record cast, and described record cast refers to the description to the record data structure in the specific VSAM file, and record is resolved modular converter and according to record cast each data field in the record resolved and changed;
Step 202, input needs the VSAM file of text;
Step 203 is obtained the data model of this VSAM file record from the record cast storehouse;
Step 204 locates and extracts a data block from the VSAM file;
Step 205 is obtained buffer descriptor information, and described buffer descriptor information comprises: effective record number of this data block length, data block, record length etc.;
Step 206 according to buffer descriptor information, locates and extracts an effective record from data block;
Step 207 according to the definition of record cast, is separated the data in the new record, according to the character code conversion table, the character string in the record is changed, and generates target string;
Step 209, repeating step 204~208 is until handle all data blocks in the VSAM file;
Step 210 outputs to file destination with target string, and this VSAM file conversion finishes.
With reference to accompanying drawing 3, abovementioned steps 201 creates record cast and comprises following step:
Step 303, the record cast that compiling is generated joins in the model bank.
In addition, the method for the cross-platform text conversion of aforesaid VSAM file can be stored on the computer readable recording medium storing program for performing with the form of computer code.This computer readable recording medium storing program for performing is that storage can be by any pen recorder or the device of computer system reads, such as ROM (read-only memory) (ROM), random access memory (RAM), Zip disk ROM (read-only memory) (CD-ROM), tape, hard disk, floppy disk, mobile memory, flash memory, optical data storage device and carrier wave (such as internet transmissions).
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (2)
1. the system of the cross-platform text conversion of VSAM file is characterized in that comprising:
A VSAM record cast compilation unit; This VSAM record cast compilation unit is used for the VSAM record data structure is compiled into record cast, and record cast is stored in the model bank;
A VSAM record cast storehouse; This VSAM record cast storehouse is used for storage, and all have compiled the VSAM record cast of identification;
The location extraction unit of one or more VSAM data blocks; This VSAM data block location extraction unit is located from the VSAM file and is extracted all data blocks;
The location extraction unit of one or more VSAM record data; This VSAM record data location extraction unit analysis is also extracted all effective records in the data block;
One or more VSAM data types are resolved converting unit; This VSAM data type is resolved in the converting unit and is comprised a character code conversion table, and this character code conversion table is used for record character set conversion reference table; The VSAM data type is resolved converting unit according to record cast, each field value in the record is resolved convert the text data to.
2. the method for the cross-platform text conversion of VSAM file is characterized in that comprising following step:
(1) creates VSAM file record model; The concrete realization of this step (1) comprises the steps:
(1A) input record data organization definition information;
(1B) record data structure definition information is compiled into record cast;
(1C) previous step being generated record cast adds in the record cast storehouse;
(2) input needs the VSAM file of text;
(3) from the record cast storehouse, obtain the data model that records in this document;
(4) from the VSAM file, locate and extract a data block;
(5) obtain buffer descriptor information, described buffer descriptor information comprises: effective record number of this data block length, data block, record length etc.;
(6) according to effectively recording number and record length in the descriptor, obtain an effective record;
(7) according to record cast, field in the record is resolved and transcoding, generate target string;
(8) repeating step 4~7, until the effective recording processing of all in the data block is complete;
(9) repeating step 4~8, until the end of file;
(10) target string is outputed in the file destination.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010112401 CN102147789B (en) | 2010-02-09 | 2010-02-09 | VSAM (virtual storage access method) file cross-platform textualized conversion system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010112401 CN102147789B (en) | 2010-02-09 | 2010-02-09 | VSAM (virtual storage access method) file cross-platform textualized conversion system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102147789A CN102147789A (en) | 2011-08-10 |
CN102147789B true CN102147789B (en) | 2013-01-23 |
Family
ID=44422055
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010112401 Expired - Fee Related CN102147789B (en) | 2010-02-09 | 2010-02-09 | VSAM (virtual storage access method) file cross-platform textualized conversion system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102147789B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5812843A (en) * | 1994-05-31 | 1998-09-22 | Fujitsu Limited | System and method for executing job between different operating systems |
CN101553800A (en) * | 2006-10-17 | 2009-10-07 | 三星Sds株式会社 | Migration apparatus which convert SAM/VSAM files of mainframe system into SAM/VSAM files of open system and method for thereof |
CN101553794A (en) * | 2006-10-27 | 2009-10-07 | 三星Sds株式会社 | Rehosting method which convert mainframe system into open system |
-
2010
- 2010-02-09 CN CN 201010112401 patent/CN102147789B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5812843A (en) * | 1994-05-31 | 1998-09-22 | Fujitsu Limited | System and method for executing job between different operating systems |
CN101553800A (en) * | 2006-10-17 | 2009-10-07 | 三星Sds株式会社 | Migration apparatus which convert SAM/VSAM files of mainframe system into SAM/VSAM files of open system and method for thereof |
CN101553794A (en) * | 2006-10-27 | 2009-10-07 | 三星Sds株式会社 | Rehosting method which convert mainframe system into open system |
Also Published As
Publication number | Publication date |
---|---|
CN102147789A (en) | 2011-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7076486B2 (en) | Method and system for efficiently identifying differences between large files | |
CN101558405B (en) | Migration apparatus which convert database of mainframe system into database of open system and method for thereof | |
US7958133B2 (en) | Application conversion of source data | |
CN102122280B (en) | Method and system for intelligently extracting content object | |
KR101617696B1 (en) | Method and device for mining data regular expression | |
CN108280056A (en) | A kind of Excel file analytic method | |
CN101553779B (en) | Migration apparatus which convert application program of mainframe system into application program of open system and method for thereof | |
KR101379855B1 (en) | Method and apparatus for data migration from hierarchical database of mainframe system to rehosting solution database of open system | |
WO2006136055A1 (en) | A text data mining method | |
CN116450616A (en) | General heterogeneous relational database SQL migration method based on parse tree | |
CN104750744A (en) | Method and device for synchronizing compressed data on basis of Oracle databases | |
CN109446704B (en) | Product family finite element model parameterization method based on regular grammar | |
CN114036183A (en) | Data ETL processing method, device, equipment and medium | |
CN102147789B (en) | VSAM (virtual storage access method) file cross-platform textualized conversion system and method | |
CN101996161B (en) | A kind of old version data processing method of electronic document and device | |
CN101553800B (en) | Migration apparatus which convert SAM/VSAM files of mainframe system into SAM/VSAM files of open system and method for thereof | |
CN116303359A (en) | Method for realizing multi-type document export of database structure | |
CN110349635A (en) | A kind of parallel compression method of gene sequencing quality of data score | |
CN110007962A (en) | A kind of instruction-set simulation method based on Code automatic build | |
CN111427867B (en) | Model persistence method based on hybrid storage | |
CN115686493A (en) | Method for automatically generating interface control document by C language data structure code | |
CN106227857B (en) | Data-pushing and loading method and device | |
CN114691643A (en) | Data migration method and system applied to domestic substitution | |
CN110795409A (en) | Implementation method for importing parameters of conventional generator set into PSASP | |
CN110515913B (en) | Log processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20130123 Termination date: 20160209 |