View previous topic :: View next topic |
Author |
Message |
coolguy Beginner
Joined: 01 Dec 2004 Posts: 82 Topics: 28
|
Posted: Wed Oct 19, 2005 1:16 am Post subject: Converting COMP-5 to character in COBOL |
|
|
we are trying to convert an image copy of a DB2 database into character format as part of a COBOL program. The image copy input has numeric data in COMP-5 format and we are unfamiliar with this. Is there any special logic necessary to convert or unpack this data into charater format? Thanks for any feedback. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Wed Oct 19, 2005 4:21 am Post subject: |
|
|
coolguy,
comp-5 is nothing but Binary data ala COMP. So there is no special logic involved to unpack these.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Wed Oct 19, 2005 5:41 am Post subject: |
|
|
More information on COMP-5
Native binary (COMP-5) items
COMP-5 _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Wed Oct 19, 2005 4:06 pm Post subject: |
|
|
There is a risk if you are going to convert it for example from ascii to ebcdic or the other way around. Specify your numeric fields with a picture S9(..) SIGN LEADING SEPERATE. In this way, conversions will work ok. |
|
Back to top |
|
|
|
|