Read Line feeds in seqential file stage
Moderators: chulett, rschirm, roy
Read Line feeds in seqential file stage
Hi guys,
I have a txt file which contains many records. Many of these records span multiple lines(i.e there can be line feed char).
eg:
111, "I work on
Datastage"
How can read one such record using the sequential file stage in Parallel job?
Another issue is that these multi-line fields can also contain comma (,). This comma also needs to be rejected by datastage and not considered as a field delimiter.
Can you please help me with this?
Regards,
Deepak
I have a txt file which contains many records. Many of these records span multiple lines(i.e there can be line feed char).
eg:
111, "I work on
Datastage"
How can read one such record using the sequential file stage in Parallel job?
Another issue is that these multi-line fields can also contain comma (,). This comma also needs to be rejected by datastage and not considered as a field delimiter.
Can you please help me with this?
Regards,
Deepak
-
- Premium Member
- Posts: 783
- Joined: Mon Jan 16, 2006 10:17 pm
- Location: Sydney, Australia
It doesnt matter how much lines you record is running into. What matters is where record delimiter is located. So giving the exact column and records delimiters should serve the purpose. :D
Thinking outside the box....
Your monitor can display only those many characters with the current screen resolution
Thinking outside the box....
Your monitor can display only those many characters with the current screen resolution
Thanks
DSDexter
DSDexter
Hi guys,
I just tried the folowing input:
Col0|val0,Col1|Val
ue1Z
Here Z is the record de-limiter and comma is the value delimeter.
I get the error:
Sequential_File_1,0: Delimiter for field "Value" not found; input: {Col1|Val}
But if I give the folowing input, it works. i.e all in the same line
Col0|val0,Col1|Value1Z
So, does that mean that whatever record de-limiter we use needs to be in the same line as the rest of the record?
Regards,
Deeapk
I just tried the folowing input:
Col0|val0,Col1|Val
ue1Z
Here Z is the record de-limiter and comma is the value delimeter.
I get the error:
Sequential_File_1,0: Delimiter for field "Value" not found; input: {Col1|Val}
But if I give the folowing input, it works. i.e all in the same line
Col0|val0,Col1|Value1Z
So, does that mean that whatever record de-limiter we use needs to be in the same line as the rest of the record?
Regards,
Deeapk
Have you entered a line fed after Val?dkaranth wrote:Hi guys,
I just tried the folowing input:
Col0|val0,Col1|Val
ue1Z
Here Z is the record de-limiter and comma is the value delimeter.
I get the error:
Sequential_File_1,0: Delimiter for field "Value" not found; input: {Col1|Val}
But if I give the folowing input, it works. i.e all in the same line
Col0|val0,Col1|Value1Z
So, does that mean that whatever record de-limiter we use needs to be in the same line as the rest of the record?
Regards,
Deeapk
There might be something after Val that is not visible to the naked eye. Using the od utility should explain you in detail. :D
Thanks
DSDexter
DSDexter
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try pre-processing the file to eliminate the linefeeds that follow "Z" characters, and rely on the definition of "Z" as the record delimiter.
You should also be able to edit the table definition to indicate that the column in question contains line terminator characters (linefeeds).
You should also be able to edit the table definition to indicate that the column in question contains line terminator characters (linefeeds).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: