--- title: "When does the parser start a new record?" slug: "intro-profiles-phase-2-parsing-new-record" updated: 2026-09-29T08:20:45Z published: 2026-09-29T08:20:45Z canonical: "docs.lobstersoftware.com/intro-profiles-phase-2-parsing-new-record" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # When does the parser start a new record? ## What are records and what is their purpose? During parsing, so-called records are created. At least one record is created. **NOTE:** For the number of generated records, see system variable `VAR_RECORDS`. ### Structuring the data These records can be used to structure the input data at the top level and thus indirectly also the output data. The first step in developing a Mapping is always to think about how you want the records to be created during parsing. Everything you set up in the mapping window is executed per record. ### Memory management A further function is memory management. Records can be moved from the main memory to the hard disk (with the so-called [Swapping](/v1/docs/en/intro-profiles-phase-2-parsing-swapping)). This mechanism can be used to optimize performance and to handle oversized input files (avoiding an `OutOfMemoryException`). ### Multiple execution of the responses in Phase 6 There is a setting with which the responses can be executed once per record and not only once per profile run (option "Enter output channels for each record" in "Phase 2/Extended"). ## Behavior of the different parsers There is a separate parser for each Document type with distinct behavior. ### Document type BWA The BWA parser automatically detects a change of the message type when a line of the input file is read and generates a new record for this case. More on this in the explanations on this input format (see [BWA](/v1/docs/en/profiles--tab-3-format-bwa)). ### Document type CSV Whenever the first top-level node is entered in the Source tree, and there are multiple top-level nodes. If there is only one node, only one record is created. If, however, you still want only the first node to read in data but several records to be created, you can insert an additional node that otherwise has no function (i.e. does not read in any data). You can also set this node to inactive. Note, however, that the set checkbox "Same matchcodes exist" overrides this behaviour. You can also use option "New record if value changes" (see below). **NOTE:** In this context the [TokenFileSplitter](/v1/docs/en/token-file-splitter) is also interesting. ### Document type Cargo-Imp The parser allows only one message per input file. Therefore, exactly one record is generated. ### Document type Database See section “Document type CSV” above. ### Document type EDIFACT A record is generated for each repeated block "UNH-UNT" or "UNB-UNZ". In addition, the option "Split EDIFACT files" can be used to force the generation of one job (with one record) per block. More on this in the explanations on this input format (see [EDIFACT](/v1/docs/en/profiles--tab-3-format-edifact)). ### Document type Custom class The data is forwarded directly to the Integration Unit. Not relevant here. ### Document type Excel Works like the CSV parser. But one node is sufficient to allow the creation of multiple records. A second node is not necessary. ### Document type Fixed-length Whenever the first top-level node is entered in the source tree. Even if there is only one top-level node (so different from CSV). **NOTE:** The set checkbox "Same matchcodes exist" eliminates this behavior. ### Document type IDoc Each line beginning with "EDI_DC40" creates a new record. ### Document type JSON On the one hand, this parser is directly connected to the functionality of the submodule “Forms” and automatically controlled there. If the document type is used standalone and the first node of the source structure represents an array on the top level of the JSON file, then a record is created for each value of this array. In all other cases, exactly one record created. **Example:** Given the following source structure and input file, two records would be generated. ![images/download/thumbnails/201684035/148-version-1-modificationdate-1749437802237-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/148-version-1-modificationdate-1749437802237-api-v2.png) ```json {   "eBooks":[      {         "language":"Pascal",         "edition":"third"      },      {         "language":"Python",         "edition":"four"      }   ] } ``` ![images/download/attachments/201684035/2193-version-1-modificationdate-1749437802230-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/2193-version-1-modificationdate-1749437802230-api-v2.png) See [JSON](/v1/docs/en/profiles--tab-3-format-json) for more on this in the explanations on this input format. ### Document type X12 A job with one record is generated for a maximum of one block of data from segment "ISA-IEA". If there is more data after the first "IEA" tag, it is ignored. Option "Split X.12 files", however, creates further records for each additional block. See [**X12**](/v1/docs/en/profiles--tab-3-format-x-12) for more on this in the explanations on this input format . ### Document type XML Phase 2, option "XML tag for record"*.* - A new record is generated for each occurrence of the tag. - Additionally in version "V4": The generation of records can be controlled with options "Insert new root element for splitting" and "Chunk size". See [XML](/v1/docs/en/profiles--tab-3-format-xml) for more on this in the explanations on this input format. ## Additional relevant configurations Please also note the following two options for every document type. ### Option "Create new record" Only relevant for document types "CSV" and "Fixed-length". See [Source structure attributes](/v1/docs/en/phase-3-source-structure-attributes) . ### Option "Force single record" See respective document type (option is not available for all).. ### Option "New record if value changes" ① **New record if value changes:** Source field attribute in Phase 3. ② **Default value:** Source field attribute in Phase 3. - If in a source structure node all field values that have the attribute ① enabled have changed. If attribute ① is activated in at least one source field, the normal parser algorithm is deactivated if the respective parser supports this attribute (e.g. "CSV"). **NOTE:** In the structure, a small arrow will appear in front of the field name. - If attribute ① is activated in a source structure field and attribute ② is filled, a new record will only be created if the source field value has changed and the new source field value is equal to the value specified in ②. **IMPORTANT:** Options "Enter output channels for each record" (see [Extended (Phase 2)](/v1/docs/en/profiles--tab-3-advanced)) and "Force single record" (see above) may have no effect when using ①. The following figure shows the effect of attribute ①. ![images/download/attachments/201684035/Feldwertaenderung_2-version-1-modificationdate-1749437802233-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/Feldwertaenderung_2-version-1-modificationdate-1749437802233-api-v2.png) ③ Attribute ① has been set in source structure field "number". ④ Attribute ① has been set in source structure field "val_2". ⑤ The fields get values "1" and "xx" from the input data. ⑥ The fields get values "2" and "xx" from the input data. Since only one field value differs from the previous value, no new record is started. The nodes are all inserted in the first record ⑧. ⑦ The fields get values "3" and "xz" from the input data. Since both values differ from the previous values, a new record is created and the node is inserted into the new record ⑨. All further nodes will also be inserted in this record until the next record is created. The core task of Phase 3. Mapping transfers data from the source structure to the target structure according to defined rules. In the process, fields can be transformed, functions can be called, and values can be calculated. Parsing: The input data is parsed into the source structure. The source structure represents the input format. Configuration in Phase 2, which determines the format of the input data. The document type determines how the parser reads the data and transfers it to the source tree. Examples: EDIFACT, XML, JSON, CSV, X12. Structured representation of the input data in Phase 2. The source tree is generated by parsing the input file and forms the basis for the mapping in Phase 3. Mapping: Rules transfer the data from the source structure to the target structure. This is the core of the profile.