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

Difference between comp,comp-1,comp-2, with eg


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pradeep

New User


Joined: 31 Jan 2004
Posts: 10
Location: Surandai,India

PostPosted: Tue Feb 03, 2004 3:59 pm
Reply with quote

Please give the differences among

comp

comp-1

comp-2


syntax, usage, memory alloc

* in detail
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Tue Feb 03, 2004 6:30 pm
Reply with quote

Hello pradeep,

look at the following link

www.cis.scu.edu.tw/oproom/doc/acucobol/docs/comprun/gt400419.htm

Hope this helps

Regards

Mayuresh Tendulkar
Back to top
View user's profile Send private message
suresh_u

New User


Joined: 31 Jan 2004
Posts: 8

PostPosted: Wed Feb 04, 2004 4:18 pm
Reply with quote

Hi,
COMP can occupy from 2 bytes to 8 bytes.
For example,
S9(1-4) COMP will occupy 2 bytes.
S9(5-9) COMP will occupy 4 bytes.
S9(10-18) COMP will occupy 8 bytes.
Normally COMP is used for subscripts in tables.

COMP-1 will occupy 4 bytes - single precision
COMP-2 will occupy 8 bytes . double precision
COMP-1,COMP-2 are used in calculations with floating type variables with precision required.

Thanks
suresh
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top