Compress Functionality..help needed

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
amitaguptain
Participant
Posts: 12
Joined: Wed Oct 19, 2005 5:29 am

Compress Functionality..help needed

Post by amitaguptain »

Hi,

I have feild in datastage with datatype decimal(9,3) and the values atre like
000000.000
000002.000
000003.100
We want to get rid of these laeding and trailing Zeroes.and the final output we want as
0
2
3.1
Can You tell which function to use or how to achieve this??


thanks in Advance,
Amita
amie
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Depends on what your output stage is. If seq. file is where you are writing your data, represent the same column as Real(9,3).
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
amitaguptain
Participant
Posts: 12
Joined: Wed Oct 19, 2005 5:29 am

Post by amitaguptain »

JoshGeorge wrote:Depends on what your output stage is. If seq. file is where you are writing your data, represent the same column as Real(9,3).

After using this approach,when we view the file in unix,it shows the output in Xponent form.which we dont want
amie
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

If you 'all' want something specific, pls. post your requirement also in detail. In which stage you want to convert, if you want this in the output are you writing this into a seq. stage as .txt?
which we dont want
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
amitaguptain
Participant
Posts: 12
Joined: Wed Oct 19, 2005 5:29 am

Post by amitaguptain »

Yes we are writting our output in the Seq Stage at .txt file.
In DataStage if we do view data it shows output as expected but if we go to unix and view the same file,it is in the exponent form.
Even in unix can we get the recods in the expected format??
amie
Ultramundane
Participant
Posts: 407
Joined: Mon Jun 27, 2005 8:54 am
Location: Walker, Michigan
Contact:

Post by Ultramundane »

amitaguptain wrote: Even in unix can we get the recods in the expected format??
We? I can do it, but I don't know if this is the best way.

Send your output to an external target stage and use the program awk and multiply by the identity in base 10.
Post Reply