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
 

 

Problem with S9(18) Comp field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Problem with S9(18) Comp field
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

Moderator


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

PostPosted: Fri Dec 07, 2012 11:40 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Fri Dec 07, 2012 12:52 pm    Post subject: Reply to: Problem with S9(18) Comp field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Fri Dec 07, 2012 1:27 pm    Post subject: Reply to: Problem with S9(18) Comp field
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    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 INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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