how many bytes does s9(7)COMP-3 field occupies?

Answers were Sorted based on User's Feedback



how many bytes does s9(7)COMP-3 field occupies?..

Answer / sdexcellent@yahoo.co.in

4 bytes.

Is This Answer Correct ?    29 Yes 0 No

how many bytes does s9(7)COMP-3 field occupies?..

Answer / kiran

it uses (n+1)/2 formula. s0 (7+1)/2 =4 bytes.

Is This Answer Correct ?    23 Yes 2 No

how many bytes does s9(7)COMP-3 field occupies?..

Answer / sekhar

s9(7)COMP-3
s occupius 1/2 bytes so 1/2+1/2(extra)=1 byte

1+7=8comp3
4 bytes

Is This Answer Correct ?    9 Yes 2 No

how many bytes does s9(7)COMP-3 field occupies?..

Answer / kavya

int(n/2)+1 here n=7 ,so 4 bytes will take

Is This Answer Correct ?    6 Yes 0 No

how many bytes does s9(7)COMP-3 field occupies?..

Answer / bhaskar r

4byets

Is This Answer Correct ?    5 Yes 1 No

how many bytes does s9(7)COMP-3 field occupies?..

Answer / vijayamala

s9(7)comp3

n=7 , (n+1)/2 = (7+1)/2 = 4.

4 bytes will be allocated for this numeric data item.

since comp3 is a packed decimal representation, each byte
can hold 2 data items. which means it 4 bytes can occupy 8
items. In which last item is left for sign digit. So
s9(4)comp3 will have 4bytes allocated & can hold 7 data
item and 1 sign digit in it.

Is This Answer Correct ?    5 Yes 1 No

Post New Answer

More COBOL Interview Questions

what is ASRA, AEY9?

2 Answers   IBM,


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


How to execute a set of JCL statements from a COBOL program?

2 Answers   Patni, Syntel,


01 a pic 9(3) value is 123 01 b pic 9(6) move a to b wht will be the value ? and 01 a pic x(6) value is abc 01 b pic x(3) move a to b wht will be the value ?

7 Answers   Patni,


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,






What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


What divisions, sections and paragraphs are mandatory for a COBOL program?

8 Answers   Arigo Infotech,


how do you reference the ksds vsam file formats from cobol programs

0 Answers  


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

0 Answers  


hi. This is Ram.i have one doubt.why can't we display comp-3 variables directly? let me answer quickly plez........

1 Answers  


wirte a pgm in using files in which we hav 10 ,20,30 40...100 records in inputfile and i want them to be send to outputfile in reverse order. PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

5 Answers   iGate,


How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,


Categories