Issues when sending attchments through datastage email

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Issues when sending attchments through datastage email

Post by Marley777 »

We are trying to use the Datastage email activity stage to send an attachment. The data looks fine if we email the attachment ourselves outside of datastage...however if we ask datastage to send the attachment it changes the record format when it encounters a }

all records that do not have a } are fine...so only records with the } somewhere in the data will encounter issues.

Anyone know why Datastage would not like } in the data when sending an attachment?

This
0000000000000000010677468791H01092138110812708802947000080}

should be
0000000000000000000000000000000010677
468791H01092138110812708802947000080}

A new record should start at 468791H01...but it puts it all on one line. So when it encounters a } the line will go past the end of the record before it starts a new line....it's as if } becomes the new line...if that makes any sense

Anyone know why Datastage would not like } in the data when sending an attachment?
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Are you sending a file as an attachment or are you imbedding the data into the email body?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Are you creating the attachment as a "DOS file"?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

We are sending a sequential txt file as an attachment.
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

We are sending the sequential file as an attachment. File looks great until we try to use DataStage and send the file as an attachment...it is then that the data appears off...seems to be wherever a row contains a }

any help is greatly appreciated.
Last edited by Marley777 on Thu Nov 16, 2017 1:10 pm, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Answer my question, please.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Post by sriven786 »

looks like the file is created in Unix and when run unix2dos and then attach, file is coming properly. Try doing unix2dos and test it.

Please check similar post below

viewtopic.php?p=418450
Venkata Srini
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Sorry chulett for the delay...
not sure how to tell if it's a DOS file or not. We create the file using datastage on a unix server...is that considered DOS
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Post by sriven786 »

try creating the File with Record Level Delimiter as : DOS Format and try sending as email attachment. (Format Tab: Record Level Right Click and Format as Dos line terminator)
Venkata Srini
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

Thanks sriven786....it works now. I will mark this post resolved.
sriven786
Participant
Posts: 37
Joined: Wed Nov 08, 2017 1:36 pm

Post by sriven786 »

Thanks to chulett as it's already known issue :)
Venkata Srini
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right... you are sending it to a Windows system so it only makes sense to create the file as a "DOS" file so it knows how to read it. :wink:
-craig

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