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

 Print  |  
Question:  comp-3

Answer: what is comp-3 and advantage with examples?


June 06, 2008 07:44:03 #1
 shaikmf   Member Since: June 2008    Total Comments: 2 

RE: comp-3
 
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  PIC  S9(5) COMP-3

A will occupy 5/2+1/2(Sign) =3 Bytes of memory. other than the boundary values(4,9,18) COMP-3 will conserve the memory space.
     

 

Back To Question