Author |
Message
|
matuwe |
Posted: Thu Jan 14, 2010 1:53 am Post subject: ~ delimited file |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Hi Please help.
I have created a comma delimited message set and have been asked to change the delimiter to ~. I took the short route of changing the messageset delimiter to ~ on Data element separation settings. The received file is delimited (read) successfully.
Then I created a second message definition file in the same message set. My problem now is, the new file created doesn't have a linefeed and the second line of the file starts with a delimiter. I tried to add a linefeed with x'OA' default CCSID, and end up with the last field enclosed in qoutes + linefeed.
Can my problem be because I took a short cut in creating a message set? Do I have to do it differently?
Problems
1. Second line (row) start with delimiter
2. Linefeed causes the last field to be enclosed with quotes.
much appreciated. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 14, 2010 4:22 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi matuwe,
That description is rather confusing, so I don't really understand your scenario yet. This is what I *think* you are telling me. Please correct anything that's wrong.
- You are receiving a comma-delimited message which consists of lines of text. Each line consists of some fields delimited by commas.
- You need to output a message in which all commas are changed to ~ ( tildas )
- You have tried to do this by copying the input message set and changing the delimiter. The result was an output message with no linefeeds.
Please supply the following:
- the version and fix pack level of your broker runtime
- an example input message
- the output message that you want
- the output message that you actually got |
|
Back to top |
|
 |
matuwe |
Posted: Thu Jan 14, 2010 4:51 am Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Thanks for the response... and sorry for the confusion.
I am receiving a flat file which is comma dilimited. and mthe output file is a subset of the original file. The flows works pefectly.
Now I have been asked to change the file delimeter from , to ~. So I changed the messageset delimeter to ~ and hoped everything will still work.
My message set has two message definition files.
1. for incomming message and the second for the out going message.
The file comes in as
aa,bb,cc,dd,ee and the output is aa,dd,ee which worked fine
Now that I need to change the delimeter the file will look like
aa~bb~cc~dd~ee and the output is aa~dd~ee
very much appreciated, |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 14, 2010 4:57 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
When I compare your second post with your first post, it raises even more questions. Please provide all of the information that I asked for, and take time to explain yourself carefully. I still have no idea what has gone wrong, or what steps you have taken to investigate the problem. |
|
Back to top |
|
 |
matuwe |
Posted: Thu Jan 14, 2010 5:05 am Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
The results after changing the delimeter to ~ looks like this
aa~bb~cc~dd~ee and the output is aa~dd~ee~aa2~dd2~ee2
So I added a line feed to fix the problem and now the file looks like this
aa~dd~"ee
"~aa2~dd2~"ee2
"~
SO I now have double qoutes on there last field
My flow is simple FileInput >> ComputeCode >> FileOutput
Thanks  |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jan 14, 2010 5:39 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
and the output is aa~dd~ee~aa2~dd2~ee2
So I added a line feed to fix the problem and now the file looks like this
aa~dd~"ee
"~aa2~dd2~"ee2
"~ |
Your input message format consists of a single line, with exactly 5 delimited fields. Your output message format consists of a single line with exactly 3 delimited fields. So you don't need any line feeds. Or did you forget to explain that?
I cannot help any further until you take some of *your* time provide an accurate description of your messages, and what you want to do with them. |
|
Back to top |
|
 |
matuwe |
Posted: Thu Jan 14, 2010 5:56 am Post subject: |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Sorry this is totally accidental fault…. I changed the message definition file delimiter to ~ and it was supposed to be <CR><LF>.
So I guess changing the delimiter was that easy? Thanks for helping
very much appreciated
It works. |
|
Back to top |
|
 |
|