Delimiter for Sequential file with pipe & comma in data

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
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Delimiter for Sequential file with pipe & comma in data

Post by highpoint »

Hi,

We usually use Pipe seperated sequential file.

In this case we have source data containing both pipe and comma.

i tried different options available as delimiter in sequential file but nothing seems to work.

I have implemented earlier Ctrl-Y char(25) as delimiting characters in my transformer earlier. But sequential file does not allow this.

Help on this is appreciated on this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you believe that the Sequential File stage does not allow using Ctrl-Y as the field delimiter? How have you tried to enter that value into the Field Delimiter property?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Post by highpoint »

ray.wurlod wrote:Why do you believe that the Sequential File stage does not allow using Ctrl-Y as the field delimiter? How have you tried to enter that value into the Field Delimiter property?
Yes i tried.

For Ctrl-Y i have to type in char(25)

And the delimiter allows only one character there.

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

Post by ray.wurlod »

Next time you're in that screen read the help on entering ASCII codes for non-printing characters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Does this post relates to which case?

Code: Select all

A|,b|,c

Or

A|b,c
Thanks
pandeeswaran
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

highpoint wrote:And the delimiter allows only one character there.
Use the property "Delimiter string" instead of Delimiter.

Delimiter string allows for multiple characters.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Here's the thing - all they have is a single character, hence Ray's advice to read the help and learn how to input them when they are "non-printing".
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Craig

I am not able to understand without sample data.
How pipe and comma becomes single non printing character ?
Can you Please post some sample data with the delimiters what this thread is being discussed?
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Delimiter for Sequential file with pipe & comma in d

Post by chulett »

highpoint wrote:I have implemented earlier Ctrl-Y char(25) as delimiting characters in my transformer earlier. But sequential file does not allow this.
Pandeesh, we're responding to this statement.
-craig

"You can never have too many knives" -- Logan Nine Fingers
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Post by highpoint »

ray.wurlod wrote:Next time you're in that screen read the help on entering ASCII codes for non-printing characters.
I read the ascii help on this.

And i tried using the delimiter string option in format tab of sequential file.

I tried using char(25) , 'char(25)'

But i dont see Ctrl-Y in the output of my file.

Please help.
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Post by highpoint »

Would appreciate reply on my question.

Looks like my thread is being hijacked. :D
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Un-hijacked. And your answer can be inferred in what Ray wrote to the hijacker.
-craig

"You can never have too many knives" -- Logan Nine Fingers
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Post by highpoint »

I have tried using 025, 222 for all this it fails with the following error:

DST_BenefitPlanLoad_MBR_PAY_DSGN_STEP_SUM_DIM_ins: Error when checking operator: "delim_string" property must have a string value; text: delim_string=222


When i use char(222) or @FM then the job runs fine but the data on unix shows char(222) or @FM instead of special character respectively.

I am trying to come up with a standard for using delimiting character which we can use in all the sequential files without worrying what our data may contain.


Would really appreciate your help on this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

highpoint wrote:I have tried using 025, 222 for all this it fails with the following error:

DST_BenefitPlanLoad_MBR_PAY_DSGN_STEP_SUM_DIM_ins: Error when checking operator: "delim_string" property must have a string value; text: delim_string=222
You should be entering that as the Delimiter property, not the Delimiter String.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deeplind07
Participant
Posts: 31
Joined: Mon Jun 28, 2010 5:15 am
Location: pune

Post by deeplind07 »

How about asking the source system to send you the field in which you are expecting pipe,comma as data itself in quotes(single, doulbe etc).
eg.

A|B|"C|"|D
Post Reply