GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 28 of 158    Print  
What are the type of comp usage?

  
Total Answers and Comments: 2 Last Update: December 13, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 04, 2005 10:53:58   #1  
Gayathri        

RE: What are the type of comp usage?
COMP Usage is used for data items of numeric type. There are 4 types of COMP usage. 
1.COMP : Used only for integers.Either half word or full word . 
2.COMP -1 :Used for floating points.Internal representation is hexa decimal.full word is used.No PIC Clause . 
3.COMP -2 : Similar to COMP-1.Only difference is double word(8 bytes )is used 
4.COMP -3 :Interenal representation is decimal.Each character is assinged to half byte.The sign bit is assinged to right most bit. The no.of bytes required for n characters is (n/2) + 1 (rounding down)

 
Is this answer useful? Yes | No
December 13, 2006 09:35:38   #2  
V        

RE: What are the type of comp usage?

COMP - Half word - s9(01) to s9(04) takes 2 bytes for storage

Full Word - S9(05) to S9(08)  takes 4 bytes of storage

Double word S9(09) - s9(18) takes 8 bytes.


 
Is this answer useful? Yes | No

 Related Questions

Comp is a binary usage, while comp-3 indicates packed decimal. The other common usages are binary and display. Display is the default. 3/28/00 Dave Herrmann: 'I was reading your FAQ on Cobol, as 
Latest Answer : COMP Comp is used for Binary Representation it allows only S and 9 ... s9(01) to s9(04) it takes 2 bytes memory s9(05) to s9(09) it takes 4 bytes memory s9(10) to s9(18) it takes 8 bytes memory COMP-3 :- Comp-3 is used for Packed Decimal values it ...

Latest Answer : For all of you out who have not heard about comp-4. Wake up. Comp-4 does exist and it is just like comp - ie. it is a half-word (2 bytes).This might help those of you who are confused about comp fields:COMP     half word           ...

Latest Answer : COMP - Half word - s9(01) to s9(04) takes 2 bytes for storageFull Word - S9(05) to S9(08)  takes 4 bytes of storageDouble word S9(09) - s9(18) takes 8 bytes. ...

Latest Answer :  Hi,     ur question for comp and comp-3 storage    u have mentioned comp and assumed decimal v, for comp it is pure binary value and decimal is not allowed and storage formula is n/2 where n is number of 9's. For ...
Read Answers (6) | Asked by : Bharath

How to pass values from one jcl to another jcl, if how ? How to pass data from cobol to jcl? How to access jcl from cobol? How to display comp fields?
Read Answers (3) | Asked by : mohan

1) Is more than one record description is allowed in a FD?2) Is NUMERIC EDIT fields can be used for Arithmatic operations?3) Is COMPUTE P,Q,W = A+ B/C -E ** 2 is a valid statement?4) Is LINKAGE SECTION is mandatory in a sub program?5) In edit fiels the character used for check protection is __________6) COMP-2 occupies _________ bytes?7) Maximum length of a numeric item ________ ?

How data names with comp1 usage is stored in memory ? What is difference between comp1 comp2 , comp3 and binary ?
Read Answers (4) | Asked by : vanitha

Latest Answer : We  use comp field in cobol because when we want to store the data in binary form we use comp and the sign is placed in rightmost bit. c is used for +ve sign and d is used for -ve sign. ...

what is comp-3 and advantage with examples? 
Latest Answer : COMP-3 is a computational method used in COBOL. COMP-3 is represented in Packed Decimail format. Decimails are alloed to this COMP-3 Field. Each digit occupies 1/2 bite of memory, so this declaration is useful and it conserves the memory.Ex: 01 A  ...
Read Answers (1) | Asked by : raju_68

Consider the follwing snippet:01 WS-VAR USAGE IS INDEXIs this a valid working storage definition?Justify your answer 
Latest Answer : Hi,   This is not a Valid definition bcz the USAGE IS INDEX clause is used to provide an optimized table subscript. When a table is the target of a SEARCH statement it must have an associated index item.     Any item declared ...


 Sponsored Links

 
Related Articles

SOA Industry Usage

SOA Industry Usage First time usage of SOA tends to highlight the need for semantic interoperability While SOA provides framework for integration of cross Business operations with information flow in real time there is also a major semantic interoperability conflict that is not being addressed dir
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Industry Usage of VoiceXML

Wireless communications tools have a number of disadvantages, and some of these are small screens, weak processing power, and a lack of sufficient input abilities. It is these three factors that have greatly limited the scope of many wireless devices, and it is hoped that VoiceXML will remedy many
 

Mainframe Features

Mainframe Features In this Mainframe tutorial you will learn about features of Mainframe Processing power memory capacity performance computing multiple operating system time sharing reliability serviceability availability clustering technology and other features available in Mainframe mosgoogle cen
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

UML Industry Usage

UML Industry Usage Introduction UML is a very important programming language for those who work in either the software development or software engineering field UML is the program of choice for many software developers because it uses an object oriented approach and this is valuable for many contemp
 

CSS3 Links Creation and Usage

CSS3  Links Creation and Usage Links are very vital for any web page to navigate through the site and so is also with CSS3 In CSS3 it is possible to handle links even more powerful and effectively as it is possible to handle various states of links which are link visited hover and active s
 

Industry Usage of VoiceXML

Industry Usage of VoiceXML There are a number of uses for VoiceXML in the voice command industry The importance of VoiceXML comes from the fact that many people have been unhappy with the use of textual interfaces such as WAP and are looking for more powerful alternatives Wireless communications too
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape