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 / rama krishna
Answer is again 10.
Add 40 to x :
x + 40 : 10 + 40 = 50
X = 3*X - 40
3 * x = 50 * 3 = 150, but since x declared as PIC 99, 1
will be truncated from 150. so now the value of x would be
50. so 50 - 40 is again 10.
| Is This Answer Correct ? | 22 Yes | 6 No |
Post New Answer View All Answers
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
Whats the difference between search & search ALL?
Can a Search can be done on a table with or without Index?
What are the pertinent COBOL
What do you understand by psb and acb?
State the various causes of s0c1, s0c5 and s0c7.
Difference between array and sub-script ?
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.
What are literals?
What are the pertinent COBOL commands?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
How to remove 2 duplicate records and copy only one using job control language?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?