CN112181912B - Method, device, equipment and storage medium for determining file format - Google Patents

Method, device, equipment and storage medium for determining file format Download PDF

Info

Publication number
CN112181912B
CN112181912B CN202011043499.6A CN202011043499A CN112181912B CN 112181912 B CN112181912 B CN 112181912B CN 202011043499 A CN202011043499 A CN 202011043499A CN 112181912 B CN112181912 B CN 112181912B
Authority
CN
China
Prior art keywords
job
file
format information
target
job step
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
CN202011043499.6A
Other languages
Chinese (zh)
Other versions
CN112181912A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011043499.6A priority Critical patent/CN112181912B/en
Publication of CN112181912A publication Critical patent/CN112181912A/en
Application granted granted Critical
Publication of CN112181912B publication Critical patent/CN112181912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for determining a file format, which comprise the following steps: acquiring a job control language corresponding to the target job step, and analyzing the job control language to obtain job information matched with the target job step; acquiring format information of an input file corresponding to a target job step according to the job information; and determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.

Description

Method, device, equipment and storage medium for determining file format
Technical Field
Embodiments of the present invention relate to data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for determining a file format.
Background
In the operation of a component, a job may be divided into several parts, each part being referred to as a job step. For example, a particular job step may be compiling, join assembly, or running, etc.
In an actual operation process, if the operation step can obtain the format of the input file (for example, the offset and the length of the data in the input file), the data to be processed can be obtained according to the format of the input file, and the data can be processed according to the logic processing mode inside the operation step. However, this method only supports a single job step, i.e., the format of the input file may be directly specified by a human, so that the corresponding job step completes processing the data.
However, in a real job, there are cases where not only a single job step is used, but also a plurality of job step data are inherited, that is, an input file of a job step a is an output file of a job step B. Fig. 1a is a schematic diagram of data inheritance by a plurality of job steps, and as shown in fig. 1a, an output file of a job step 100 in job 1 is an input file of a job step 100 in job 2, an output file of a job step 100 in job 2 is an input file of a job step 110, and an output file of a job step 110 in job 2 is an input file of a job step 100 in job 3.
If the input file of a certain job step is an output file of another job step by inheriting, the format of the input file cannot be directly specified because the format of the input file has been changed, the job step is difficult to obtain the data to be processed, and in this case, the format of the input file is often calculated manually. However, since data inheritance can be realized by cross job steps or cross job steps, and inheritance modes are various, a situation of calculation errors easily occurs in manual calculation of a file format, and further, the problem of job quality degradation is caused.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for determining a file format, which save the labor cost and time cost consumed by manual calculation of the file format and improve the accuracy of a file format determination result.
In a first aspect, an embodiment of the present invention provides a method for determining a file format, where the method includes:
acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step;
Acquiring format information of an input file corresponding to the target operation step according to the operation information;
and determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
In a second aspect, an embodiment of the present invention further provides a device for determining a file format, where the device includes:
the job control language analysis module is used for acquiring a job control language corresponding to a target job step, analyzing the job control language and obtaining job information matched with the target job step;
an input file format information acquisition module, configured to acquire format information of an input file corresponding to the target job step according to the job information;
and the output file format information determining module is used for determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method for determining a file format provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements the method for determining a file format provided in any embodiment of the present invention.
According to the technical scheme, the job control language corresponding to the target job step is acquired, the job control language is analyzed to obtain job information matched with the target job step, then format information of an input file corresponding to the target job step is acquired according to the job information, and format information of an output file corresponding to the target job step is determined according to the job information and the format information of the input file. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.
Drawings
FIG. 1a is a schematic diagram of a plurality of job step data inheritance;
FIG. 1b is a flowchart of a method for determining a file format according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a method for determining a file format in a second embodiment of the present invention;
FIG. 3 is a flow chart of a method for determining a file format in accordance with a third embodiment of the present invention;
fig. 4 is a block diagram of a determining apparatus of a file format in a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device in a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1b is a flowchart of a method for determining a file format according to an embodiment of the present invention, where the method is applicable to a case of automatically building an output file format after an input file is obtained in a job step, and the method may be performed by a device for determining a file format, which may be implemented by software and/or hardware, and may be generally integrated in a computer and all intelligent devices (e.g., terminal devices or servers) including a program running function, and specifically includes the following steps:
Step 110, acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step.
In this embodiment, there are one or more job steps in one component job, and the job control language (Job Control Language, JCL) refers to an ordered set of various control commands or control statements for implementing organization and management of the job, each job step corresponding to a specific job control language.
Wherein the job control language (hereinafter abbreviated JCL) is configured by JCL statements containing a series of rules. The JCL statement includes a plurality of job information, which may be information defined in the JCL statement, for instructing an operating system to execute a specific program in order to process data. Specifically, it is possible to indicate to the operating system which processes need to be operated, i.e. which programs need to be executed, or which resources the programs need, by JCL statements.
In this embodiment, optionally, the current job step of the job steps for preparing to execute the job program is taken as the target job step, and by analyzing the JCL corresponding to the target job step, a plurality of JCL sentences including the execution rule can be obtained, so as to obtain the job information matched with the target job step.
In one implementation manner of the embodiment of the present invention, optionally, acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step, where the method includes:
and analyzing the job control language according to a preset analysis grammar and a plurality of preset different identifiers to obtain a plurality of pieces of job information matched with the target job step.
In this embodiment, the preset parsing syntax may be parsing syntax based on IBM, multi-virtual storage (Multiple Virtual Storage, MVS), and JCL syntax specifications. The operation control language is configured by a plurality of sentences, each sentence corresponds to a preset identifier, the operation control language is analyzed according to the preset identifier, the sentence corresponding to the identifier can be obtained, and then the operation information limited in the sentence is obtained.
In a specific embodiment, the plurality of job information matched with the target job step includes: the name of the target job step, the input file path corresponding to the target job step, the file processing rule corresponding to the target job step, and the output file path corresponding to the target job step.
The name of the target job step may specifically include a job name to which the target job step belongs, a sequence number of the target job step in the job, and the like, and the job name may include a job type, a job sequence number, and the like. And the input file path corresponding to the target job step is used for indicating a storage area corresponding to the input file to be acquired by the target job step. The file processing rule corresponding to the target job step may be a format processing rule based on IBM, and is used for processing format information of an input file by the target job book to obtain format information of an output file. And the output file path corresponding to the target job step is used for indicating a storage area corresponding to the output file of the target job step.
Step 120, obtaining format information of the input file corresponding to the target job step according to the job information.
In this embodiment, the format information of the input file may include information such as an offset of data in the input file and a data length.
When the job to which the target job step belongs only includes one job step, or the target job step is the first job step in the belonging job, the format information of the input file corresponding to the target job step may be designated by a manual manner.
In one implementation manner of the embodiment of the present invention, when the job to which the target job step belongs includes a plurality of job steps and the target job step is not the first job step in the belonging job, optionally, obtaining, according to the job information, format information of an input file corresponding to the target job step includes:
step 121, acquiring an input file path corresponding to the target job step from a plurality of items of job information matched with the target job step;
step 122, obtaining an input file according to the input file path and format information of the input file.
In this embodiment, alternatively, the input file may add the format information to a file name of the input file in a named manner, or the format information may be stored in a preset area of the input file.
And 130, determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
In this embodiment, optionally, a file processing rule corresponding to the target job step may be obtained from a plurality of pieces of job information matched with the target job step, and format information of the input file may be processed according to the file processing rule to obtain format information of an output file corresponding to the target job step.
Therefore, according to the job information and the format information of the input file, the format information of the output file corresponding to the target job step is determined, so that the automation of the determination process of the format information of the output file can be realized, the conditions of cross-job step and cross-job data inheritance when a plurality of job steps execute the job can be met, the labor cost and time cost for manually calculating the file format are saved, and the accuracy of the determination result of the file format is improved.
According to the technical scheme, the job control language corresponding to the target job step is acquired, the job control language is analyzed to obtain job information matched with the target job step, then format information of an input file corresponding to the target job step is acquired according to the job information, and format information of an output file corresponding to the target job step is determined according to the job information and the format information of the input file. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.
Example two
The present embodiment is a further refinement of the first embodiment, and the same or corresponding terms as those of the first embodiment are explained, and the description of the present embodiment is omitted. Fig. 2 is a flowchart of a method for determining a file format according to a second embodiment of the present invention, in this embodiment, a technical solution of the present embodiment may be combined with one or more methods in the foregoing solutions of the embodiments, and in this embodiment, as shown in fig. 2, the method provided by the embodiment of the present invention may further include:
step 210, acquiring a job control language corresponding to the target job step.
And 220, analyzing the job control language according to a preset analysis grammar and a plurality of preset different identifiers to obtain a plurality of pieces of job information matched with the target job step.
Wherein, the specific pieces of job information matched with the target job steps include: the name of the target job step, the input file path corresponding to the target job step, the file processing rule corresponding to the target job step, and the output file path corresponding to the target job step.
In one implementation of the embodiment of the present invention, the file processing rule includes a file filtering rule and a file reorganizing rule.
The file screening rule defines the offset of data and character information of a specific position. For example, when the file filtering rule is incloude= (333, 1, ch, eq, c '1'), the file filtering rule indicates that the one-bit character starting from offset 329 in the input file is equal to "1" of format information, because the start bit of the offset in the file filtering rule is obtained by adding the actual start bit to 4, it is necessary to subtract 4 from 333 to obtain the actual offset start bit.
The file reorganization rule defines the offset of the data, the number of character bits required to be acquired in the data, and the number of reorganized character bits.
For example, when the file reorganization rule is outrec= (10,23,23X), the file reorganization rule indicates that twenty-three characters of the input file are acquired from an offset 6, where the offset 6 is also an actual offset start bit obtained by subtracting 4 from 10 in the rule, and twenty-three spaces are added after the twenty-three characters.
Step 230, obtaining format information of the input file corresponding to the target job step according to the job information.
Step 240, determining first format information according to the file screening rule and the format information of the input file.
In one implementation manner of the embodiment of the present invention, determining the first format information according to the file screening rule and the format information of the input file includes:
and determining the format information meeting the file screening rule as first format information in the format information of the input file according to the file screening rule.
In this step, for example, when the file screening rule is incloude= (333, 1, ch, eq, c '1'), the determined first format information may be "CBFSPAR 0_inter_ind, X,329,1,329,1, interest flag".
Step 250, determining second format information according to the file reorganization rule and the format information of the input file.
In one implementation manner of the embodiment of the present invention, determining, according to the file reorganization rule and the format information of the input file, second format information includes:
step 251, determining target format information meeting the file reorganization rule in the format information of the input file according to the file reorganization rule;
in this step, for example, when the file reorganization rule is outrec= (10,23,23X), the determined target format information may be "CBFSPAR0_fgyan_prim_ar_id, X,6,23,6,23, fang Yian master contract number".
Step 252, generating second format information according to the file reorganization rule and the target format information.
Specifically, twenty-three spaces are added on the basis of the target format information in step 251, a total of forty-six characters are generated, and the offset information of the forty-six characters is used as the second format information. Wherein, the twenty-three characters from the offset of 1 in the second format information are the real security main contract numbers, and the twenty-three characters from the offset of 24 are spaces.
Step 260, combining the first format information and the second format information, where the first format information and the second format information together form format information of an output file corresponding to the target job step.
Therefore, format information of the output file is determined according to the file screening rule and the file reorganizing rule respectively, and accuracy of the output file format determination result can be improved.
According to the technical scheme, the job control language corresponding to the target job step is obtained, the job control language is analyzed according to the preset analysis grammar and the preset multiple different identifiers to obtain multiple items of job information matched with the target job step, then format information of an input file corresponding to the target job step is obtained according to the job information, first format information is determined according to the file screening rule and the format information of the input file, second format information is determined according to the file reorganization rule and the format information of the input file, finally the first format information and the second format information are combined, and the first format information and the second format information jointly form format information of an output file corresponding to the target job step. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.
Example III
The present embodiment is further detailed in the second embodiment, and the same or corresponding terms as those of the second embodiment are explained in the second embodiment, which is not repeated. Fig. 3 is a flowchart of a method for determining a file format according to a third embodiment of the present invention, in this embodiment, a technical solution of the present embodiment may be combined with one or more methods in the foregoing solutions of the embodiments, and in this embodiment, as shown in fig. 3, the method provided by the embodiment of the present invention may further include:
step 310, acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step.
Step 320, obtaining format information of the input file corresponding to the target job step according to the job information.
Step 330, determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
Step 340, adding the format information of the output file to the output file corresponding to the target job step.
In this embodiment, alternatively, the output file may add the format information to a file name of the output file in a named manner, or the format information may be stored in a preset area of the output file.
And step 350, storing the output file in a storage area corresponding to the output file path.
Step 360, determining an inheritance job step corresponding to the target job step according to the job information matched with the target job step.
In the present embodiment, the inheritance job step is a job step for acquiring the target job step output file, that is, the output file of the target job step is the input file of the inheritance job step.
In one implementation of the embodiment of the present invention, optionally, determining, according to the job information matched with the target job step, an inheritance job step corresponding to the target job step includes:
acquiring the name of the target job step from a plurality of items of job information matched with the target job step;
and determining the inheritance job step corresponding to the target job step according to the name of the target job step and the names respectively corresponding to the rest job steps.
The method comprises the steps of analyzing the job control language corresponding to each residual job step according to a preset analysis grammar and a plurality of preset different identifiers to obtain the names corresponding to each residual job step, searching the job steps with the names sequentially arranged with the names of the target job steps in the names corresponding to each residual job step, and taking the job steps as inheritance job steps.
For example, when the name of the target STEP is "STEP030", the name of the succeeding STEP is "STEP031" accordingly.
In another implementation manner of the embodiment of the present invention, optionally, determining, according to the job information matched with the target job step, an inheritance job step corresponding to the target job step includes:
step 361, obtaining an output file path corresponding to the target job step from a plurality of items of job information matched with the target job step;
step 362, determining an inheritance job step corresponding to the target job step according to the output file path corresponding to the target job step and the input file paths corresponding to the rest job steps.
The method comprises the steps of analyzing a job control language corresponding to each remaining job step according to a preset analysis grammar and a plurality of preset different identifiers to obtain an input file path corresponding to each remaining job step, searching the same path as an output file path corresponding to a target job step in the input file path corresponding to each remaining job step, and taking the job step corresponding to the path as an inheritance job step.
And 370, establishing a mapping relation between the inheritance job step and the output file, so that the output file and format information of the output file are directly obtained when the inheritance job step executes the job.
Therefore, the mapping relation between the inheritance job step and the output file is established, the inheritance job step can rapidly acquire the file format information to be processed, and the data to be processed is acquired according to the file format information, so that the job efficiency of the job step is improved.
According to the technical scheme, the job control language corresponding to the target job step is acquired, the job control language is analyzed to obtain job information matched with the target job step, format information of an input file corresponding to the target job step is acquired according to the job information, format information of an output file corresponding to the target job step is determined according to the job information and the format information of the input file, then the format information of the output file is added into the output file corresponding to the target job step, the output file is stored in a storage area corresponding to an output file path, finally an inheritance job step corresponding to the target job step is determined according to the job information matched with the target job step, and a mapping relation between the inheritance job step and the output file is established, so that the output file and the format information of the output file are directly acquired when the inheritance job step executes the job. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the determination result of the file format and the job efficiency of the job steps.
In order to better introduce the technical solution provided by the embodiments of the present invention, the embodiments of the present invention may refer to the following embodiments:
step 1: and acquiring a job control language corresponding to the target job step, and analyzing the job control language to obtain job information matched with the target job step.
In this step, it is assumed that the job control language corresponding to the target job step is:
according to the preset analysis grammar, analyzing the control language. For example, the example job STEP,// STEP030EXEC RCSORT, shows the start of a job STEP, the name of the job STEP is "STEP030", and the program executed is RCSORT. The DD (DATA DEFINITION) key in each remaining row represents various types of data defined. Where// SORTIN DD dsn=xxx, represents the data entered by the RCSORT program, the keyword DSN later indicating that the entered data was obtained from this file. The data output by the RCSORT program is shown by// SORTOUT DD dsn=xxx, the key DSN later indicating that the output data is to be put into this file. And// SYSIN DD indicates that data of SYSIN is from the next line of text information until the end of the// symbol is encountered, where SYSIN is control information corresponding to RCSORT.
INCLUDE= (333, 1, CH, EQ, C '1') is a file screening rule, OUTREC= (10,23,23X) is a file reorganization rule.
Step 2: the format information of the input file corresponding to the target job step is acquired, and illustratively, the format information of the input file may be:
CBFSPAR0_ MULTI _ tenncy _ ID, X,1,5,1,5, # MULTI-entity identification,
CBFSPAR0 FGYAN PRIM AR ID, X,6,23,6,23, fang Yian master contract number,
CBFSPAR0 ASPD ID, X,29,8,29,8, commercially available product number,
CBFSPAR0 CCYCD, X,325,3,325,3, currency code,
CBFSPAR 0_inter_ind, X,329,1,329,1, interest flag.
Screening the format information of the input file according to a file screening rule INCLUDE= (333, 1, CH, EQ, C '1'), and outputting the format information conforming to the screening rule into an output file; according to the file reorganization rule outrec= (10,23,23X), target format information (i.e. "CBFSPAR0_fgyan_prim_ar_id, X,6,23,6,23, fang Yian main contract number") is determined, and twenty-three spaces are added on the basis of the target format information, a total of forty-six characters are generated, and offset information of the forty-six characters is output to the output file. The twenty-three characters from the offset of 1 are the real-world main contract numbers, and the twenty-three characters from the offset of 24 are spaces, specifically, the offset information is:
D1FSDF01.STEP030.SORTOUT,CBFSPAR0_FGYAN_PRIM_AR_ID,x,1,23,1,23,comment;
D1FSDF01.STEP030.SORTOUT,D1FSDF01_STEP030_0_nX_TEMP_SPACE,x,24,23,24,23,comment。
The method provided by the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.
Example IV
Fig. 4 is a block diagram of a determining device for file format according to a fourth embodiment of the present invention, where the device includes: a job control language parsing module 410, an input file format information acquisition module 420, and an output file format information determination module 430.
The job control language analysis module 410 is configured to obtain a job control language corresponding to a target job step, and analyze the job control language to obtain job information matched with the target job step;
an input file format information obtaining module 420, configured to obtain format information of an input file corresponding to the target job step according to the job information;
an output file format information determining module 430, configured to determine format information of an output file corresponding to the target job step according to the job information and format information of the input file.
According to the technical scheme, the job control language corresponding to the target job step is acquired, the job control language is analyzed to obtain job information matched with the target job step, then format information of an input file corresponding to the target job step is acquired according to the job information, and format information of an output file corresponding to the target job step is determined according to the job information and the format information of the input file. The technical scheme of the embodiment of the invention can realize the automation of the determination process of the output file format information, can meet the conditions of cross-job steps and cross-job data inheritance when a plurality of job steps execute the job, saves the labor cost and time cost consumed by manually calculating the file format, and improves the accuracy of the file format determination result.
Based on the above embodiments, the job control language parsing module 410 may include:
the analysis processing unit is used for analyzing the job control language according to a preset analysis grammar and a plurality of preset different identifiers to obtain a plurality of items of job information matched with the target job step;
Wherein the plurality of pieces of job information matched with the target job step include: the name of the target job step, an input file path corresponding to the target job step, a file processing rule corresponding to the target job step, and an output file path corresponding to the target job step;
the file processing rules comprise file screening rules and file reorganization rules.
The input file format information acquisition module 420 may include:
an input file path obtaining unit, configured to obtain an input file path corresponding to the target job step from a plurality of job information items matched with the target job step;
and the format information acquisition unit is used for acquiring the input file and the format information of the input file according to the input file path.
The output file format information determining module 430 may include:
a first format information determining unit, configured to determine first format information according to the file screening rule and format information of the input file;
a second format information determining unit, configured to determine second format information according to the file reorganization rule and the format information of the input file;
Wherein the first format information and the second format information together form format information of an output file corresponding to the target job step;
the format information screening unit is used for determining that the format information meeting the file screening rule is first format information in the format information of the input file according to the file screening rule;
the target format information determining unit is used for determining target format information meeting the file reorganization rule in the format information of the input file according to the file reorganization rule;
and the second format information generating unit is used for generating second format information according to the file reorganization rule and the target format information.
On the basis of the above embodiments, the determining device for a file format further includes:
a format information adding module, configured to add format information of the output file to an output file corresponding to the target job step;
the output file storage module is used for storing the output file in a storage area corresponding to the output file path;
an inheritance job step determining module, configured to determine an inheritance job step corresponding to the target job step according to job information matched with the target job step;
The mapping relation establishing module is used for establishing a mapping relation between the inheritance operation step and the output file so as to directly acquire the output file and format information of the output file when the inheritance operation step executes the operation;
the inheritance job step determining module may include:
a target job step name acquisition unit, configured to acquire a name of the target job step from a plurality of items of job information matched with the target job step;
a first determining unit, configured to determine an inheritance job step corresponding to the target job step according to the name of the target job step and the names corresponding to the remaining job steps respectively;
an output file path obtaining unit, configured to obtain an output file path corresponding to the target job step from a plurality of job information items matched with the target job step;
and the second determining unit is used for determining the succession operation steps corresponding to the target operation steps according to the output file paths corresponding to the target operation steps and the input file paths corresponding to the rest operation steps.
The file format determining device provided by the embodiment of the invention can execute the file format determining method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example five
Fig. 5 is a schematic structural diagram of a computer device according to a fifth embodiment of the present invention, where, as shown in fig. 5, the computer device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the computer device may be one or more, one processor 510 being taken as an example in fig. 5; the processor 510, memory 520, input means 530, and output means 540 in the computer device may be connected by a bus or other means, for example by a bus connection in fig. 5. The memory 520 serves as a computer-readable storage medium, and may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a method for determining a file format in any embodiment of the present invention (e.g., a job control language parsing module 410, an input file format information obtaining module 420, and an output file format information determining module 430 in a device for determining a file format). The processor 510 executes various functional applications of the computer device and data processing, i.e., implements a method of determining a file format as described above, by running software programs, instructions, and modules stored in the memory 520. That is, the program, when executed by the processor, implements:
Acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step;
acquiring format information of an input file corresponding to the target operation step according to the operation information;
and determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
Memory 520 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 520 may further include memory located remotely from processor 510, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The input means 530 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the computer device, and may include a keyboard, a mouse, and the like. The output 540 may include a display device such as a display screen.
Example six
The sixth embodiment of the present invention further provides a computer readable storage medium having a computer program stored thereon, where the computer program when executed by a processor implements the method according to any embodiment of the present invention. Of course, a computer-readable storage medium provided by an embodiment of the present invention may perform the relevant operations in a method for determining a file format provided by any embodiment of the present invention. That is, the program, when executed by the processor, implements:
acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step;
acquiring format information of an input file corresponding to the target operation step according to the operation information;
and determining the format information of the output file corresponding to the target job step according to the job information and the format information of the input file.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the foregoing positioning device for testing abnormality, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. A method for determining a file format, comprising:
acquiring a job control language corresponding to a target job step, and analyzing the job control language to obtain job information matched with the target job step; the job information matched with the target job step comprises file processing rules corresponding to the target job step; the file processing rules comprise file screening rules and file reorganization rules;
Acquiring an input file path corresponding to the target job step from the job information matched with the target job step;
acquiring an input file and format information of the input file according to the input file path;
according to the file screening rule, determining the format information meeting the file screening rule as first format information in the format information of the input file;
according to the file reorganization rule, determining target format information meeting the file reorganization rule in the format information of the input file;
generating second format information according to the file reorganization rule and the target format information;
and combining the first format information and the second format information to jointly form format information of an output file corresponding to the target operation step.
2. The method of claim 1, wherein parsing the job control language to obtain job information matching the target job step comprises:
and analyzing the job control language according to a preset analysis grammar and a plurality of preset different identifiers to obtain a plurality of pieces of job information matched with the target job step.
3. The method of claim 2, wherein the plurality of pieces of job information that match the target job step further comprises: the name of the target job step, the input file path corresponding to the target job step, and the output file path corresponding to the target job step.
4. The method of claim 3, further comprising, after the first format information and the second format information together form format information of an output file corresponding to the target job step:
adding the format information of the output file into the output file corresponding to the target operation step;
and storing the output file in a storage area corresponding to the output file path.
5. The method of claim 4, further comprising, after the first format information and the second format information together form format information of an output file corresponding to the target job step:
determining an inheritance job step corresponding to the target job step according to the job information matched with the target job step;
and establishing a mapping relation between the inheritance job step and the output file, so that the output file and format information of the output file are directly obtained when the inheritance job step executes the job.
6. The method of claim 5, wherein determining an inherited job step corresponding to the target job step based on job information matching the target job step comprises:
acquiring the name of the target job step from a plurality of items of job information matched with the target job step;
and determining the inheritance job step corresponding to the target job step according to the name of the target job step and the names respectively corresponding to the rest job steps.
7. The method of claim 5, wherein determining an inherited job step corresponding to the target job step based on job information matching the target job step comprises:
acquiring an output file path corresponding to the target job step from a plurality of items of job information matched with the target job step;
and determining an inheritance job step corresponding to the target job step according to the output file path corresponding to the target job step and the input file paths corresponding to the rest job steps.
8. A file format determining apparatus, comprising:
the job control language analysis module is used for acquiring a job control language corresponding to a target job step, analyzing the job control language and obtaining job information matched with the target job step; the job information matched with the target job step comprises file processing rules corresponding to the target job step; the file processing rules comprise file screening rules and file reorganization rules;
An input file format information acquisition module comprising: an input file path acquisition unit and a format information acquisition unit;
the input file path acquisition unit is used for acquiring an input file path corresponding to the target operation step from the operation information matched with the target operation step;
the format information acquisition unit is used for acquiring an input file and format information of the input file according to the input file path;
an output file format information determination module comprising:
the format information screening unit is used for determining that the format information meeting the file screening rule is first format information in the format information of the input file according to the file screening rule;
the target format information determining unit is used for determining target format information meeting the file reorganization rule in the format information of the input file according to the file reorganization rule;
the second format information generating unit is used for generating second format information according to the file reorganization rule and the target format information;
and the output file format information determining unit is used for combining the first format information and the second format information to jointly form the format information of the output file corresponding to the target operation step.
9. The apparatus of claim 8, wherein the parsing module comprises:
and the analysis processing unit is used for analyzing the job control language according to a preset analysis grammar and a plurality of preset different identifiers to obtain a plurality of items of job information matched with the target job step.
10. A computer device, comprising:
one or more processors;
a storage means for storing one or more programs;
the method of determining a file format as claimed in any one of claims 1 to 7, when said one or more programs are executed by said one or more processors, such that said one or more processors execute said programs.
11. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of determining a file format according to any of claims 1-7.
CN202011043499.6A 2020-09-28 2020-09-28 Method, device, equipment and storage medium for determining file format Active CN112181912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011043499.6A CN112181912B (en) 2020-09-28 2020-09-28 Method, device, equipment and storage medium for determining file format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011043499.6A CN112181912B (en) 2020-09-28 2020-09-28 Method, device, equipment and storage medium for determining file format

