Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Difference between S9(6) COMP3 and s9(7) comp3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
SrikanthMaddileti

New User


Joined: 18 Mar 2008
Posts: 2
Location: Chennai

PostPosted: Wed Oct 06, 2010 10:35 pm    Post subject: Difference between S9(6) COMP3 and s9(7) comp3
Reply with quote

Hi all

Could anyone please tell me the exact difference between
S9(6) COMP3 and S9(7) comp3 since both of them would occupy a memory of 4 bytes ?

awaiting ur response. thanks
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 06, 2010 10:46 pm    Post subject: Reply to: Difference between S9(6) COMP3 and s9(7) comp3
Reply with quote

With PIC S9(06) COMP-3, you don't have addressability to the high-order nibble, whereas, you do with S9(07) COMP-3. So, you can move 1234567 to the PIC S9(07) COMP-3 field and it will be retained as-is, however, if you move this same value to the PIC S9(06) COMP-3 field, the value will be 234567, truncating the high-order 1.

Plus, the compiler needs to go through a few extra instructions to accommodate PIC S9(06) COMP-3, always rendering the high-order nibble with a B'0000'/4-Bit X'0'.

IMHO, other than PIC S9(18) COMP-3, the picture clause, without an implied decimal, should always be an odd number.

Why limit a field's maximum-capacity when it occupies the same amount of storage?

Bill
Back to top
View user's profile Send private message
SrikanthMaddileti

New User


Joined: 18 Mar 2008
Posts: 2
Location: Chennai

PostPosted: Wed Oct 06, 2010 11:19 pm    Post subject: THANK U
Reply with quote

thanks a lot Bill !!!!!
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISMF Difference between volume count ... upendrasri IBM Tools 2 Tue Dec 05, 2017 12:40 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us