Changes for page SplitFile
Last modified by Outhman Moustaghfir on 2024/08/09 17:37
<
>
edited by Outhman Moustaghfir
on 2024/08/08 12:38
on 2024/08/08 12:38
edited by Outhman Moustaghfir
on 2024/08/09 17:37
on 2024/08/09 17:37
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,3 +1,5 @@ 1 += = 2 + 1 1 = SplitFile Connector Documentation = 2 2 3 3 == Overview == ... ... @@ -4,7 +4,7 @@ 4 4 5 5 [[image:1723111201862-594.png]] 6 6 7 -The splitFile connector is a utility designed to split files based on specific configurations defined in an XML format. The connector supports two modes of operation: ** per_identifier** and **per_bloc**mode. Below is the functional documentation for each mode, including the expected format file, sample input file, and corresponding output files.9 +The splitFile connector is a utility designed to split files based on specific configurations defined in an XML format. The connector supports two modes of operation: **line** and **message **mode. Below is the functional documentation for each mode, including the expected format file, sample input file, and corresponding output files. 8 8 9 9 == Usage == 10 10 ... ... @@ -21,7 +21,7 @@ 21 21 xmlns:ix="localFunction" 22 22 xmlns:fn="http://www.w3.org/2005/xpath-functions"> 23 23 24 - <Split 400mode="" headers="" footers=""ignoreItems="" identifiers=""lineseparator="" position ="" size=""></Split400>26 + <SplitBy mode="" headers="" footers="" excluded="" included="" endLine="" position ="" size="" optionChar="" ></SplitBy> 25 25 </ixDOC> 26 26 27 27 {{/code}} ... ... @@ -32,11 +32,15 @@ 32 32 === Key Attributes: === 33 33 34 34 * **Headers and Footers:** Specify header and footer lines to be included in each output file. 35 -* **Line Separator:** Define the character used to separate lines in the file. 36 -* **Ignored Items:** Exclude specific lines from the output by defining them in the ignoreItems attribute. 37 -* **Position and Size:** Used in **per_identifier** mode to locate and define the identifier in the input file. 37 +* **endLine:** Define the character used to separate lines in the file, default value is newLine char. 38 +* ((( 39 +**optionChar : **Define the character used to separate lines in output file, default value is newLine char. 40 +))) 41 +* **included :** Include specific lines from the output by defining them in the include attribute. 42 +* **excluded:** Exclude specific lines from the output by defining them in the exclude attribute. 43 +* **Position and Size:** Used to locate and define the include in the input file. 38 38 39 -=== 1. Mode: per_identifier===45 +=== 1. Mode: line === 40 40 41 41 42 42 === Input File Example : === ... ... @@ -271,9 +271,9 @@ 271 271 {{/code}} 272 272 273 273 274 -==== Example 1: without specifying ide ntifiers====280 +==== Example 1: without specifying include attribute ==== 275 275 276 -when we don't use ide ntifiers. it means for each output file we are going to have headers and footers and also for the identifierswe will defined them by position and size so for each line at a specific position and with a size this is the identifier.282 +when we don't use include attribute. it means for each output file we are going to have headers and footers and also for the include we will defined them by position and size so for each line at a specific position and with a size this is the include . 277 277 278 278 {{{ 279 279 }}} ... ... @@ -285,7 +285,7 @@ 285 285 xmlns:ix="localFunction" 286 286 xmlns:fn="http://www.w3.org/2005/xpath-functions"> 287 287 288 - <Split 400mode="per_identifier" headers="UNA;UNB" footers="UNZ1;UNZ"ignoreItems="QTY" identifiers=""lineseparator="'" position ="25" size="9"></Split400>294 + <SplitBy mode="line" headers="UNA;UNB" footers="UNZ1;UNZ" excluded="QTY" include ="" endLine="'" position ="25" size="9"></SplitBy> 289 289 </ixDOC> 290 290 291 291 {{/code}} ... ... @@ -311,13 +311,13 @@ 311 311 312 312 {{/code}} 313 313 314 -== Example 2: with specifiying ide ntifiers==320 +== Example 2: with specifiying include attribute == 315 315 316 316 we don't need to use position and size. 317 317 318 -== 2. Mode: per_bloc: ==324 +== 2. Mode: message: == 319 319 320 -In ** per_bloc**ntifier. Each output file begins with the start of an identifierand ends when another identifieris encountered.326 +In **message** mode, the file is split into sections based on a specified include . Each output file begins with the start of an include and ends when another include is encountered. 321 321 322 322 323 323 ==== Example ==== ... ... @@ -330,7 +330,7 @@ 330 330 xmlns:ix="localFunction" 331 331 xmlns:fn="http://www.w3.org/2005/xpath-functions"> 332 332 333 - <Split 400mode="Per_bloc" headers="UNA;UNB" footers="UNZ1;UNZ"ignoreItems="QTY" identifiers="UNH"lineseparator="'"></Split400>339 + <SplitBy mode="message" headers="UNA;UNB" footers="UNZ1;UNZ" excluded="QTY" include ="UNH" endLine="'"></SplitBy> 334 334 </ixDOC> 335 335 336 336 {{/code}} ... ... @@ -337,6 +337,7 @@ 337 337 338 338 === an example of an output file === 339 339 346 + 340 340 {{code language="xml"}} 341 341 UNA +.? ' 342 342 UNB+UNOD 3+5907613200009 14+5907808850002 14+240509 1553+11480134402++DESADV' ... ... @@ -379,4 +379,18 @@ 379 379 380 380 {{/code}} 381 381 389 +==== Other Examples : ==== 390 + 391 + 392 +{{code language="xml"}} 393 +<!-- Write a file for each type of segment --> 394 +<SplitBy mode="line" headers="UNA;UNB" footers="UNZ" excluded="UNA;UNB;UNZ" included="" size="3" position="1" endLine="'" optionChar="\r\n" /> 395 + 396 +<!-- Write a file for each type of record where the line identifier (Position 1 to 8) is different --> 397 +<SplitBy mode="line" size="8" position="1" /> <!-- The default endLine is the carriage return --> 398 + 399 +<!-- Write a file for each message starting with UNH with repeated envelope for each --> 400 +<SplitBy mode="message" identifier="UNH" headers="UNA;UNB" footers="UNZ" excluded="" included="" size="3" position="1" endLine="'" optionChar="\r\n" /> 401 +{{/code}} 402 + 382 382 === ===