Publications (2)

Publication Number Publication Date
CN112181912A CN112181912A (en) 2021-01-05
CN112181912B true CN112181912B (en) 2024-03-12

Family

ID=73946908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011043499.6A Active CN112181912B (en) 2020-09-28 2020-09-28 Method, device, equipment and storage medium for determining file format

Country Status (1)

Country Link
CN (1) CN112181912B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4587628A (en) * 1983-12-05 1986-05-06 International Business Machines Corporation Method and apparatus for dynamic invocation of utilities
JPH05113875A (en) * 1991-10-24 1993-05-07 Nec Software Kansai Ltd Automatic job control language generator by discrimination of ending state
US5459866A (en) * 1992-09-03 1995-10-17 Hitachi, Ltd. Method of automatically producing job flow specification
JPH1124913A (en) * 1997-06-27 1999-01-29 Nec Software Kansai Ltd Jcl program conversion device and recording medium
JPH11110202A (en) * 1997-09-29 1999-04-23 Hitachi Software Eng Co Ltd Automatic job control language preparation method
JP2016081126A (en) * 2014-10-10 2016-05-16 株式会社エクサ Job control language automatic generation program
JP2017058728A (en) * 2015-09-14 2017-03-23 富士通株式会社 Program, information processing apparatus, and method of automatically generating job control language
CN107679140A (en) * 2017-09-25 2018-02-09 中国银行股份有限公司 Document handling method and system
CN111694572A (en) * 2020-05-27 2020-09-22 平安普惠企业管理有限公司 Code format conversion method, device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4587628A (en) * 1983-12-05 1986-05-06 International Business Machines Corporation Method and apparatus for dynamic invocation of utilities
JPH05113875A (en) * 1991-10-24 1993-05-07 Nec Software Kansai Ltd Automatic job control language generator by discrimination of ending state
US5459866A (en) * 1992-09-03 1995-10-17 Hitachi, Ltd. Method of automatically producing job flow specification
JPH1124913A (en) * 1997-06-27 1999-01-29 Nec Software Kansai Ltd Jcl program conversion device and recording medium
JPH11110202A (en) * 1997-09-29 1999-04-23 Hitachi Software Eng Co Ltd Automatic job control language preparation method
JP2016081126A (en) * 2014-10-10 2016-05-16 株式会社エクサ Job control language automatic generation program
JP2017058728A (en) * 2015-09-14 2017-03-23 富士通株式会社 Program, information processing apparatus, and method of automatically generating job control language
CN107679140A (en) * 2017-09-25 2018-02-09 中国银行股份有限公司 Document handling method and system
CN111694572A (en) * 2020-05-27 2020-09-22 平安普惠企业管理有限公司 Code format conversion method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112181912A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN111061833B (en) Data processing method and device, electronic equipment and computer readable storage medium
EP3251298B1 (en) Data extraction
CN109614325B (en) Method and device for determining control attribute, electronic equipment and storage medium
CN111427784B (en) Data acquisition method, device, equipment and storage medium
CN113901083A (en) Heterogeneous data source operation resource analysis positioning method and equipment based on multiple analyzers
EP3706012A1 (en) Data selection system and data selection method
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN106874243B (en) Formula processing method and device based on character string
CN111723087A (en) Mining method and device of data blood relationship, storage medium and electronic equipment
CN112181912B (en) Method, device, equipment and storage medium for determining file format
CN113760891A (en) Data table generation method, device, equipment and storage medium
CN111580821B (en) Script binding method and device, electronic equipment and computer readable storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN111339035B (en) Target data query method and device, computer equipment and storage medium
CN114579580A (en) Data storage method and data query method and device
CN113001538B (en) Command analysis method and system
CN113641523A (en) Log processing method and device
CN111078671A (en) Method, device, equipment and medium for modifying data table field
JP6228324B2 (en) Analysis apparatus and analysis method
CN111221843A (en) Big data processing method and device
CN117407430B (en) Data query method, device, computer equipment and storage medium
CN115543227B (en) Cross-system data migration method, system, electronic device and storage medium
CN112380205B (en) Automatic feature generation method and system of distributed architecture
CN110990475B (en) Batch task inserting method and device, computer equipment and storage medium
CN114840485A (en) Log matching method, device, equipment, storage medium and product

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