CN113157277B - Host file processing method and device - Google Patents

Host file processing method and device Download PDF

Info

Publication number
CN113157277B
CN113157277B CN202110594771.8A CN202110594771A CN113157277B CN 113157277 B CN113157277 B CN 113157277B CN 202110594771 A CN202110594771 A CN 202110594771A CN 113157277 B CN113157277 B CN 113157277B
Authority
CN
China
Prior art keywords
file
host file
code system
field
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110594771.8A
Other languages
Chinese (zh)
Other versions
CN113157277A (en
Inventor
佘俊胜
谭汉清
谭炳洪
王稳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110594771.8A priority Critical patent/CN113157277B/en
Publication of CN113157277A publication Critical patent/CN113157277A/en
Application granted granted Critical
Publication of CN113157277B publication Critical patent/CN113157277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/53Decompilation; Disassembly
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application provides a method and a device for processing a host file, which relate to the field of computers and can also be used in the field of finance, wherein the method comprises the following steps: the host file processing method comprises the following steps: performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool; loading the host file after code conversion into tabular data processing software by using the macro code conversion tool for editing; and performing reverse code conversion on the edited host file by using the macro code conversion tool. The method and the device can be used for efficiently processing the host file by utilizing the pre-built macro code conversion tool.

Description

Host file processing method and device
Technical Field
The application relates to the technical field of computers, and can be used in the financial field, in particular to a method and a device for processing a host file.
Background
Conventionally, host files have been one of the most dominant data storage media in host systems because of their numerous advantages, such as fast read/write speeds and small storage space. Unlike database systems, the database systems can generally organize and manage data according to data structures, so that users can browse, query and edit the data conveniently. File access in a host system must rely on file structures to be realized. Only the file structure is used to locate the fields corresponding to each column in the file, otherwise the host file is a pile of chapter-free and trackable characters.
The host file may be edited on the z/OS operating system via a PCOM communications tool. However, for the file data which is not listed, each field needs to be identified manually by referring to the file structure, and the operation process is complicated. Although some auxiliary tools such as FA (File-Aid) and FM (File-Manager) are also provided on the host system, which can display and edit data in a File in columns according to a File structure, the interface for displaying characters in the PCOM communication tool is generally 32×80 characters, so that the function keys such as F7, F8, F10, F11 and the like are often used to scroll or page to find out a desired result, which is quite inconvenient in use.
In addition, only EBCDIC code characters, but not ASCII code characters and kanji characters, can be displayed on the host system. This problem also presents difficulties in host software development and testing. If the host file is downloaded to the local computer for development and testing, the data is generally required to be imported into the local software for data viewing, and the process of importing the data is complicated and easy to make mistakes, so that the downloaded non-EBCDIC code characters become messy codes. The above problems greatly affect the efficiency of development and testing.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a method and a device for processing a host file, which can efficiently process the host file by utilizing a pre-constructed macro code conversion tool.
In order to solve the technical problems, the application provides the following technical scheme:
in a first aspect, the present application provides a method for processing a host file, including:
performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
loading the host file after code conversion into tabular data processing software by using the macro code conversion tool for editing;
and performing reverse code conversion on the edited host file by using the macro code conversion tool.
Further, the step of pre-constructing a macro code conversion tool includes:
constructing a structure definition function according to the file structure of the host file;
constructing a field filling function according to the file structure;
constructing a code system conversion function according to a comparison table of the EBCDIC code system and the ASCII code system;
and combining the pre-constructed file uploading function, the structure definition function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
Further, the transcoding the downloaded host file by using a pre-built macro-transcoding tool includes:
reading the host file according to the file structure to obtain field information of the host file; the field information at least comprises a field name, a field type and a field length;
checking the validity of the host file according to the field information;
if the validity check is passed, converting from the EBCDIC code system to the ASCII code system according to the digital field and the character field in the host file respectively.
Further, the loading the host file after the code conversion into tabular data processing software by using the macro code conversion tool for editing includes:
acquiring each field data in the host file after code system conversion by using the macro code system conversion tool, and loading each field data into a worksheet of the tabular data processing software;
editing the field data in the worksheet.
Further, the performing inverse code conversion on the edited host file by using the macro code conversion tool includes:
reading edited data in each cell in the worksheet by using the macro code conversion tool, and splicing the data according to the file structure to obtain an edited host file;
performing reverse code conversion on the host file by using the macro code conversion tool;
and returning the host file subjected to the reverse code conversion back to the host.
In a second aspect, the present application provides a host file processing apparatus, including:
the code system conversion unit is used for carrying out code system conversion on the downloaded host file by utilizing a pre-constructed macro code system conversion tool;
the editing unit is used for loading the host file after code conversion into tabular data processing software by utilizing the macro code conversion tool for editing;
and the reverse code system conversion unit is used for performing reverse code system conversion on the edited host file by utilizing the macro code system conversion tool.
Further, the host file processing device includes:
a structure definition function construction unit for constructing a structure definition function according to the file structure of the host file;
a field filling function construction unit, configured to construct a field filling function according to the file structure;
the code system conversion function unit is used for constructing a code system conversion function according to the comparison table of the EBCDIC code system and the ASCII code system;
and the conversion tool generation unit is used for combining the pre-constructed file uploading function, the structure definition function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
Further, the code conversion unit includes:
the field information module is used for reading the host file according to the file structure to obtain the field information of the host file; the field information at least comprises a field name, a field type and a field length;
the validity checking module is used for checking the validity of the host file according to the field information;
and the code system conversion module is used for converting the EBCDIC code system into the ASCII code system according to the digital field and the character field in the host file if the validity check is passed.
Further, the editing unit includes:
the data loading module is used for acquiring each field data in the host file after code system conversion by using the macro code system conversion tool and loading each field data into a worksheet of the tabular data processing software;
and the editing module is used for editing the field data in the worksheet.
Further, the reverse code system conversion unit includes:
the file splicing module is used for reading the edited data in each cell in the worksheet by using the macro code conversion tool and splicing the data according to the file structure to obtain an edited host file;
the reverse code system conversion module is used for carrying out reverse code system conversion on the host file by utilizing the macro code system conversion tool;
and the file returning module is used for returning the host file subjected to the reverse code conversion to the host.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the host file processing method when the program is executed.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the host file processing method.
Aiming at the problems in the prior art, the host file processing method and the device provided by the application are realized based on the pre-constructed macro code conversion tool, and aim to realize the rapid editing of the host file by means of the tabular data processing software and other platforms. The research and development personnel do not need to deeply master the host technology, can easily finish host file management only by focusing on business data management, greatly reduces the threshold for operating host files, provides a simple, reliable and efficient file processing method for research and development based on the host, and improves user experience, research and development efficiency and research and development quality.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for processing a host file according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps for pre-building a macro code conversion tool according to an embodiment of the present application;
FIG. 3 is a flowchart of performing code conversion in an embodiment of the present application;
FIG. 4 is a flowchart of editing in tabular data processing software loaded in an embodiment of the present application;
FIG. 5 is a flow chart of reverse codebook transformation according to an embodiment of the present application;
FIG. 6 is a diagram illustrating a host file processing apparatus according to an embodiment of the present application;
FIG. 7 is a second block diagram of a host document processing device according to one embodiment of the present disclosure;
FIG. 8 is a block diagram of a code conversion unit according to an embodiment of the present application;
fig. 9 is a block diagram of an editing unit in the embodiment of the present application;
FIG. 10 is a block diagram of an inverse code conversion unit according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device in an embodiment of the present application;
FIG. 12 is a diagram illustrating the conversion of file codes according to an embodiment of the present application;
FIG. 13 is a diagram showing the comparison of EBCDIC code system and ASCII code system in the embodiment of the present application;
FIG. 14 is a diagram showing the comparison of the area code and the overseas code in the embodiment of the present application;
FIG. 15 is a schematic view of an Excel worksheet file in an embodiment of the present application;
fig. 16 is a flowchart of a procedure of platform reverse code conversion in the embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that the method and the device for processing the host file provided by the present application may be used in the financial field, and may also be used in any field other than the financial field, and the application field of the method and the device for processing the host file provided by the present application is not limited.
Referring to fig. 1, in order to enable efficient processing of a host file by using a pre-built macro-code conversion tool, the present application provides a host file processing method, including:
s101: performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
s102: loading the host file after code system conversion into tabular data processing software by using a macro code system conversion tool for editing;
s103: and performing reverse code conversion on the edited host file by using a macro code conversion tool.
It can be understood that the host file processing method provided by the application can be realized based on a pre-constructed macro code conversion tool, and aims to realize quick editing of the host file by means of a tabular data processing software and other platforms. The main body of the host file processing method may be a computer terminal or a server, which is not limited in this application.
The method can be realized by the following steps:
(1) the local computer terminal or server may download the host file via a file transfer protocol (File Transfer Protocol, FTP). The data code system of the host file is not converted in the downloading process.
(2) And analyzing a file structure (CopyBook) corresponding to the host file by utilizing a pre-constructed macro code conversion tool so as to obtain information such as the type, code system, length and the like of each field in the host file. For example, 9 (1) indicates that the field is an unsigned number field, 1 byte in length; x (60) indicates that the field is a character type field, and the length is 60 bytes. In addition, the sequence of each field can be obtained by reading the file structure.
(3) Traversing the host file, reading data in the file, and then performing code system conversion on the read data field by utilizing a macro code system conversion tool according to the analysis result in the step (2). The code system conversion in this step refers to the conversion from the host file code system to the local file code system. And loading the host file after code system conversion into tabular data processing software by using a macro code system conversion tool for editing. The tabular data processing software may include, but is not limited to, text editing software, microsoft Office Excel, microsoft Office Access, or other database software, among others. The embodiment of the application takes Microsoft Office Excel as an example to illustrate the feasibility of the method.
In an embodiment, the first 5 bytes from the 1 st column of the file can be parsed to be the region number through the file structure, the 6 th byte is the 17 th byte is the account information, the 23 rd byte is the 60 th byte is the account information, and the like. Therefore, the data in the corresponding byte range in the host file can be intercepted, and output to the worksheet corresponding to Excel for displaying in rows and columns. The file formed by this step may be referred to as a local file. In the embodiment of the present application, the local file may be an Excel worksheet file, as shown in fig. 15.
(4) And loading a pre-built macro code conversion tool into Excel software to generate an Excel macro. And reading the cells of each row and each column in the worksheet by using the Excel macro, and splicing each field of the local file into the host file again according to the length of each field by comparing the file structure.
(5) And performing code system conversion on the spliced host computer files by using a macro code system conversion tool, and transmitting the host computer files to the host computer by using an FTP protocol. The code system conversion in this step refers to conversion from a local file code system to a host file code system.
From the above description, the present invention provides a host file processing method, which can be implemented based on a pre-built macro code conversion tool, and aims to implement rapid editing of a host file by means of a tabular data processing software and other platforms. The research personnel does not need to deeply grasp the operation technology of the host computer file, can easily finish the operation of the host computer file only by focusing on the management of service data, greatly reduces the threshold of the operation of the host computer file, provides a simple, reliable and efficient file processing flow for research and development based on the host computer, and improves the user experience, research and development efficiency and research and development quality.
Referring to fig. 2, the step of pre-constructing a macro code conversion tool includes:
s201: constructing a structure definition function according to the file structure of the host file;
s202: constructing a field filling function according to the file structure;
s203: constructing a code system conversion function according to a comparison table of the EBCDIC code system and the ASCII code system;
s204: and combining the pre-constructed file uploading function, the structure definition function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
It will be appreciated that in constructing the structure definition function and the field filling function, the file structure of the host file needs to be obtained first. In the embodiment of the present application, the file structure of the host file may be shown by CopyBook. The structure definition function and the field filling function can be constructed by using a programming language according to the CopyBook of the host file, and the core codes are as follows: (the following code implementation generates the build field fill function)
In constructing the code system conversion function, a comparison table of EBCDIC code system and ASCII code system needs to be obtained (see fig. 13). In the embodiments of the present application, two kinds of code system conversion, namely forward and reverse, are involved. The forward code system conversion is the conversion from the host file code system to the local file code system; reverse codebook conversion refers to the conversion from a local file codebook to a host file codebook.
The code system conversion process for each field can be implemented as follows:
(1) checking whether the type of the data in each field is consistent with the nominal field type, whether the digital field contains characters, whether the date type field is in a date format and the like;
(2) and judging the byte length of each field, and complementing according to the definition length of each field. The term "complement" refers to that the length of data in each field is complemented to a predetermined length. For example, a numeric field may be appended 0 before the number, a character field may be appended empty after the data, etc.;
(3) for the digital field, conversion between ASCII code and EBCDIC code is required according to the above-described comparison table of code system conversion. At the time of conversion, it is necessary to distinguish between compression type conversion and non-compression type conversion. For example, the number 0x31323334 can be converted to compressed 0x01234 or uncompressed OxF F2F3F4; if the number is signed, the content of the last byte can be changed according to the sign; for a character type field, if the field is an ASCII code, it can be converted into an EBCDIC code. The above can be seen in fig. 12.
From the above description, the present invention provides a method for processing a host file, which can construct a macro code conversion tool.
Referring to fig. 3, transcoding a downloaded host file using a pre-built macro-transcoding tool, comprising:
s301: reading a host file according to the file structure to obtain field information of the host file; the field information at least comprises a field name, a field type and a field length;
s302: checking the legality of the host file according to the field information;
s303: if the validity check is passed, conversion from the EBCDIC code system to the ASCII code system is performed for the digital field and the character field in the host file respectively.
It will be appreciated that the path of the host file stored in the local computer or server needs to be obtained before transcoding, and whether the host file exists or not is determined according to the path. If the field information exists, reading the host file according to the file structure to obtain the field information of the host file; the field information includes at least a field name, a field type, and a field length. Meanwhile, checking the validity of the host file according to the field information; if the validity check is passed, conversion from the EBCDIC code system to the ASCII code system is performed for the digital field and the character field in the host file respectively.
When the file data is read, it is necessary to check whether the file size is consistent with the file size recorded in the file structure, and if so, the subsequent steps can be performed. In one embodiment, fields in the host file may be intercepted one by one for transcoding according to the file structure.
For example, for the character type field, code conversion may be performed according to the scheme shown in fig. 14 for EBCDIC codes; for ASCII codes, if the ASCII codes are Chinese internal files, code system conversion is not needed, and if the ASCII codes are Chinese external files, the ASCII codes can be converted according to the matching of the local area code and the external code system comparison table.
As can be seen from the above description, the present invention provides a host file processing method, which can utilize a pre-built macro code conversion tool to perform code conversion on a downloaded host file.
Referring to fig. 4, the method for editing the transcoded host file loaded into tabular data processing software by using a macro codebook conversion tool includes:
s401: acquiring each field data in the host file after code system conversion by using a macro code system conversion tool, and loading each field data into a worksheet of tabular data processing software;
s402: each field data is edited in the worksheet.
It will be appreciated that each record may be written to the local file after the transcoding is completed. In the embodiment of the application, the local file is an Excel worksheet. Specifically, the field name of the CopyBook may be used as the column name of the Excel worksheet for data writing, and each record in the local file may be used as one row in the Excel worksheet for data writing. In a preferred embodiment, multiple pieces of data may be cached and then written together into the Excel worksheet for improved efficiency.
So far, excel software can automatically generate macro codes which are easy for business personnel to operate. The macro code can read the data in each cell of the worksheet, and open and display the Excel file which has been written with the data. When necessary, service personnel can edit the data in the Excel file according to the research and development test requirements, and the operations of marking, screening, de-duplication and the like of the data are realized by utilizing the functions of the Excel software. After the editing is finished, the macro code conversion tool can automatically upload the local data file to the host after macro processing.
As can be seen from the above description, the present invention provides a host file processing method, which can utilize a macro code conversion tool to load a code converted host file into tabular data processing software for editing.
Referring to fig. 5, performing reverse transcoding on the edited host file using a macro-transcoding tool, including:
s501: reading edited data in each cell in the worksheet by using a macro code conversion tool, and splicing the data according to a file structure to obtain an edited host file;
s502: performing reverse code conversion on the host file by using a macro code conversion tool;
s503: and returning the host file subjected to the reverse code conversion back to the host.
It can be understood that, in the embodiment of the present application, the data may be spliced according to the length of each field against the file structure to form the host file, and the conversion from the local file code system to the host file code system may be performed. And embedding the macro code into the Excel file, and enabling the macro to finish the operation of returning the host file subjected to reverse code system conversion back to the host.
For the data in each cell, the inverse code conversion process is as follows:
(1) checking whether the type of the data in each field is consistent with the nominal field type, whether the digital field contains characters, whether the date type field is in a date format and the like;
(2) and judging the byte length of each field, and complementing according to the definition length of each field. The term "complement" refers to that the length of data in each field is complemented to a predetermined length. For example, a numeric field may be appended 0 before the number, a character field may be appended empty after the data, etc.;
(3) for the digital field, conversion between ASCII code and EBCDIC code is required according to the above-described comparison table of code system conversion. At the time of conversion, it is necessary to distinguish between compression type conversion and non-compression type conversion. For example, the number 0x31323334 can be converted to compressed 0x01234 or uncompressed OxF F2F3F4; if the number is signed, the content of the last byte can be changed according to the sign; for a character type field, if the field is an ASCII code, it can be converted into an EBCDIC code.
The above process can be seen in fig. 16.
As can be seen from the above description, the present invention provides a host file processing method, which can utilize a macro code conversion tool to perform reverse code conversion on an edited host file.
Based on the same inventive concept, the embodiments of the present application further provide a host file processing method device, which may be used to implement the method described in the foregoing embodiments, as described in the following embodiments. Since the principle of solving the problem of the host file processing method device is similar to that of the host file processing method, the implementation of the host file processing method device can be referred to the implementation of the determination method based on the software performance benchmark, and the repetition is omitted. As used below, the term "unit" or "module" may be a combination of software and/or hardware that implements the intended function. While the system described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Referring to fig. 6, in order to enable efficient processing of a host file using a pre-built macro-code conversion tool, the present application provides a host file processing apparatus, including:
a code system conversion unit 601, configured to perform code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
an editing unit 602, configured to load the host file after the code conversion into tabular data processing software for editing by using the macro code conversion tool;
the reverse code system conversion unit 603 is configured to perform reverse code system conversion on the edited host file by using the macro code system conversion tool.
Referring to fig. 7, the host file efficient processing apparatus includes:
a structure definition function construction unit 701, configured to construct a structure definition function according to a file structure of the host file;
a field filling function construction unit 702, configured to construct a field filling function according to the file structure;
a code system conversion function unit 703, configured to construct a code system conversion function according to a comparison table of EBCDIC code system and ASCII code system;
the conversion tool generating unit 704 is configured to combine the pre-constructed file uploading function, the structure defining function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
Referring to fig. 8, the code conversion unit 601 includes:
a field information module 801, configured to read the host file according to the file structure, to obtain field information of the host file; the field information at least comprises a field name, a field type and a field length;
a validity checking module 802, configured to check validity of the host file according to the field information;
and a code conversion module 803 for converting from EBCDIC code system to ASCII code system for the digital field and the character field in the host file, respectively, if the validity check passes.
Referring to fig. 9, the editing unit 602 includes:
the data loading module 901 is configured to obtain each field data in the host file after the code system conversion by using the macro code system conversion tool, and load each field data into a worksheet of the tabular data processing software;
and an editing module 902, configured to edit the field data in the worksheet.
Referring to fig. 10, the reverse code conversion unit 603 includes:
the file splicing module 1001 is configured to read the edited data in each cell in the worksheet by using the macro code conversion tool and splice the data according to the file structure to obtain an edited host file;
an inverse code system conversion module 1002, configured to perform inverse code system conversion on the host file using the macro code system conversion tool;
the file returning module 1003 is configured to return the host file after the reverse code conversion to the host.
In order to enable efficient processing of a host file by using a pre-built macro-code conversion tool from a hardware level, the application provides an embodiment of an electronic device for implementing all or part of contents in the host file processing method, where the electronic device specifically includes the following contents:
a Processor (Processor), a Memory (Memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the communication interface is used for realizing information transmission between the host file processing method device and related equipment such as a core service system, a user terminal, a related database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, etc., and the embodiment is not limited thereto. In this embodiment, the logic controller may refer to an embodiment of the host file processing method and an embodiment of the host file processing method apparatus in the embodiment, and the contents thereof are incorporated herein, and the repetition is omitted.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Wherein, intelligent wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the host file processing method may be performed on the electronic device side as described above, or all operations may be performed in the client device. Specifically, the selection may be made according to the processing capability of the client device, and restrictions of the use scenario of the user. The present application is not limited in this regard. If all operations are performed in the client device, the client device may further include a processor.
The client device may have a communication module (i.e. a communication unit) and may be connected to a remote server in a communication manner, so as to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementations may include a server on an intermediate platform, such as a server on a third party server platform having a communication link with the task scheduling center server. The server may include a single computer device, a server cluster formed by a plurality of servers, or a server structure of a distributed device.
Fig. 11 is a schematic block diagram of a system configuration of an electronic device 9600 of an embodiment of the present application. As shown in fig. 11, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 11 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
In one embodiment, the host file processing method functionality may be integrated into the central processor 9100. The central processor 9100 may be configured to perform the following control:
s101: performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
s102: loading the host file after code system conversion into tabular data processing software by using a macro code system conversion tool for editing;
s103: and performing reverse code conversion on the edited host file by using a macro code conversion tool.
From the above description, the present invention provides a host file processing method, which can be implemented based on a pre-built macro code conversion tool, and aims to implement rapid editing of a host file by means of a tabular data processing software and other platforms. The research personnel does not need to deeply grasp the operation technology of the host computer file, can easily finish the operation of the host computer file only by focusing on the management of service data, greatly reduces the threshold of the operation of the host computer file, provides a simple, reliable and efficient file processing flow for research and development based on the host computer, and improves the user experience, research and development efficiency and research and development quality.
In another embodiment, the host file processing method apparatus may be configured separately from the central processor 9100, for example, the data composite transmission apparatus host file processing method apparatus may be configured as a chip connected to the central processor 9100, and functions of the host file processing method are implemented by control of the central processor.
As shown in fig. 11, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 need not include all of the components shown in fig. 11; in addition, the electronic device 9600 may further include components not shown in fig. 11, and reference may be made to the related art.
As shown in fig. 11, the central processor 9100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 9100 receives inputs and controls the operation of the various components of the electronic device 9600.
The memory 9140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 9100 can execute the program stored in the memory 9140 to realize information storage or processing, and the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 9140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, etc. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 storing application programs and function programs or a flow for executing operations of the electronic device 9600 by the central processor 9100.
The memory 9140 may also include a data store 9143, the data store 9143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. The communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless lan module, may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 to implement usual telecommunications functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100 so that sound can be recorded locally through the microphone 9132 and sound stored locally can be played through the speaker 9131.
The embodiments of the present application further provide a computer readable storage medium capable of implementing all the steps in the host file processing method in which the execution subject is a server or a client in the above embodiments, where the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements all the steps in the host file processing method in which the execution subject is a server or a client in the above embodiments, for example, the processor implements the following steps when executing the computer program:
s101: performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
s102: loading the host file after code system conversion into tabular data processing software by using a macro code system conversion tool for editing;
s103: and performing reverse code conversion on the edited host file by using a macro code conversion tool.
From the above description, the present invention provides a host file processing method, which can be implemented based on a pre-built macro code conversion tool, and aims to implement rapid editing of a host file by means of a tabular data processing software and other platforms. The research personnel does not need to deeply grasp the operation technology of the host computer file, can easily finish the operation of the host computer file only by focusing on the management of service data, greatly reduces the threshold of the operation of the host computer file, provides a simple, reliable and efficient file processing flow for research and development based on the host computer, and improves the user experience, research and development efficiency and research and development quality.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present invention have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method for processing a host file, comprising:
performing code system conversion on the downloaded host file by using a pre-built macro code system conversion tool;
loading the host file after code conversion into tabular data processing software by using the macro code conversion tool for editing;
performing reverse code conversion on the edited host file by using the macro code conversion tool;
the step of pre-constructing a macro code system conversion tool comprises the following steps:
constructing a structure definition function according to the file structure of the host file;
constructing a field filling function according to the file structure;
constructing a code system conversion function according to a comparison table of the EBCDIC code system and the ASCII code system;
and combining the pre-constructed file uploading function, the structure definition function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
2. The method of claim 1, wherein transcoding the downloaded host file using a pre-built macro-transcoding tool, comprises:
reading the host file according to the file structure to obtain field information of the host file; the field information at least comprises a field name, a field type and a field length;
checking the validity of the host file according to the field information;
if the validity check is passed, converting from the EBCDIC code system to the ASCII code system according to the digital field and the character field in the host file respectively.
3. The method of claim 1, wherein loading the transcoded host file into tabular data processing software for editing using the macro-transcoding tool comprises:
acquiring each field data in the host file after code system conversion by using the macro code system conversion tool, and loading each field data into a worksheet of the tabular data processing software;
editing the field data in the worksheet.
4. The method of claim 3, wherein said performing inverse transcoding of the edited host file using the macro-transcoding tool comprises:
reading edited data in each cell in the worksheet by using the macro code conversion tool, and splicing the data according to the file structure to obtain an edited host file;
performing reverse code conversion on the host file by using the macro code conversion tool;
and returning the host file subjected to the reverse code conversion back to the host.
5. A host file processing apparatus, comprising:
the code system conversion unit is used for carrying out code system conversion on the downloaded host file by utilizing a pre-constructed macro code system conversion tool;
the editing unit is used for loading the host file after code conversion into tabular data processing software by utilizing the macro code conversion tool for editing;
the reverse code system conversion unit is used for carrying out reverse code system conversion on the edited host file by utilizing the macro code system conversion tool;
a structure definition function construction unit for constructing a structure definition function according to the file structure of the host file;
a field filling function construction unit, configured to construct a field filling function according to the file structure;
the code system conversion function unit is used for constructing a code system conversion function according to the comparison table of the EBCDIC code system and the ASCII code system;
and the conversion tool generation unit is used for combining the pre-constructed file uploading function, the structure definition function, the field filling function and the code system conversion function to generate a macro code system conversion tool.
6. The host file processing apparatus of claim 5, wherein the transcoding unit comprises:
the field information module is used for reading the host file according to the file structure to obtain the field information of the host file; the field information at least comprises a field name, a field type and a field length;
the validity checking module is used for checking the validity of the host file according to the field information;
and the code system conversion module is used for converting the EBCDIC code system into the ASCII code system according to the digital field and the character field in the host file if the validity check is passed.
7. The host file processing apparatus according to claim 5, wherein the editing unit includes:
the data loading module is used for acquiring each field data in the host file after code system conversion by using the macro code system conversion tool and loading each field data into a worksheet of the tabular data processing software;
and the editing module is used for editing the field data in the worksheet.
8. The host file processing apparatus of claim 7, wherein the reverse codebook conversion unit comprises:
the file splicing module is used for reading the edited data in each cell in the worksheet by using the macro code conversion tool and splicing the data according to the file structure to obtain an edited host file;
the reverse code system conversion module is used for carrying out reverse code system conversion on the host file by utilizing the macro code system conversion tool;
and the file returning module is used for returning the host file subjected to the reverse code conversion to the host.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the host file processing method of any one of claims 1 to 4 when the program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the host file processing method of any of claims 1 to 4.
CN202110594771.8A 2021-05-28 2021-05-28 Host file processing method and device Active CN113157277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110594771.8A CN113157277B (en) 2021-05-28 2021-05-28 Host file processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110594771.8A CN113157277B (en) 2021-05-28 2021-05-28 Host file processing method and device

Publications (2)

Publication Number Publication Date
CN113157277A CN113157277A (en) 2021-07-23
CN113157277B true CN113157277B (en) 2024-03-01

Family

ID=76875390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110594771.8A Active CN113157277B (en) 2021-05-28 2021-05-28 Host file processing method and device

Country Status (1)

Country Link
CN (1) CN113157277B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101553779A (en) * 2006-10-17 2009-10-07 三星Sds株式会社 Migration apparatus which convert application program of mainframe system into application program of open system and method for thereof
CN102063506A (en) * 2011-01-06 2011-05-18 中国工商银行股份有限公司 Service system host computer, decoding method thereof and service system
CN105183476A (en) * 2015-09-09 2015-12-23 中国银行股份有限公司 Cross-application program construction method and device
CN107729561A (en) * 2017-11-09 2018-02-23 成都卓凡软件科技有限公司 The method that the table handling of paired data storehouse is reversely given birth to based on database table structure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101762283B1 (en) * 2016-05-19 2017-07-31 주식회사 티맥스 소프트 Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101553779A (en) * 2006-10-17 2009-10-07 三星Sds株式会社 Migration apparatus which convert application program of mainframe system into application program of open system and method for thereof
CN102063506A (en) * 2011-01-06 2011-05-18 中国工商银行股份有限公司 Service system host computer, decoding method thereof and service system
CN105183476A (en) * 2015-09-09 2015-12-23 中国银行股份有限公司 Cross-application program construction method and device
CN107729561A (en) * 2017-11-09 2018-02-23 成都卓凡软件科技有限公司 The method that the table handling of paired data storehouse is reversely given birth to based on database table structure

Also Published As

Publication number Publication date
CN113157277A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
US7930354B2 (en) System and method for reviewing attachment content on a mobile device
CN101421714A (en) User experience for multimedia mobile note taking
CN103503020A (en) Making document changes by replying to electronic messages
CN112784112B (en) Message verification method and device
CN112073307B (en) Mail processing method, mail processing device, electronic equipment and computer readable medium
CN111325626A (en) Account checking data pushing method and device
CN111367988A (en) Data import method and device
US8392825B2 (en) Document processor and re-aggregator
CA2560488C (en) System and method for reviewing attachment content on a mobile device
CN111680067A (en) Data processing method, device and system based on block chain
CN114244896A (en) Message pushing method and device, electronic equipment and storage medium
US11582173B2 (en) Message processing method and electronic device supporting the same
CN113110829B (en) Multi-UI component library data processing method and device
CN113157277B (en) Host file processing method and device
CN112328257A (en) Code conversion method and device
CN112905464B (en) Application running environment data processing method and device
CN102984676A (en) Method and terminal for processing message session
CN114968917A (en) Method and device for rapidly importing file data
CN114637531A (en) Method and device for dynamically generating application program interface
CN104182406A (en) Electronic business card creating method, electronic business card retrieval method and relevant system
US8595304B2 (en) System and method for reviewing attachment content on a mobile device
US8484182B1 (en) Wireless device content searching
CN110931014A (en) Speech recognition method and device based on regular matching rule
CN114968257A (en) HTML code generation method and device
CN115658076A (en) Program relevance analysis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant