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

Difference between S9(6) COMP3 and s9(7) comp3


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
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
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Wed Oct 06, 2010 10:46 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
No new posts Difference between CEE3250C and CEE3204S COBOL Programming 2
Search our Forums:

Back to Top