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 |
I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?
Under which scenario you would go for a static call as opposed to dynamic call?
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........
What is Control Break processing ?
consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.
Can the OCCURS clause be at the 01 level?
How you can read the file from bottom?
Can we put move statement in COBOL copybook
What is different between variable length and fixed length?
What is the local-storage section?
Extract only those records from a PS file which are having word 'TEXT' in the records using COBOL? The word TEXT is not present in a particular position in all the records.