Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Precautions while handling the Negative Signed Integer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dilipbiradar

New User


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

PostPosted: Thu Aug 06, 2009 12:54 pm    Post subject: Precautions while handling the Negative Signed Integer
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    Post subject:
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: 19
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 1:21 pm    Post subject: How many fields are there ???
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: 6968
Location: porcelain throne

PostPosted: Thu Aug 06, 2009 1:41 pm    Post subject:
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: 19
Location: Pune (India)

PostPosted: Thu Aug 06, 2009 1:50 pm    Post subject: Reply to: Precautions while handling the Negative Signed Int
Reply with quote

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

Site Director


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

PostPosted: Thu Aug 06, 2009 7:52 pm    Post subject:
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: 8118
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 07, 2009 2:19 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ON ERROR handling soundarr PL/I & Assembler 2 Wed May 11, 2016 3:37 am
No new posts SIGNED DECIMAL TO COMP-3 using cobol ... ram_vizag COBOL Programming 1 Tue Mar 01, 2016 11:32 pm
No new posts Exception Handling in Native Stored P... Mariraj DB2 1 Thu Feb 25, 2016 4:08 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us