If you want to scan an interval of lines for a condition, you should create one or more line definitions. If you want to refer to data, that is always placed in fixed lines/positions, then a line type is normally not needed.
When you select option ‘1' for the ‘Line type definitions’, you will see the existing line definitions listed:
Work with line type definitions XML310D
XML definition name . : XML_DEMO
Position to . . . . . . Sequence number
Type options, press Enter. 2=Change 3=Copy 4=Delete 5=Display 7=Change sequence
Opt SeqNbr Description Line type 1 Detail lines DETAIL -
End F3=Exit F6=Create F11=View 2 F12=Cancel
|
You create a new line type definition by pressing F6=Create:
Change line type definition XML311D
XML definition name . . : XML_DEMO
Sequence number . . . . : 1 Description . . . . . . . Detail lines Input line type . . . . . Name, blank=entire page Line type . . . . . . . . DETAIL Allow additional types . . N Y=Yes, N=No Include lines above . . . Include lines below . . .
Type comparisons, press Enter. Specify OR to start each new group.
AND/OR Line(s) Pos(s) Operator Compare value 30-42 1-30 NE
More... F3=Exit F4=List F12=Cancel
|
* Input line type is only available in XML+, which requires the XML+ module.
The screen includes these fields:
Sequence number
Like for the page type, this determines in which order the line types are executed. The first line type that contains a condition that is true for a specific line in the spooled file, will exclude the following line types to be selected for this spooled file line - unless the field ‘Allow additional types’ has been set to ‘Y’.
Input line type
This option is only available with the XML+ module. If you have detail lines, where each detail entry may span across multiple lines, then these may be cut in the middle i.e. a page break may divide these lines. If you e.g. imagine such a detail entry in the spooled file:
PartNo Description Quantity Total
0001 This is a very, very long description
17 340,00
- and a page break is found in the input spooled file like so:
PartNo Description Quantity Total
0001 This is a very, very long description
<Page Break>
17 340,00
Then we want to combine information from two pages into a combined detail line in the output XML file. If we identify these detail lines with a line type, and then use this line type as ‘Input line type’, then an internal ‘work spooled file’ is generated, in which all these detail lines are inserted, so that we can still refer to the relative lines. So if we e.g. search for the detail lines found via a part number, then we can (still) use relative line 2 to pick up the quantity and amount - even though they are (sometimes) found on the next page.
Allow additional types
As indicated above, this can make it possible to assign more than one line type to one spooled file line. This may be useful if you e.g. have 2 or more columns in the spooled file. The value of this parameter can be seen on screen XML310D (shown above) as a ‘+’ or ‘-‘ to the right of the line type.
Include lines above
If you want to assign the same line type to a number of preceding spooled file lines, then you can state just how many lines above the one selected by the condition (stated in the bottom of the screen), that should also have this line type. (The first of these lines will later be referenced to as line 1).
Include lines below
Simular to the previous field - only including spooled lines below the condition.
You may notice the syntax for stating an interval of lines and/or positions above. Here we are conditioning on the spooled file line interval 30 to 42 and searching the positions 1-30: If these positions are not blank (within the line interval), then the line is a ‘DETAIL’ line. You may also notice, that the operator can be prompted with F4 (see possible values here), and that the compare value should not be stated with hyphens (‘’).
Later you can search for specific variables in the spooled file, conditioned on line type(s) and/or page type(s).