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
Answers were Sorted based on User's Feedback
Answer / mr.perfect
ADD A B TO C. (Means (A+B)+C moved in C)
ADD 40 X TO X
Value of X is 10
So, ADD 40 10 TO 10 (Gives 40+10+10 = 60)
Now, COMPUTE X = 3 * X - 40
Here , order of preference is - then * will come
so, it will calculate first X-40 = 60-40 =20
THEN, 3*20 == 60
Means X = 3 * 60 - 40 ==20
So answer is : 60
| Is This Answer Correct ? | 0 Yes | 2 No |
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
how do you reference the rrds file formats from cobol programs
How do pass the values to the parameters in cobol
What is difference between static and dynamic call in cobol?
u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?
I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?
What is the difference between external and global variables in COBOL?
Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???
What is amode(24)?
should I use Go back in the main program ? Yes we can use Go back in main program as well.
What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc