User Guide > Using Extract Editor > Defining Line Styles
Was this helpful?
Defining Line Styles
A line style identifies a particular line of text in the report file that contains information to be extracted. Each line style must be defined such that Extract Editor can identify the same line throughout the report file. The number of line styles required is determined by the number of lines of text that contain the set of information you want to extract. For example, if the report contains header information that includes a date that you want as a field, define a line style for the header line that contains the date.
If a detail line in the report contains information that must appear as fields within the data record, define a line style for the detail line. If the date from the header line and the information from the detail line make one complete data record, define only those two line styles in the report.
In most cases, it is recommended not to define any lines of text from which you are not extracting data. Lines for which there is no line style defined are ignored.
A line style definition includes one or more recognition rules and actions. To define a good line style, recognition rules must be specific enough to not include lines that are not required to be recognized, yet broad enough to include all lines that must be recognized.
Recognition Rules
The recognition rule contains the criteria based on which Extract Editor identifies a line of text. After you define a line style in one section of the report file, the Extract Editor compares each line of text in the entire file with that recognition rule. For each line of text that matches the recognition rule, Extract Editor assigns that line style. The line style name is displayed in the Line Style column on the left of the Design tab for each matching line of text in the report.
Each line style recognition rule is based on one of the following recognition style:
Pattern: If there is a unique string of text on one type of line that does not appear on any other lines, but always appears on that type of line, highlight that text and it becomes the pattern that the Extract Editor uses to identify that line in each record. In some cases, the unique string of text may even be a single character in a consistent position.
This is the most common style to use for a recognition rule. One or more patterns can be defined and evaluated using logical operators.
Blank Line: If you want to define the lines of the report that does not contain any text, then select the Blank Line option.
Note:  It is not necessary to define the blank lines in your report except when you need to use them as Base Lines, accept lines, or markers. It may also be useful to define line styles for blank lines with Reject action for better performance.
Exact Line Number: If the line of text you are defining appears on only one line of text in the report, then select this option. It can only be used to recognize lines that occur only once in a report.
Relative Position: If you want to define the lines that are relatively placed in the same position to the other line (Base Line), then select this option. It allows you to specify a line above or below the Base Line. Before selecting this option, you must define a line style for the Base Line. Relative position can be both positive or negative.
Pattern & Relative Position: If you want to define a line style based on the line's relative position to another line (Base Line) using specific characters or types of characters, then select this option. Before selecting this option, you must define a line style for the Base Line.
Finding Logical Record Breaks
The main goal is to extract useful data from the report file and then assemble that data into a field-and-record-oriented format. Therefore, in the initial steps, examine the report and find the logical record breaks. When you locate a logical record break, you define a line of text as the Accept Record to mark where the Extract Editor must stop collecting data fields and assemble a data record.
Some types of reports are formatted in such a way that logical record breaks are easy to locate and the Accept Record is easy to define. For example:
Reports where each page contains the information that comprises one record, and the last line of text is defined as the Accept Record.
Columnar reports where each line of text comprises one record, and each line is defined as the Accept Record.
Variable-length ASCII files where each record is derived from a consistent number of lines of text, and the last line of each record is defined as the Accept Record.
Last modified date: 10/22/2024