Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


Imperative statements

An imperative statement either specifies an unconditional action to be taken by the program or is a conditional statement terminated by its explicit scope terminator (see Delimited scope statements). A series of imperative statements can be specified wherever an imperative statement is allowed. A conditional statement that is terminated by its explicit scope terminator is also classified as an imperative statement (see Delimited scope statements). The following lists contain the COBOL imperative statements.

Arithmetic

  • ADD1
  • COMPUTE1
  • DIVIDE1
  • MULTIPLY1
  • SUBTRACT1

1. Without the ON SIZE ERROR or the NOT ON SIZE ERROR phrase.

Data movement

  • ACCEPT (DATE, DAY, DAY-OF-WEEK, TIME)
  • INITIALIZE
  • INSPECT
  • MOVE
  • SET
  • STRING2
  • UNSTRING2
  • XML GENERATE8
  • XML PARSE8

2. Without the ON OVERFLOW or the NOT ON OVERFLOW phrase.

8. Without the ON EXCEPTION or NOT ON EXCEPTION phrase.

Ending

  • STOP RUN
  • EXIT PROGRAM
  • EXIT METHOD
  • GOBACK

Input-output

  • ACCEPT identifier
  • CLOSE
  • DELETE3
  • DISPLAY
  • OPEN
  • READ4
  • REWRITE3
  • START3
  • STOP literal
  • WRITE5

3. Without the INVALID KEY or the NOT INVALID KEY phrase.

4. Without the AT END or NOT AT END, and INVALID KEY or NOT INVALID KEY phrases.

5. Without the INVALID KEY or NOT INVALID KEY, and END-OF-PAGE or NOT END-OF-PAGE phrases.

Ordering

  • MERGE
  • RELEASE
  • RETURN6
  • SORT

6. Without the AT END or NOT AT END phrase.

Procedure-branching

  • ALTER
  • EXIT
  • GO TO
  • PERFORM

Program or method linkage

  • CALL7
  • CANCEL
  • INVOKE

7. Without the ON OVERFLOW phrase, and without the ON EXCEPTION or NOT ON EXCEPTION phrase.

Table-handling

  • SET

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)