Trying to convert Dacimal to Packed Decimal
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 71
- Joined: Mon Nov 13, 2006 12:40 am
Trying to convert Dacimal to Packed Decimal
Hi Everyone,
I am trying to convert decimal of 5,2 and 4,0 to packed decimal.
If anybody has the solution ,Can you please shere with me.
Thank in advance
Ashik
I am trying to convert decimal of 5,2 and 4,0 to packed decimal.
If anybody has the solution ,Can you please shere with me.
Thank in advance
Ashik
Two options are either output to a CFF stage and make DataStage do the conversion for you or use the sdk builtin routine "DataTypePicComp3Unsigned" to explicitly convert that value to the binary representation.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 71
- Joined: Mon Nov 13, 2006 12:40 am
i am trying to use the routine "DataTypePicComp3Unsigned" But the problem i am facing is i have four columnsArndW wrote:Two options are either output to a CFF stage and make DataStage do the conversion for you or use the sdk builtin routine "DataTypePicComp3Unsigned" to explicitly convert that value to the binary representation.
colA colB colC colD
4,2 5,0 7,0 9,3
Input value
1254.12 for ColA
14528 for ColB
7485962 for ColC
987456321.123 ColD
But after using the above function i am getting some values are like
0 for ColA
313435323 for ColB
37343835 for ColC
0 for ColD
But when i am using "DataTypePicComp3UnsignedFast"
The output value i am getting is
1254.12 for ColA
313435323 for ColB
37343835 for ColC
987456321 ColD
Can any body Help me regarding the same.
Thanks in Advance
Ashik
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
Just a couple of clarifications:
1. the CFF stage cannot be used as a target in the Server edition - it does not support input links.
2. you can write a packed decimal using the sequential file stage, but it will involve a DS Transform call or a routine. I've done it before but I don't have the code with me right now. I think it involved a "MD" conversion - look at the document Basic.pdf.
John
1. the CFF stage cannot be used as a target in the Server edition - it does not support input links.
2. you can write a packed decimal using the sequential file stage, but it will involve a DS Transform call or a routine. I've done it before but I don't have the code with me right now. I think it involved a "MD" conversion - look at the document Basic.pdf.
John
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
-
- Premium Member
- Posts: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: