CN113157277A - Host file processing method and device - Google Patents

Host file processing method and device Download PDF

Info

Publication number
CN113157277A
CN113157277A CN202110594771.8A CN202110594771A CN113157277A CN 113157277 A CN113157277 A CN 113157277A CN 202110594771 A CN202110594771 A CN 202110594771A CN 113157277 A CN113157277 A CN 113157277A
Authority
CN
China
Prior art keywords
code system
host file
file
field
system 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.)
Granted
Application number
CN202110594771.8A
Other languages
Chinese (zh)
Other versions
CN113157277B (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

Images

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

Abstract

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

Description

Host file processing method and device
Technical Field
The application relates to the technical field of computers, can be used in the financial field, and particularly relates to a host file processing method and device.
Background
Conventionally, a host file has been one of the most important data storage media in a host system due to its advantages of fast read/write speed and small storage space. The mainframe system is different from a database system, and the database system can generally organize and manage data according to a data structure, so that a user can browse, inquire and edit the data conveniently. File access in a host system must rely on the file structure to be achieved. The fields corresponding to the columns in the file can only be located by using the file structure, otherwise, the host file is a collection of characters which can be circulated without rules.
Host files can be edited on the z/OS operating system through the PCOM communication tool. However, for the file data which is not listed, each field needs to be identified manually according 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, and can display and edit data in a File in a column according to a File structure, since the interface size for displaying characters in the PCOM communication tool is generally 32 × 80 characters, function keys such as F7, F8, F10, and F11 need to be frequently used to scroll or page to find a desired result, which is quite inconvenient in use.
In addition, only EBCDIC code characters can be displayed on the host system, and ASCII code characters and kanji characters cannot be displayed. This problem also presents difficulties in host software development and testing. If the host file is downloaded to a local computer for development and testing, data is generally checked only by importing the data into local software, and the process of importing the data is complicated and error-prone, 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 host file processing method and device, which can utilize a pre-constructed macro-code system conversion tool to efficiently process a host file.
In order to solve the technical problem, the application provides the following technical scheme:
in a first aspect, the present application provides a host file processing method, including:
carrying out code system conversion on the downloaded host file by utilizing a pre-constructed macro code system conversion tool;
loading the host file after code system conversion into tabular data processing software by using the macro code system conversion tool for editing;
and performing reverse code system conversion on the edited host file by using the macro code system conversion tool.
Further, the step of pre-constructing the macro system 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 an EBCDIC code system and an ASCII code system;
and combining 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.
Further, the transcoding the downloaded host file 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;
and if the validity check is passed, converting the EBCDIC code system into the ASCII code system respectively aiming at the digital type field and the character type field in the host file.
Further, the loading the mainframe file after code conversion into tabular data processing software by using the macro code conversion tool for editing includes:
acquiring data of each field in a host file after code conversion by using the macro code system conversion tool, and loading the data of each field into a working table of the tabular data processing software;
and editing the data of each field in the worksheet.
Further, the performing reverse code system conversion on the edited host file by using the macro code system conversion tool includes:
reading the edited data in each cell in the worksheet by using the macro code system conversion tool and splicing the data according to the file structure to obtain an edited host file;
utilizing the macro code system conversion tool to perform reverse code system conversion on the host file;
and returning the host file subjected to the reverse code system conversion to the host.
In a second aspect, the present application provides a host file processing apparatus, comprising:
the system of codes conversion unit, is used for utilizing the macro code system conversion tool that is constructed in advance to carry on the system of codes conversion to the host computer file downloaded;
the editing unit is used for loading the host file subjected to code system conversion into tabular data processing software by using the macro code system 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 apparatus includes:
a structure definition function constructing unit, configured to construct a structure definition function according to the file structure of the host file;
the field filling function constructing unit is used for constructing 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 generating unit is used for combining the pre-constructed file uploading function, the structure defining function, the field filling function and the code conversion function to generate the macro code conversion tool.
Further, the code system 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 respectively converting the EBCDIC code system into the ASCII code system aiming at the digital type field and the character type field in the host file if the legality check passes.
Further, the editing unit includes:
the data loading module is used for acquiring data of each field in the host file after code conversion by using the macro code system conversion tool and loading the data of each field into the working table 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 system 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 performing 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 system 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, wherein the processor implements the steps of the host file processing method when executing the program.
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, performs the steps of the host file processing method.
Aiming at the problems in the prior art, the method and the device for processing the host file are realized based on a pre-constructed macro code system conversion tool, and aim to realize quick editing of the host file by means of platforms such as tabular data processing software and the like. Research and development personnel can easily complete host file management by focusing on business data management without deeply mastering host technology, so that the threshold for operating host files is greatly reduced, a simple, reliable and efficient file processing method is provided for research and development based on a host, and user experience, research and development efficiency and research and development quality are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a host file processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps for pre-configuring a macro code system transformation tool according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating transcoding performed in an embodiment of the present application;
FIG. 4 is a flowchart of editing by loading tabular data processing software according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating reverse code system conversion according to an embodiment of the present application;
FIG. 6 is a diagram illustrating one embodiment of a structure of a host file processing apparatus;
FIG. 7 is a second block diagram of a host file processing apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram of a code system conversion unit according to an embodiment of the present application;
FIG. 9 is a diagram showing a structure of an editing unit in the embodiment of the present application;
FIG. 10 is a block diagram of a reverse code system 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 transcoding of documents in an embodiment of the present application;
FIG. 13 is a schematic representation of the comparison between the EBCDIC code system and the ASCII code system in the embodiment of the present application;
FIG. 14 is a drawing showing the comparison of area codes with foreign codes in the embodiment of the present application;
FIG. 15 is a schematic diagram of an Excel worksheet file in an embodiment of the present application;
fig. 16 is a flowchart of the processing procedure of the reverse transcoding of the platform in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The host file processing method and device provided by the present application can be used in the financial field, and can also be used in any field other than the financial field.
Referring to fig. 1, in order to efficiently process a host file by using a pre-constructed macro system conversion tool, the present application provides a host file processing method, including:
s101: carrying out code system conversion on the downloaded host file by utilizing a pre-constructed 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 system conversion on the edited host file by using a macro code system 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 system conversion tool, and aims to realize quick editing of a host file by means of platforms such as tabular data processing software and the like. The execution subject of the host file processing method may be a computer terminal or a server, and the application is not limited thereto.
The method can be specifically realized according to the following steps:
the local computer terminal or server may download the host File via a File Transfer Protocol (FTP). The data code system of the host file is not converted during the downloading process.
Secondly, analyzing a file structure (CopyBook) corresponding to the host file by using a pre-constructed macro code system 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 numeric field, with a length of 1 byte; x (60) indicates that the field is a character-type field, and has a length of 60 bytes. In addition, the sequence of each field can be obtained by reading the file structure.
Traversing the host file, reading the data in the file, and then performing code system conversion on the read data field by using a macro code system conversion tool according to the analysis result in the step II. The code system conversion in this step is the conversion from the host file code system to the local file code system. And loading the coded and converted host file 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. The embodiment of the application takes Microsoft Office Excel as an example to illustrate the feasibility of the method.
In one embodiment, the first 5 bytes from the 1 st column of the file are the area number, the 6 th byte to the 17 th byte are the account information, the 23 rd byte to the 60 th byte are the username information, etc. according to the file structure. Therefore, data in a corresponding byte range in the host file can be intercepted and output to a worksheet corresponding to Excel to be displayed 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.
And fourthly, loading the pre-constructed macro code system conversion tool into Excel software to generate the Excel macro. Reading the cells of each row and each column in the worksheet by using Excel macros, contrasting the file structure, and splicing each field of the local file into the host file again according to the length of each field.
And fifthly, carrying out code system conversion on the spliced host file by using a macro code system conversion tool, and transmitting the host file to the host through an FTP protocol. The code system conversion in this step is the conversion from the local file code system to the 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-constructed macro-code system conversion tool, and aims to implement fast editing of a host file by using a platform such as tabular data processing software. Research and development personnel can easily complete the host file operation only by focusing on business data management without deeply mastering the host file operation technology, so that the threshold of the host file operation is greatly reduced, a simple, reliable and efficient file processing flow is provided for research and development based on a host, and the user experience, the research and development efficiency and the research and development quality are improved.
Referring to fig. 2, the step of pre-constructing the macro system 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 an EBCDIC code system and an 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 the macro code system conversion tool.
It can be understood that, when the structure definition function and the field filling function are constructed, the file structure of the host file needs to be acquired first. In the embodiment of the present application, the file structure of the host file may be exposed through CopyBook. According to the CopyBook of the host file, a structure definition function and a field filling function can be constructed by using a program language, and the core code of the CopyBook is as follows: (the following code implementation generates the build field fill function)
Figure BDA0003090725150000071
Figure BDA0003090725150000081
When constructing the code conversion function, a look-up table of the EBCDIC code system and the ASCII code system needs to be obtained (see fig. 13). In the embodiments of the present application, two code system conversions, namely forward and reverse, are involved. The forward code system conversion refers to the conversion from a host file code system to a local file code system; reverse symbology conversion refers to the conversion from a local file symbology to a host file symbology.
The code system conversion process for each field can be implemented as follows:
checking whether the type of data in each field is consistent with the nominal field type, such as whether a font field contains characters, whether a date type field is in a date format, and the like;
judging the length of each field and completing according to the defined length of each field. Padding is to fill the length of data in each field to a predefined length. For example, a numeric field may be padded with 0 before a number, a character-type field may be padded with a space after data, etc.;
and thirdly, for the digital field, the conversion between the ASCII code and the EBCDIC code is needed according to the comparison table of the code system conversion. It is necessary to distinguish between compression type conversion and non-compression type conversion at the time of conversion. For example, the number 0x31323334, can be converted to the compressed 0x01234 or the uncompressed OxF1F2F3F 4; if the number is signed, the content of the last byte can be changed according to the positive and negative signs; for a character-type field, if the field is ASCII code, it can be converted into EBCDIC code. The above can be seen in fig. 12.
From the above description, the present invention provides a host file processing method, which can construct a macro system transformation tool.
Referring to fig. 3, transcoding the downloaded host file using a pre-built macro transcoding tool, includes:
s301: 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;
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 each of the numeric type field and the character type field in the host file.
It can be understood that, before performing the code system conversion, a host file path stored in the local computer or the server needs to be acquired, and whether a host file exists is determined according to the path. If the host file exists, the host file can be read according to the file structure to obtain the field information of the host file; the field information at least includes field name, field type and field length. Meanwhile, checking the legality 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 each of the numeric type field and the character type field in the host file.
It should be noted that, when reading the file data, 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 based on the file structure.
For example, for the character type field, the code system conversion can be performed according to the code system shown in fig. 14 for the EBCDIC code; for ASCII code, if it is Chinese internal file, it has no need of code system conversion, and if it is Chinese external file, it can make code system conversion according to the region number and external code system comparison table matched with local region.
From the above description, the present invention provides a host file processing method, which can perform transcoding on a downloaded host file by using a pre-constructed macro-transcoding tool.
Referring to fig. 4, the step of loading the code-converted host file into the tabular data processing software for editing by using the macro code system conversion tool includes:
s401: acquiring data of each field in the host file after code conversion by using a macro code system conversion tool, and loading the data of each field into a working table 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 a local file after transcoding is complete. In the embodiment of the application, the local file is an Excel worksheet. Specifically, the field name of CopyBook may be used as the column name of the Excel worksheet to perform data writing, and then each record in the local file may be used as a row in the Excel worksheet to perform data writing. In a preferred embodiment, multiple pieces of data may be cached and then written into the Excel worksheet together for efficiency.
Therefore, Excel software can automatically generate macro codes which are easy to operate by business personnel. The macro code can read the data in each cell of the worksheet and open and display the Excel file in which the data is written. If necessary, business personnel can edit the data in the Excel file according to research and development test requirements, and the functions of Excel software are utilized to realize the operations of marking, screening, duplicate removal and the like of the data. After the editing is finished, the macro code system conversion tool can automatically upload the local data file to the host after the local data file is processed by the macro.
From the above description, the present invention provides a method for processing a host file, which can load a code-converted host file into tabular data processing software for editing by using a macro code conversion tool.
Referring to fig. 5, the reverse transcoding of the edited host file using the macro transcoding tool includes:
s501: reading the edited data in each cell in the worksheet by using a macro system conversion tool and splicing the data according to a file structure to obtain an edited host file;
s502: utilizing a macro code system conversion tool to perform reverse code system conversion on the host file;
s503: and returning the host file subjected to the reverse code system conversion to the host.
It can be understood that, in the embodiment of the present application, data may be spliced according to the length of each field to form a host file, and a conversion from a local file code system to a host file code system may be performed. And then, embedding the macro codes of the contents into an Excel file, and starting the macro to finish the operation of returning the host file subjected to the reverse code system conversion to the host.
For the data in each cell, the process of reverse code system conversion is as follows:
checking whether the type of data in each field is consistent with the nominal field type, such as whether a font field contains characters, whether a date type field is in a date format, and the like;
judging the length of each field and completing according to the defined length of each field. Padding is to fill the length of data in each field to a predefined length. For example, a numeric field may be padded with 0 before a number, a character-type field may be padded with a space after data, etc.;
and thirdly, for the digital field, the conversion between the ASCII code and the EBCDIC code is needed according to the comparison table of the code system conversion. It is necessary to distinguish between compression type conversion and non-compression type conversion at the time of conversion. For example, the number 0x31323334, can be converted to the compressed 0x01234 or the uncompressed OxF1F2F3F 4; if the number is signed, the content of the last byte can be changed according to the positive and negative signs; for a character-type field, if the field is ASCII code, it can be converted into EBCDIC code.
The above process can be seen in fig. 16.
From the above description, the present invention provides a host file processing method, which can perform reverse code conversion on an edited host file by using a macro code conversion tool.
Based on the same inventive concept, the embodiment of the present application further provides a host file processing method and apparatus, which can be used to implement the methods described in the foregoing embodiments, as described in the following embodiments. Because the principle of the host file processing method and device for solving the problems is similar to that of the host file processing method, the implementation of the host file processing method and device can refer to the implementation of the software performance reference determination method, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. While the system described in the embodiments below is preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.
Referring to fig. 6, in order to efficiently process a host file using a pre-built macro conversion tool, the present application provides a host file processing apparatus, including:
a code conversion unit 601, configured to perform code conversion on the downloaded host file by using a pre-constructed macro code conversion tool;
an editing unit 602, configured to load, by using the macro code system conversion tool, the host file subjected to code system conversion into tabular data processing software for editing;
a reverse code system conversion unit 603, 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 apparatus for efficiently processing a host file includes:
a structure definition function constructing unit 701, configured to construct a structure definition function according to a file structure of the host file;
a field filling function constructing unit 702, configured to construct a field filling function according to the file structure;
a code conversion function unit 703 for constructing a code conversion function according to the EBCDIC code system and the ASCII code system comparison table;
a conversion tool generating unit 704, configured to combine the pre-constructed file uploading function, the structure defining function, the field filling function, and the code conversion function to generate a macro code conversion tool.
Referring to fig. 8, the code system 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 system conversion module 803, configured to, if the validity check passes, perform conversion from the EBCDIC code system to the ASCII code system for the digital type field and the character type field in the host file, respectively.
Referring to fig. 9, the editing unit 602 includes:
a data loading module 901, configured to obtain, by using the macro code system conversion tool, data of each field in a host file after code system conversion, and load the data of each field into a working table of the tabular data processing software;
an editing module 902, configured to edit the field data in the worksheet.
Referring to fig. 10, the reverse code system conversion unit 603 includes:
a file splicing module 1001, configured to read, by using the macro system conversion tool, edited data in each cell in the worksheet, and splice the data according to the file structure to obtain an edited host file;
a reverse code conversion module 1002, configured to perform reverse code conversion on the host file by using the macro code conversion tool;
the file returning module 1003 is configured to return the host file after the reverse code system conversion to the host.
In order to efficiently process a host file by using a pre-constructed macro system transformation tool from a hardware level, the present application provides an embodiment of an electronic device for implementing all or part of the contents of 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 mutual communication through the bus; the communication interface is used for realizing information transmission between the host file processing method device and relevant equipment such as a core service system, a user terminal, a relevant database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, and the like, but the embodiment is not limited thereto. In this embodiment, the logic controller may refer to the embodiment of the host file processing method and the embodiment of the host file processing method apparatus in the embodiments for implementation, and the contents thereof are incorporated herein, and repeated descriptions are omitted here.
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), an in-vehicle device, a smart wearable device, and the like. Wherein, intelligence wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical applications, part of the host file processing method may be executed on the electronic device side as described above, or all operations may be completed in the client device. The selection may be specifically performed according to the processing capability of the client device, the limitation of the user usage scenario, and the like. This is not a limitation of the present application. The client device may further include a processor if all operations are performed in the client device.
The client device may have a communication module (i.e., a communication unit), and may be in communication connection with a remote server to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementation scenarios, the server may also include a server on an intermediate platform, for example, a server on a third-party server platform that is communicatively linked to the task scheduling center server. The server may include a single computer device, or may include a server cluster formed by a plurality of servers, or a server structure of a distributed apparatus.
Fig. 11 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 11, the electronic device 9600 can 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 structure to implement telecommunications or other functions.
In one embodiment, the host file handling method functions may be integrated into the central processor 9100. The central processor 9100 may be configured to control as follows:
s101: carrying out code system conversion on the downloaded host file by utilizing a pre-constructed 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 system conversion on the edited host file by using a macro code system conversion tool.
From the above description, the present invention provides a host file processing method, which can be implemented based on a pre-constructed macro-code system conversion tool, and aims to implement fast editing of a host file by using a platform such as tabular data processing software. Research and development personnel can easily complete the host file operation only by focusing on business data management without deeply mastering the host file operation technology, so that the threshold of the host file operation is greatly reduced, a simple, reliable and efficient file processing flow is provided for research and development based on a host, and the user experience, the research and development efficiency and the research and development quality are improved.
In another embodiment, the host file processing method apparatus may be configured separately from the central processing unit 9100, for example, the host file processing method apparatus may be configured as a chip connected to the central processing unit 9100, and the function of the host file processing method may be realized by the control of the central processing unit.
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 also does not necessarily include all of the components shown in fig. 11; in addition, the electronic device 9600 may further include components not shown in fig. 11, which may be referred to in the prior art.
As shown in fig. 11, a central processor 9100, sometimes referred to as a controller or operational control, can include a microprocessor or other processor device and/or logic device, which central processor 9100 receives input and controls the operation of the various components of the electronic device 9600.
The memory 9140 can 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 relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 9100 can execute the program stored in the memory 9140 to realize information storage or processing, or 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. Power supply 9170 is used to provide power to electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, an LCD display, but is not limited thereto.
The memory 9140 can be a solid state memory, e.g., Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 9140 could also be some other type of device. 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 being used for storing application programs and function programs or for executing a flow of operations of the electronic device 9600 by the central processor 9100.
The memory 9140 can also include a data store 9143, the data store 9143 being used to store 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 for the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, contact 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 input signals and receive output signals, 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 disposed 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 receive audio input from the microphone 9132, thereby implementing ordinary telecommunications functions. The audio processor 9130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100, thereby enabling recording locally through the microphone 9132 and enabling locally stored sounds to be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all the steps in the host file processing method with the execution subject being the server or the client in the foregoing 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 with the execution subject being the server or the client in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
s101: carrying out code system conversion on the downloaded host file by utilizing a pre-constructed 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 system conversion on the edited host file by using a macro code system conversion tool.
From the above description, the present invention provides a host file processing method, which can be implemented based on a pre-constructed macro-code system conversion tool, and aims to implement fast editing of a host file by using a platform such as tabular data processing software. Research and development personnel can easily complete the host file operation only by focusing on business data management without deeply mastering the host file operation technology, so that the threshold of the host file operation is greatly reduced, a simple, reliable and efficient file processing flow is provided for research and development based on a host, and the user experience, the research and development efficiency and the research and development quality are improved.
As will be appreciated by one skilled in the art, 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 flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (12)

