problem 1: Compute the given expressions, if the data items are describeed in the WORKING-STORAGE section as:
77 A PIC S7(2).
77 B PIC 7(3)V99.
Expressions are:
a) COMPUTE A = 9 + 5.
b) COMPUTE A = 5.3 / 2.0 – 1.0.
problem 2: Determine the incorrect statement and give reasons for being faulty.
a) COMPUTE A= 3*X + Z ROUNDED.
b) COMPUTE X, Y ROUNDED = 2 * A – C/D.
c) COMPUTE X = L- M + K/N.
d) SUBTRACT X FROM 245, B.
e) SUBTRACT X, Y FROM P, L GIVING M, N.
f) MULTIPLY C BY 35.
g) MULTIPLY -8.5 BY A.
h) DIVIDE A INTO 5.
i) DIVIDE C BY D GIVINIG L, M.
problem 3: What are various types of arithmetic verbs in COBOL? Give their syntax and describe with illustrations.
problem 4: Describe the different kinds of options which can be used with the arithmetic verbs.
problem 5: What is the main purpose of MOVE verb? Describe elementary and group move of data with illustrations.