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

in the TIME parameter we r giving hours r minutes

4 Answers   IBM,


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...

2 Answers   ITC Indian Tobacco Company, PNP, TCS,


how to convert the recors form vsam file to db2 table tru file aid

0 Answers   TCS,


how to transfer the file from pc to mainframe??

5 Answers   TCS,


Write the syntax of a two dimensional array?

8 Answers   Honeywell, Xansa,






Write the code to count the sum of n natural numbers.

0 Answers  


where will u code file status ?

2 Answers   TCS,


I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.

3 Answers   IBM,


Why occurs can not be used in 01 level ?

2 Answers   TCS,


How do pass the values to the parameters in cobol

2 Answers  


hi dudes.....can any one help me..... what is SET TO TRUE all about,anyway?

1 Answers  


what is soc7 abend?how u can trace it?

4 Answers   Accenture,


Categories