View previous topic :: View next topic
|
Author |
Message |
SHAILESH OZA
New User
Joined: 10 Jun 2005 Posts: 21 Location: Mumbai
|
|
|
|
am trying to Unload the data from DB2 table to Flat File using Unload Utility. While doing the Unload, I need to convert a field from binary data type from DB2 to Numeric value corresponding cobol Clause.
I tried to use the Cast Function like CAST(Field name) As Interger and CAST(Field name) As decimal (4,0) But I am getting the low value
Is there any way to get the result as a numeric
I might have less knowledge about db2 but its a requirement for me |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
This should be easy enough to accomplish in COBOL, unless the binary-field (for whatever reason) is of an unsupported length that COBOL can't handle. How many bytes is the binary-field and what's its maximum value (please post value in hex).
When you say NUMERIC, does the binary-field need to be converted to Packed-Decimal or Display-Numeric?
What have you tried?
Mr. Bill |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
SHAILESH OZA wrote: |
am trying to Unload the data from DB2 table to Flat File using Unload Utility. While doing the Unload, I need to convert a field from binary data type from DB2 to Numeric value corresponding cobol Clause.
I tried to use the Cast Function like CAST(Field name) As Interger and CAST(Field name) As decimal (4,0) But I am getting the low value
Is there any way to get the result as a numeric
I might have less knowledge about db2 but its a requirement for me |
Despite a presumed 6½ years in IT (as evinced by your join date) and a claim to DB2 in your profile skillset, you pretty conclusively proved in this thread -- where you asked virtually the same question -- that you don't know what you're talking about. Don't you think that it's time to get out of the field? |
|
Back to top |
|
|
|