View previous topic :: View next topic
|
Author |
Message |
dilipbiradar
New User
Joined: 12 Jan 2007 Posts: 18 Location: Pune (India)
|
|
|
|
Hi,
I am moving the Signed Integer value to Signed Packed Integer (COMP-3) field.
The results are correct, but whenever the Signed Integer contains the Negative Value, the other field contains the Alphabets like A, B, C.
Please advice on the precautionary mesaures to be taken care while handling the Negative Signed Integer.
Many Thanks
Dilip S Biradar
Capgemini India Pune. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Dilip,
Quote: |
the other field contains the Alphabets like A, B, C |
Which other fields ? Could you please be more specific so that we will understand u better.
Quote: |
Please advice on the precautionary mesaures to be taken care while handling the Negative Signed Integer |
Precaution from what ? |
|
Back to top |
|
|
dilipbiradar
New User
Joined: 12 Jan 2007 Posts: 18 Location: Pune (India)
|
|
|
|
There are only two fields
Signed Integer and Signed Packed Integer
When I talk about Signed Integer, which one is the other field? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
dilipbiradar,
suggest you spend some time reading the manual and learning how data is stored in packed-decimal datatypes.
and your attitude sucks.
your question reeks of 'novice-icity': - lack of familiarity with your environment
- to lazy to search these forums and read the manuals
and Signed Integer is not a cobol datatype. |
|
Back to top |
|
|
dilipbiradar
New User
Joined: 12 Jan 2007 Posts: 18 Location: Pune (India)
|
|
|
|
Thanks for Judging me sir !! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you are looking for help, suggest you post some of your "input" data and your "output" (both in hex) and your doubt about what you have or what to do with it. Also post the field definitions for these from the cobol code.
Someone will be able to clarify. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I am moving the Signed Integer value to Signed Packed Integer (COMP-3) field. |
You certainly don't help your cause with statements like this. When you use non-standard terminology, someone has to take the time and effort to figure out what you really meant -- time and effort that would not be required if you had used standard terminology in the first place. And since the manuals link at the top of the page includes the COBOL Language Reference and Programming Guide manuals, there is no excuse for you not using proper terminology.
So when you say "Signed Integer" do you mean USAGE DISPLAY or USAGE COMP data? They use very different bit patterns to represent the same value and hence the conversions to packed decimal are not always the same. Such a question as yours can also be affected by compiler options such as TRUNC and ARITH. |
|
Back to top |
|
|
|