Reading through the delimter 000

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bala_135
Premium Member
Premium Member
Posts: 156
Joined: Fri Oct 28, 2005 1:00 am
Location: Melbourne,Australia

Reading through the delimter 000

Post by bala_135 »

Hi,

I have a file in the below mentioned format.
UHDR1
1234567890 AB1CD12345 ABCDEFGH ABC@ABC.COM
UTRL1

Since the Header and Tralier Format is going to be the same for all the files,I am creating a template job to remove the Header and Tralier.

Below is the design
1.Read all the records as a row using the datatype as Varchar(8000)
2.Using the following formats(000 as delimter and 000 as quote character).As some files also contain datas which has ,.* etc
3.Read the trmmed file as a fixed width file with appropriate metadata.
4.For the above mentioned file alone it is not able to read the entire record.

To be precise it is able to read till
1234567890 AB1CD12345 ABCDEFGH

then it throws the warning(view data
)
ext_trim_Header_trailer_mlol_consent..Seq_Input.InFrmSeq: read_delimited() - row 1, too many columns in record

If I use other delimiter it is able to read it.
My speculation is some NULL character is appearing in the file after that part of the record.Kindly let me know if my speculation is right.
Also suggest me some delimter which is hard to come by in the file(I have changed it to ^).

Thanks in advance.

Regards,
Bala.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Either use a delimiter that won't be found (and you need to determine it) or enable the Suppress row truncation warnings option if you believe that the found delimiter comes after all your data.
-craig

"You can never have too many knives" -- Logan Nine Fingers
bala_135
Premium Member
Premium Member
Posts: 156
Joined: Fri Oct 28, 2005 1:00 am
Location: Melbourne,Australia

Post by bala_135 »

Hi,

Thanks Craig.
I cant enable the supress row truncations as data is not read fully.

I have used some of the delimters(144 or 161) suggested in the below link.These are very rare to come from the source.
No worries my data is Engish not french
http://www.asciitable.com/

Out my curiosity where can we find the allowable delimiters for datastage.Because not all extended ascii values are working(eg :128 throws error.


Thanks once again.

Regards,
Bala.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

128 throws what kind of error? At runtime or compile time?
-craig

"You can never have too many knives" -- Logan Nine Fingers
bala_135
Premium Member
Premium Member
Posts: 156
Joined: Fri Oct 28, 2005 1:00 am
Location: Melbourne,Australia

Post by bala_135 »

Hi,
Its compile time.During view data itself its not accepting.

Error calling subroutine: DSD.Browse (Action=3); check DataStage is set up correctly in project Test

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

Post by ray.wurlod »

128 is the internal representation of NULL. Avoid it as a delimiter!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... I thought that was '000'. Avoid! Avoid!

(Funny, but I heard your advice in a Dalek voice in my head)
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply