can we declare s9(9)v9(9) in cobol ? if yes how many bytes
it will occupy ?(urgent plz answer it)

Answers were Sorted based on User's Feedback



can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / y@$w@nth

s9(9)v9(9)

Here v stands for assumed decimal point so it will occupy
only 18 bytes(9+9)...if instead of s9(9)v9(9) it is coded as
s9(9).9(9) then it is going to occupy 19 bytes ((9+9)+1)
the extra 1 byte for decimal point .........There is no way
of occupying 20 bytes storage.

Is This Answer Correct ?    47 Yes 5 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / jaganmohanreddy

ya we can code like this it will occupy 18 bytes only s9(9)
v9(9) v is for assumed decimal

Is This Answer Correct ?    17 Yes 1 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / adithya

it wil occupy 18 bytes

Is This Answer Correct ?    10 Yes 0 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / siddu reddy

yes, 18 bytes it will occupy. here v is assumed decimal
point,it doesn't occupy any space

Is This Answer Correct ?    7 Yes 0 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / sruthikarnti

thanks in advance

Is This Answer Correct ?    5 Yes 2 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / ramesh.p

yes, we can declare it.it is a display usage.it will occupy one byte for each character so,there are 18 characters there (9+9) .so it will occupy 18 bytes...

Is This Answer Correct ?    2 Yes 0 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / sruthi

thanks ....

Is This Answer Correct ?    2 Yes 1 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / rajagopal

For the above question the answer is 19.Because sign is
allocated automatically and in cobol user defined value
should not exceed 18.so it'll take 19bytes including sign
without giving any error.but if you give
s9(9).9(9),definitely it'll give error because it's user
defined length is 19 and with sign it'll take 20 bytes and
it'll definitely throw an error.Anyway if you give
parm.cobol=arith(extend) in compile JCL both the above cases
will work.

Is This Answer Correct ?    6 Yes 5 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / paddu

Yes,we can declare.s9(9)v9(9) will occupy 18 bytes. the
maximum bytes are in any comp field item is 18bytes.

Is This Answer Correct ?    1 Yes 1 No

can we declare s9(9)v9(9) in cobol ? if yes how many bytes it will occupy ?(urgent plz answer it)..

Answer / karthik

NO IT CANNOT BE. THE MAXIMUM ALLOWED DIGITS IS 18 ONLY

Is This Answer Correct ?    8 Yes 10 No

Post New Answer

More COBOL Interview Questions

In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


What is a subscript ?

3 Answers  


01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,


What is the difference between perform … with test after and perform … with test before?

0 Answers  


How do you do in-line PERFORM?

4 Answers   Accenture,






Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

0 Answers   iNautix,


What are differences between Static Call and Dynamic Call?

10 Answers   IBM, KBC, Keane India Ltd, Verizon,


How is sign stored in Packed Decimal fields and Zoned Decimal fields?

6 Answers   ABC, HCL, TCS,


what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?

3 Answers   TCS,


What is the difference between a DYNAMIC and STATIC call in COBOL?

2 Answers  


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

3 Answers   TCS,


Categories