comp-3 field occupy?

Answer Posted / swamy

Comp-3 fields occupy (n+1)/2 spaces , 1 being the sign

eg: Pic S9(7) COMP-3. Byte size = (7+1)/2 = 4
Pic S9(5)V99 COMP-3. Byte size = (5+2+1)/2 = 4

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2087


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1796


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

701


how to move the records from file to array table. give with code example

2209


Write a program to explain size error.

667






Give some examples of command terminators?

749


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

632


How do define dynamic array in cobol.

663


Discuss about changing dataset name in proc.

757


Why would you use find and get rather than to obtain?

673


how can i see junk values in dclgen or in hostvariable of comp ?

2532


What are declaratives and what are their uses in cobol?

701


IF I mention stop run in CICS what happens?

1886


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1919


What is length is cobol?

639