Language differences

The following language differences exist between Enterprise COBOL and OS/VS COBOL.
  • Changes to ALPHABETIC class
  • B symbol in PICTURE clause
  • Changes to CALL statement
  • Changes to CBL compiler directing statement
  • Changes to Combined abbreviated relation condition
  • DIVIDE ID1 BY ID2 [GIVING ID3] ON SIZE ERROR . . .
  • DIVIDE ID1 INTO ID2 [GIVING ID3] ON SIZE ERROR . . .
  • EXIT PROGRAM (or STOP RUN) missing at program end
  • FILE STATUS clause
  • ID1 IS [NOT] ALPHABETIC
    • (class test on IF, PERFORM, and SEARCH)
  • Changes to IF . . . OTHERWISE statement
  • MOVE A TO B
    • where B is defined as a variable-length data item containing its own ODO object
  • MULTIPLY ID1 BY ID2 [GIVING ID3] ON SIZE ERROR . . .
  • Changes to OCCURS DEPENDING ON clause
  • Changes in intermediate results for ON SIZE ERROR option
  • PERFORM P1 [THRU P2] VARYING ID2 FROM ID3 BY ID4 UNTIL COND-1  AFTER ID5 FROM ID6 BY ID7 UNTIL COND-2   AFTER ID8 FROM ID9 BY ID10 UNTIL COND-3
    1. Where ID6 is (potentially) dependent on ID-2
    2. Where ID9 is (potentially) dependent on ID-5
    3. Where ID4 is (potentially) dependent on ID-5
    4. Where ID7 is (potentially) dependent on ID-8

      Dependencies occur when the first identifier or index name (IDx) is identical to, subscripted with, or qualified with the second identifier. Dependencies might also occur with a partial or full redefinition of the second identifier.

  • Changes to PROGRAM COLLATING SEQUENCE clause
  • READ filename RECORD INTO B
    • where B is defined variable-length data containing the object of the ODO phrase
  • RECORD CONTAINS integer-4 CHARACTERS in the FD section
  • Changes to RERUN clause
  • Changes to RESERVE clause
  • Changes to Reserved word list
  • SPECIAL-NAMES: alphabet-name IS xxxxx
  • Changes in evaluation for subscripts out of range
  • UNSTRING A INTO B . . .
    • where B is defined variable-length data containing the object of the ODO phrase
  • UNSTRING ID1 DELIMITED BY ID2 INTO ID4 DELIMITER IN ID5 COUNT IN ID6 WITH POINTER ID7
  • UPSI switches and UPSI mnemonic names references
  • VALUE clause condition names
  • WHEN-COMPILED special register
  • WRITE BEFORE/AFTER ADVANCING PAGE statement
  • WRITE AFTER POSITIONING