1. A host file processing method is characterized by comprising the following steps:
carrying out code system conversion on the downloaded host file by utilizing a pre-constructed macro code system conversion tool;
loading the host file after code system conversion into tabular data processing software by using the macro code system conversion tool for editing;
and performing reverse code system conversion on the edited host file by using the macro code system conversion tool.
2. The host file processing method of claim 1, wherein the step of pre-constructing a macro conversion tool comprises:
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 an EBCDIC code system and an ASCII code system;
and combining 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.
3. The host file processing method according to claim 2, 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;
and if the validity check is passed, converting the EBCDIC code system into the ASCII code system respectively aiming at the digital type field and the character type field in the host file.
4. The method according to claim 1, wherein the loading the transcoded host file into tabular data processing software for editing by using the macro transcoding tool comprises:
acquiring data of each field in a host file after code conversion by using the macro code system conversion tool, and loading the data of each field into a working table of the tabular data processing software;
and editing the data of each field in the worksheet.
5. The host file processing method of claim 4, wherein the performing reverse transcoding on the edited host file by using the macro transcoding tool comprises:
reading the edited data in each cell in the worksheet by using the macro code system conversion tool and splicing the data according to the file structure to obtain an edited host file;
utilizing the macro code system conversion tool to perform reverse code system conversion on the host file;
and returning the host file subjected to the reverse code system conversion to the host.
6. A host file processing apparatus, comprising:
the system of codes conversion unit, is used for utilizing the macro code system conversion tool that is constructed in advance to carry on the system of codes conversion to the host computer file downloaded;
the editing unit is used for loading the host file subjected to code system conversion into tabular data processing software by using the macro code system 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.
7. The host file processing apparatus according to claim 6, comprising:
a structure definition function constructing unit, configured to construct a structure definition function according to the file structure of the host file;
the field filling function constructing unit is used for constructing 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 generating unit is used for combining the pre-constructed file uploading function, the structure defining function, the field filling function and the code conversion function to generate the macro code conversion tool.
8. The host file processing apparatus according to claim 7, wherein 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 respectively converting the EBCDIC code system into the ASCII code system aiming at the digital type field and the character type field in the host file if the legality check passes.
9. The host file processing apparatus according to claim 6, wherein the editing unit includes:
the data loading module is used for acquiring data of each field in the host file after code conversion by using the macro code system conversion tool and loading the data of each field into the working table of the tabular data processing software;
and the editing module is used for editing the field data in the worksheet.
10. The host file processing apparatus according to claim 9, wherein 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 system 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 performing 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 system conversion to the host.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the host file processing method of any one of claims 1 to 5 are implemented when the program is executed by the processor.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the host file processing method according to any one of claims 1 to 5.
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 true CN113157277A (en) 2021-07-23
CN113157277B 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 (5)

