Compaq COBOL
User Manual


Previous Contents Index

Chapter 2
2 Handling Numeric Data
     2.1     How the Compiler Stores Numeric Data
     2.2     Specifying Alignment
     2.3     Sign Conventions
     2.4     Invalid Values in Numeric Items
     2.5     Evaluating Numeric Items
         2.5.1         Numeric Relation Test
         2.5.2         Numeric Sign Test
         2.5.3         Numeric Class Tests
         2.5.4         Success/Failure Tests
     2.6     Using the MOVE Statement
         2.6.1         Elementary Numeric Moves
         2.6.2         Elementary Numeric-Edited Moves
         2.6.3         Subscripted Moves
         2.6.4         Common Move Errors
     2.7     Using the Arithmetic Statements
         2.7.1         Temporary Work Items
         2.7.2         Standard and Native Arithmetic (Alpha)
             2.7.2.1             Using the /MATH_INTERMEDIATE Qualifier (Alpha)
             2.7.2.2             Using the /ARITHMETIC Qualifier (Alpha)
         2.7.3         Specifying a Truncation Qualifier
         2.7.4         Using the ROUNDED Phrase
             2.7.4.1             ROUNDED with REMAINDER
         2.7.5         Using the SIZE ERROR Phrase
         2.7.6         Using the GIVING Phrase
         2.7.7         Multiple Operands in ADD and SUBTRACT Statements
         2.7.8         Common Errors in Arithmetic Statements
Chapter 3
3 Handling Nonnumeric Data
     3.1     How the Compiler Stores Nonnumeric Data
     3.2     Data Organization
         3.2.1         Group Items
         3.2.2         Elementary Items
     3.3     Special Characters
     3.4     Testing Nonnumeric Items
         3.4.1         Relation Tests of Nonnumeric Items
             3.4.1.1             Classes of Data
             3.4.1.2             Comparison Operations
         3.4.2         Class Tests for Nonnumeric Items
     3.5     Data Movement
     3.6     Using the MOVE Statement
         3.6.1         Group Moves
         3.6.2         Elementary Moves
             3.6.2.1             Edited Moves
             3.6.2.2             Justified Moves
         3.6.3         Multiple Receiving Items
         3.6.4         Subscripted Moves
         3.6.5         Common Nonnumeric Item MOVE Statement Errors
         3.6.6         Using the MOVE CORRESPONDING Statement for Nonnumeric Items
         3.6.7         Using Reference Modification
Chapter 4
4 Handling Tables
     4.1     Defining Tables
         4.1.1         Defining Fixed-Length, One-Dimensional Tables
         4.1.2         Defining Fixed-Length, Multidimensional Tables
         4.1.3         Defining Variable-Length Tables
         4.1.4         Storage Allocation for Tables
             4.1.4.1             Using the SYNCHRONIZED Clause
     4.2     Initializing Values of Table Elements
     4.3     Accessing Table Elements
         4.3.1         Subscripting
         4.3.2         Subscripting with Literals
         4.3.3         Subscripting with Data Names
         4.3.4         Subscripting with Indexes
         4.3.5         Relative Indexing
         4.3.6         Index Data Items
         4.3.7         Assigning Index Values Using the SET Statement
             4.3.7.1             Assigning an Integer Index Value with a SET Statement
             4.3.7.2             Incrementing an Index Value with the SET Statement
         4.3.8         Identifying Table Elements Using the SEARCH Statement
             4.3.8.1             Implementing a Sequential Search
             4.3.8.2             Implementing a Binary Search
Chapter 5
5 Using the STRING, UNSTRING, and INSPECT Statements
     5.1     Concatenating Data Using the STRING Statement
         5.1.1         Multiple Sending Items
         5.1.2         Using the DELIMITED BY Phrase
         5.1.3         Using the POINTER Phrase
         5.1.4         Using the OVERFLOW Phrase
         5.1.5         Common STRING Statement Errors
     5.2     Separating Data Using the UNSTRING Statement
         5.2.1         Multiple Receiving Items
         5.2.2         Controlling Moved Data Using the DELIMITED BY Phrase
             5.2.2.1             Multiple Delimiters
         5.2.3         Using the COUNT Phrase
         5.2.4         Saving UNSTRING Delimiters Using the DELIMITER Phrase
         5.2.5         Controlling UNSTRING Scanning Using the POINTER Phrase
         5.2.6         Counting UNSTRING Receiving Items Using the TALLYING Phrase
         5.2.7         Exiting an UNSTRING Statement Using the OVERFLOW Phrase
         5.2.8         Common UNSTRING Statement Errors
     5.3     Examining and Replacing Characters Using the INSPECT Statement
         5.3.1         Using the TALLYING and REPLACING Options of the INSPECT Statement
         5.3.2         Restricting Data Inspection Using the BEFORE/AFTER Phrase
         5.3.3         Implicit Redefinition
         5.3.4         Examining the INSPECT Operation
             5.3.4.1             Setting the Scanner
             5.3.4.2             Active/Inactive Arguments
             5.3.4.3             Finding an Argument Match
         5.3.5         The TALLYING Phrase
             5.3.5.1             The Tally Counter
             5.3.5.2             The Tally Argument
             5.3.5.3             The Tally Argument List
             5.3.5.4             Interference in Tally Argument Lists
         5.3.6         Using the REPLACING Phrase
             5.3.6.1             The Search Argument
             5.3.6.2             The Replacement Value
             5.3.6.3             The Replacement Argument
             5.3.6.4             The Replacement Argument List
             5.3.6.5             Interference in Replacement Argument Lists
         5.3.7         Using the CONVERTING Option
         5.3.8         Common INSPECT Statement Errors


Previous Next Contents Index