Parse text from a horizontal file
- UpdatedAug 3, 2023
- 3 minutes to read
- Vancouver
- Service Mapping
You can use the file type parsing strategy to parse text in files of the following formats: .ora file (used by various Oracle products), .properties file (common for Java), .xml file, and .ini file. For vertical files, use the vertical file parsing strategy instead.
Before you begin
Basic knowledge of programming is desirable.
Role required: pd_admin
About this task
You can define multiple extracts and variables. When identifying text for extraction into variables, what you are really doing is identifying the text location within a context.
- In Debug mode, you can select the relevant string from the file contents in
the text box. For each string you select, its position and delimiters
relative to its context are stored. It enables the same definitions to apply
to other files with the same structure even though the text varies. However,
it selects the entire text within a context.
For example, if you try to select only 456 in the text box of an XML file with the following line, the entire string between the keywords is selected.
- On the Advanced Parsing Options form (outside of Debug mode), you can
specify a delimiter and position to identify the text string. You can also
use this form to make a more refined selection than from within the text
box.
For example, you could specify a delimiter (-) and the number of positions to extract after the delimiter (3) to extract the string (456).
Procedure