Problem with 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
ssunkad
Participant
Posts: 2
Joined: Wed Jul 18, 2007 4:20 am
Location: Mumbai
Contact:

Problem with file delimiter.

Post by ssunkad »

We are getting pipe line delimited file in production and splitting it using the following logic.

else if svRecNum='510' and len(Field(in_D0225.Column1,'|',14)) >40 then Field(in_D0225.Column1,'|',14)
else if svRecNum='510' and len(Field(in_D0225.Column1,'|',15)) >40 then Field(in_D0225.Column1,'|',15)
else if svRecNum='510' and len(Field(in_D0225.Column1,'|',16)) >40 then Field(in_D0225.Column1,'|',16)

and so on.

this is working fine, But if address field(14 to 16) contain any having the comma followed by space character. Then data stage is considering it as delimiter. If i remove the space then it is working as usual i.e considering only Pipe as delimiter.

510|1012656696688|MR GARY GEORGE MR GARY GEORGE|IVY FARMKSILL COTTAGERSE|FREE RODWELL HOUSE|EAST WINCH ROAD|BLACKBOROUGH END|KING'S LYNN|||||PE32 1SF|EDF ENERGY 1 PRODUCT CANCELLAT|329 PORTLAND ROAD|HOVE, EAST SUSSEX|||||||BN3 5SU|

Thank in Advance.

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

Post by ray.wurlod »

Welcome aboard. What is the record delimiter character in the stage with which you are reading this file? If you don't want that to be the delimiter, change it to some character that does not appear in the data. Click on the Help key (or F1 key) for more information about options for entering this character's value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply