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 / ramlal

before decimal point value stored in 9byted decimal point
does not occupy any space after decimal point total value
occupies only 1byte totally 9+0+1=10bytes.

Is This Answer Correct ?    4 Yes 6 No

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

Answer / vikash

we can declare.It will take total bytes based on formula=(n/2+1).

Thus, 9+9=18

Here n=18,

Thus number of bytes=18/2+1=10 bytes

Is This Answer Correct ?    1 Yes 3 No

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

Answer / madhu

20

Is This Answer Correct ?    5 Yes 29 No

Post New Answer

More COBOL Interview Questions

can we read records in a file from botom to top. if possible how can we read

12 Answers   ACS,


1.What is the default print format in cobol?

5 Answers   HSBC,


What is difference between static and dynamic call in cobol?

0 Answers  


What is the difference between CONTINUE & NEXT SENTENCE ?

2 Answers  


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

13 Answers   CTS,






WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH

2 Answers   Cap Gemini,


how to code in cobol while using variable block file?

1 Answers  


can anyone explain me the concept of COMP-4 PLEASE??

2 Answers  


should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,


If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....

1 Answers   HCL,


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,


I hav vari declaration like..... 77 a pic s9(9).99. 77 b pic s9(9).99 comp. 77 c pic s9(9).99 comp-3. if i use MOVE 123456789.99 to a,b,c what happen every one working fine ?

1 Answers   Mphasis,


Categories