* 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
US20170337056A1 (en) * 2016-05-19 2017-11-23 TmaxSoft Co., Ltd. Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment
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

Patent Citations (5)

* 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
US20170337056A1 (en) * 2016-05-19 2017-11-23 TmaxSoft Co., Ltd. Method and computer program stored in computer-readable medium for converting sort script to reuse jcl in different encoding environment
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
CN113157277B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US7930354B2 (en) System and method for reviewing attachment content on a mobile device
CN109978629B (en) Advertisement putting method and device, electronic equipment and storage medium
CN112784112B (en) Message verification method and device
CN101410828B (en) Document processor and re-aggregator
CN106294480A (en) A kind of file layout change-over method, device and examination question import system
US11581903B2 (en) Data compression method and apparatus, computer-readable storage medium, and electronic device
CN113741860A (en) Data processing method and device based on RPA robot
CN114244896A (en) Message pushing method and device, electronic equipment and storage medium
CN112328257A (en) Code conversion method and device
CN113110829B (en) Multi-UI component library data processing method and device
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN113157277B (en) Host file processing method and device
CN112905464B (en) Application running environment data processing method and device
CN114968917A (en) Method and device for rapidly importing file data
US8615744B2 (en) Methods and system for managing assets in programming code translation
CN109582338A (en) BIOS option amending method, device, equipment and storage medium
CN114637531A (en) Method and device for dynamically generating application program interface
CN104363348A (en) Information data processing method and device
CN104182406A (en) Electronic business card creating method, electronic business card retrieval method and relevant system
CN112102058A (en) Management system parameter configuration method and device
CN112766827A (en) Automatic processing method and device for asset inventory data
CN113419957A (en) Rule-based big data offline batch processing performance capacity scanning method and device
US9807230B2 (en) Parameter writing program on communication subscriber card
CN108734149B (en) Text data scanning method and device
CN108989813A (en) A kind of high efficiency of compression/decompression method, computer installation and storage medium

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