IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Precautions while handling the Negative Signed Integer


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dilipbiradar

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 12:54 pm
Reply with quote

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

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Thu Aug 06, 2009 1:10 pm
Reply with quote

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

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 1:21 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 06, 2009 1:41 pm
Reply with quote

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

New User


Joined: 12 Jan 2007
Posts: 18
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 1:50 pm
Reply with quote

Thanks for Judging me sir !!
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Aug 06, 2009 7:52 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 07, 2009 2:19 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts File Handling COBOL Programming 9
No new posts Handling the numeric data in unstring... COBOL Programming 18
No new posts SORT for dynamic trailer record + CSV... DFSORT/ICETOOL 14
No new posts Negative dependency between jobs in m... COBOL Programming 12
Search our Forums:

Back to Top