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: 10256
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: 7315

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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
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


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