Consider the following COBOL entries
05 X PIC 99 VALUE 10.
ADD 40 X TO X.
COMPUTE X = 3 * X - 40.
The result in X is
Answer Posted / muhammad abdul aleem
I doubt if 05 level number will work or not.
But if it works the here is the answer.
Add 40,x to x means X = 10 + 40 + 10 =60
then
x = 60*3 -40
x=180-40
= 140
Since X = 99 so value will be 40
Therefore, Value of X will be 40...
| Is This Answer Correct ? | 26 Yes | 0 No |
Post New Answer View All Answers
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
what is amode(24), amode(31), rmode(24) and rmode(any)?
Can we change the password using ALTER? anyone tried and changed?
What are the various section in data division and briefly explain them.
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
how do you reference the fixed unblock file formats from cobol programs
What is the difference between goback, stop run and exit program in cobol?
In COBOL programming, what is PERFORM? What is VARYING?
Explain how to differentiate call by context by comparing it to other calls?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
explain sorting techniques in cobol program?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
how do you define single dimensional array and multidimensional array in your cobol?
What is the LINKAGE SECTION used in COBOL?