MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting COMP-5 to character in COBOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
coolguy
Beginner


Joined: 01 Dec 2004
Posts: 82
Topics: 28

PostPosted: Wed Oct 19, 2005 1:16 am    Post subject: Converting COMP-5 to character in COBOL Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Oct 19, 2005 4:21 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Oct 19, 2005 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Crox
Beginner


Joined: 29 May 2004
Posts: 52
Topics: 9

PostPosted: Wed Oct 19, 2005 4:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group