View previous topic :: View next topic
|
Author |
Message |
Dinesh Mani
New User
Joined: 29 Nov 2019 Posts: 5 Location: India
|
|
|
|
Hi,
I am trying to unload a db2 column value using DSNTIAUL utility which is Packed decimal format . I want the output to be in the zoned decimal format.
I tried using zoned (column _name) which threw an error.
Can you please help me with the function which could be used to achieve the requirement
Thanks |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Dinesh Mani wrote: |
I want the output to be in the zoned decimal format.
I tried using zoned (column _name) which threw an error. |
1) There is no such function, or whatever, named ZONED, neither in DB2, nor in 100+ other tools/languages/environments I ever dealt with.
2) In order to convert decimal to character/printable format, there is function CHAR supported in DB2, and many other places.
3) What exactly is the need to convert to Zoned Decimal? Are you sure? Do you know exactly what the Zoned Decimal format is, and how to use it? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Look for CAST or VARCHAR_FORMAT |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
I use DIGITS() |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Neither sign nor decimal point appear in the result when DIGITS is used. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Rohit Umarjikar wrote: |
Neither sign nor decimal point appear in the result when DIGITS is used. |
For me that is a feature rather than a problem. For pretty output I use QMF. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
don.leahy wrote: |
Rohit Umarjikar wrote: |
Neither sign nor decimal point appear in the result when DIGITS is used. |
For me that is a feature rather than a problem. For pretty output I use QMF. |
absolutely but that is not the solution in this context. Thanks |
|
Back to top |
|
|
|