Sequential file delimiter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Sequential file delimiter

Post by agathaeleanor »

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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes. You'll need to switch from Delimiter to Delimiter String to use more than a single character.
-craig

"You can never have too many knives" -- Logan Nine Fingers
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post by agathaeleanor »

I just realized that double quote(") is a special character?

It seems that i've change delimiter string and input (double quote + pipe + double quote) "|" it doesn't recognize the delimiter as it is. it only appear (pipe) |

Need your advice.

Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post by agathaeleanor »

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.
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

Provide some sample data for understanding.
Cheers
Ravi K
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post by agathaeleanor »

sample data from sequential file,

001"|"John"|"6-Yearly"|"2009
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
piyu
Participant
Posts: 52
Joined: Thu Jul 21, 2005 12:22 am
Location: Singapore

Post by piyu »

Try this :
Type in Delimiter String = '"|"' (single quote double quote pipe double quote single quote)
Qute= None
Post Reply