热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

Chapter 5

MOVE, Arithmetic, Numeric Computation, and Business Logic Basics

Perform calculations and data movement in COBOL using the operations that drive many business-processing programs.

Inside this chapter

  1. MOVE Statement
  2. Arithmetic Statements
  3. COMPUTE
  4. Business Accuracy Matters
  5. Practical Example

Series navigation

Study the chapters in order for the clearest path from COBOL basics to enterprise batch processing, operational context, and modernization strategy. Use the navigation at the bottom to move smoothly through the full tutorial series.

Tutorial Home

Chapter 5

MOVE Statement

MOVE 100 TO MONTHLY-SALARY.
MOVE CUSTOMER-NAME TO REPORT-NAME.

MOVE is one of the most common COBOL statements because programs frequently transform, copy, and route data between working storage, input records, and output structures.

Chapter 5

Arithmetic Statements

ADD TAX-AMOUNT TO TOTAL-AMOUNT.
SUBTRACT DISCOUNT FROM INVOICE-TOTAL.
MULTIPLY HOURS BY RATE GIVING PAY-AMOUNT.
DIVIDE TOTAL-BONUS BY EMPLOYEE-COUNT GIVING BONUS-PER-EMPLOYEE.

These operations appear constantly in payroll, billing, accounting, and report generation programs.

Chapter 5

COMPUTE

COMPUTE NET-AMOUNT = GROSS-AMOUNT - TAX-AMOUNT - DEDUCTION-AMOUNT.

COMPUTE supports more expressive formulas and is often easier to read for multi-part calculations.

Chapter 5

Business Accuracy Matters

In COBOL systems, arithmetic is not just academic. It may determine salaries, pension amounts, loan balances, premium calculations, or tax totals. Small logic mistakes can have real financial consequences, so calculations must be designed carefully.

Chapter 5

Practical Example

A payroll program may move employee data from an input record into working storage, compute gross and net pay, and write the results into an output record for downstream reporting. That kind of flow is classic COBOL programming.

版权所有 © 2026,WithoutBook。