Sequential file delimiter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
Sequential file delimiter
May I know if DS v8 accept delimiter as "|".
I tried in DS, it only allow one character to key in.
Need your advice on accepting delimiter as "|"
Thanks in advance.
I tried in DS, it only allow one character to key in.
Need your advice on accepting delimiter as "|"
Thanks in advance.
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If the three-character string "|" is your delimiter string, set the quote character to none.
If the single character | is your delimiter and character strings are quoted with " then set the delimiter to | and the quote character to double.
Either will work. However, if you want to have double-quoted strings AND to have "|" as the delimiter, then you're out of luck.
If the single character | is your delimiter and character strings are quoted with " then set the delimiter to | and the quote character to double.
Either will work. However, if you want to have double-quoted strings AND to have "|" as the delimiter, then you're out of luck.
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: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
However, in sequential stage, the setting is set to
Delimiter String = |
Quote = none
Though I manually key in Delimiter String = "|"
After I saved the job, the delimiter reads Delimiter String = |
As well when running the job, it seems that delimiter is | because i hit the error
SEQ_CORP,0: Delimiter for field "DIV_DEP" not found; input: {" 2 0 1 1 0 1 1 3}, at offset: 4
Thanks in advance for your help.
Delimiter String = |
Quote = none
Though I manually key in Delimiter String = "|"
After I saved the job, the delimiter reads Delimiter String = |
As well when running the job, it seems that delimiter is | because i hit the error
SEQ_CORP,0: Delimiter for field "DIV_DEP" not found; input: {" 2 0 1 1 0 1 1 3}, at offset: 4
Thanks in advance for your help.
-
- Participant
- Posts: 76
- Joined: Mon Mar 05, 2007 9:26 pm
- Location: Malaysia
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Filter command cat filepath | tr -d \" in Sequential File stage to get rid of the double quotes.
If the data contain double quote characters, prefer a sed or awk command to replace all instances of "|" with | in the filter command.
If the data contain double quote characters, prefer a sed or awk command to replace all instances of "|" with | in the filter command.
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.