Compaq COBOL AAQ2G1FTK User Manual

Page 5

Advertising
background image

2.7.2

Standard and Native Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–10

2.7.2.1

Using the /MATH_INTERMEDIATE Qualifier . . . . . . . . . . . . . . . .

2–10

2.7.2.2

Using the /ARITHMETIC Qualifier . . . . . . . . . . . . . . . . . . . . . . . .

2–12

2.7.3

Specifying a Truncation Qualifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–12

2.7.4

Using the ROUNDED Phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–12

2.7.4.1

ROUNDED with REMAINDER . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–13

2.7.5

Using the SIZE ERROR Phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–13

2.7.6

Using the GIVING Phrase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2–14

2.7.7

Multiple Operands in ADD and SUBTRACT Statements . . . . . . . . . . .

2–14

2.7.8

Common Errors in Arithmetic Statements . . . . . . . . . . . . . . . . . . . . . .

2–15

3 Handling Nonnumeric Data

3.1

Storage of Nonnumeric Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–1

3.2

Data Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–2

3.2.1

Group Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–2

3.2.2

Elementary Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–2

3.3

Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–3

3.4

Testing Nonnumeric Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–3

3.4.1

Relation Tests of Nonnumeric Items . . . . . . . . . . . . . . . . . . . . . . . . . .

3–3

3.4.1.1

Classes of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–4

3.4.1.2

Comparison Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–5

3.4.2

Class Tests for Nonnumeric Items . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–5

3.5

Data Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–6

3.6

Using the MOVE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–7

3.6.1

Group Moves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–7

3.6.2

Elementary Moves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–7

3.6.2.1

Edited Moves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–9

3.6.2.2

Justified Moves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–9

3.6.3

Multiple Receiving Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–10

3.6.4

Subscripted Moves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–10

3.6.5

Common Nonnumeric Item MOVE Statement Errors . . . . . . . . . . . . .

3–11

3.6.6

Using the MOVE CORRESPONDING Statement for Nonnumeric
Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–11

3.6.7

Using Reference Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–12

4 Handling Tables

4.1

Defining Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–1

4.1.1

Defining Fixed-Length, One-Dimensional Tables . . . . . . . . . . . . . . . . .

4–1

4.1.2

Defining Fixed-Length, Multidimensional Tables . . . . . . . . . . . . . . . . .

4–4

4.1.3

Defining Variable-Length Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–5

4.1.4

Storage Allocation for Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–6

4.1.4.1

Using the SYNCHRONIZED Clause . . . . . . . . . . . . . . . . . . . . . . .

4–7

4.2

Initializing Values of Table Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–10

4.3

Accessing Table Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–12

4.3.1

Subscripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–12

4.3.2

Subscripting with Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–13

4.3.3

Subscripting with Data Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–14

4.3.4

Subscripting with Indexes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–14

4.3.5

Relative Indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–15

4.3.6

Index Data Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4–16

v

Advertising