Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Issue setting delimiters for text file reader channel (http://www.mirthcorp.com/community/forums/showthread.php?t=218340)

jmcollins 06-12-2018 07:55 AM

Issue setting delimiters for text file reader channel
 
3 Attachment(s)
Iím testing/using Mirth version 3.6.0 for a file reader channel and attempting to set the record delimiter and batch delimiter to a comma preceded by 48 spaces. I have been successful reading and mapping the data from the body of the text file into the source connector transformer. (then output to a file in XML format).

My problem is setting the record and batch delimiter to key off the below sequence in line 4. (the spaces and the comma: see body of text attachment)

I do have process batch turned on. (see process batch attachment)

I have tried to set the 48 spaces then comma within quotes and without the quotes. I get multiple records in a text file with each one starting with the spaces/comma sequence. (see delimiter settings attachment)

I am stumped on what might work to allow me to set the delimiters (record and batch) to get the text file to read in as a batch of these records and split them out into unique records. The source transformer and destination file writer is working.

Any help would be great. Thank you.

agermano 06-12-2018 10:31 AM

You shouldn't need the quotes since they aren't part of the text.

You have the default of Ignore Carriage Returns checked, which doesn't process the \rs in the file. So, either uncheck that box or change your delimiter to <48 spaces>,\n.

jmcollins 06-13-2018 07:35 AM

still not quite right, but closer to setting delimiters for text file reader channel
 
1 Attachment(s)
So we are getting closer... the delimiters table is as now set up as suggested with <48 spaces>,\n (see delimiter settings#2 below)

When I run the text document I get the below delimiter in transformed for the first record... but it still can not read the next record. (as if it's not seeing this as the delimiter.)

<delimited>
<row>
<column1/>
<column2/>
<column3/>
<column4/>
<column5/>
<column6/>
<column7/>
<column8/>
<column9/>
<column10/>
<column11/>
<column12/>
<column13/>
<column14/>
<column15/>
<column16/>
<column17/>
<column18/>
<column19/>
<column20/>
<column21/>
<column22/>
<column23/>
<column24/>
<column25/>
<column26/>
<column27/>
<column28/>
<column29/>
<column30/>
<column31/>
<column32/>
<column33/>
<column34/>
<column35/>
<column36/>
<column37/>
<column38/>
<column39/>
<column40/>
<column41/>
<column42/>
<column43/>
<column44/>
<column45/>
<column46/>
<column47/>
<column48/>
<column49>,

As a note: To get the above delimiter, I set the column delimiter to a space so I can map the unique xml segment fields to the data elements I need. If I change it to \r\n or \n the columns had many data elements in them and I couldn't parse them (pick the data elements) I need.

In any case even if I set the column delimiter to \r\n or \n it had no effect on the record or batch delimiter.

agermano 06-13-2018 11:30 AM

Sorry, <48 spaces> was shorthand because I didn't know how to clearly represent 48 spaces on the forum. Replace that with 48 actual spaces.

Do you have a spec for your data layout? It doesn't make any sense to me, but I'm guessing you probably want to use fixed width columns instead of delimited.

jmcollins 06-22-2018 07:39 AM

Quote:

Originally Posted by agermano (Post 263917)
Sorry, <48 spaces> was shorthand because I didn't know how to clearly represent 48 spaces on the forum. Replace that with 48 actual spaces.

Do you have a spec for your data layout? It doesn't make any sense to me, but I'm guessing you probably want to use fixed width columns instead of delimited.

I’m closing this thread as I went back to the customer to get a different extract format. Issue is no longer relevant. Thank you for the help.


All times are GMT -8. The time now is 08:01 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation