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: 1534
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: 10231
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: 7306

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 Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm


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