← BYTES
COBOL·Starter·Ref: 21.1.14

What does the COMPUTE statement do?

Have a question about this video? Mention reference 21.1.14 when you contact us.

a.Declares a file's record length
b.Reads input from the terminal
c.Evaluates an arithmetic expression and stores the result in a target field
d.Starts a new division
COMPUTE lets you write a full arithmetic expression (e.g. COMPUTE TOTAL = PRICE * QTY + TAX) in one statement rather than chaining separate ADD/MULTIPLY verbs.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES21114#COBOL