Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Difference between comp,comp-1,comp-2, with eg

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions
Author Message
pradeep

New User


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

PostPosted: Tue Feb 03, 2004 3:59 pm    Post subject: Difference between comp,comp-1,comp-2, with eg
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
References
PostPosted: Tue Feb 03, 2004 3:59 pm    Post subject: Re: Difference between comp,comp-1,comp-2, with eg Reply with quote

mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 257
Location: USA

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

Hello pradeep,

look at the following link

http://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    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions All times are GMT + 6 Hours
Page 1 of 1