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

Problem with S9(18) Comp field


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

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Fri Dec 07, 2012 11:23 am
Reply with quote

I have defined a field with S9(18) Comp field in which data is stored as X'01B69B4BA630F34E' which in decimal has value 123,456,789,012,345,678 but when I am doing a edited display using edit pattern BZZZZ,ZZZ,ZZZ,ZZZ,ZZZ,ZZZ its truncating 2 rightmost bytes and displaying 1,234,567,890,123,456.

Am I doing something wrong here? Please help me in this.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Dec 07, 2012 11:40 am
Reply with quote

Can you paste the code and its output using code tags??
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Dec 07, 2012 12:52 pm
Reply with quote

did You try with ARITH(EXTENDED) ?
when working with borderline values it is better to be safe than sorry
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Dec 07, 2012 1:27 pm
Reply with quote

enrico, it is even over the border.

abhay pratap singh,

You have specified 19 digit positions in your edited field. To do that you should compile with ARITH(EXTEND). However, if that was a mistake, chop the leading Z entirely or make it into a second B.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
Search our Forums:

Back to Top