If i have a variable
A pic 9(2) value 10
Compute A = a - 100

what will be the value of A and will there be any error
becoz of the Negative value

Answers were Sorted based on User's Feedback



If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and w..

Answer / chandrakant sinha

90 will be the output
No error will be generated.

Is This Answer Correct ?    10 Yes 2 No

If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and w..

Answer / garry

From above you will get answer as :

90 (without any sign'-').

If you Code S9(02).
Result : 9} (-90)
To get -90 properly, use SIGN is Leading or trailing.

Any difference, please write at : thespider390@hotmail.com

Is This Answer Correct ?    1 Yes 0 No

If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and w..

Answer / kiran

90 ill come "-" sign wont come bcoze we didnt mention A as a
signed variable

ex

A pic s9(2)

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

01 b pic +9(4) How many bytes it will take for storage???

2 Answers  


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


What are the different open modes available in cobol?

1 Answers  


How do you submit JCL via a Cobol program?

5 Answers   IBM,


what is the difference between Normal vaiable and comp variable.

5 Answers   DELL,


What is the difference between goback, stop run and exit program in cobol?

1 Answers  


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


which one is the best of com and com-3.using of real time ?

7 Answers   Cap Gemini,


what is record label is empty or standard in file description of data division?

2 Answers   HCL,


Can printer files (having 133 characters) be of variable length?

3 Answers  


What R 2 of the common forms of the EVALUATE STATEMENT ?

1 Answers   Cap Gemini,


What is the difference between SEARCH and SEARCH ALL?

6 Answers   Cognizant,


Categories