Compiler limit comparison
The following table lists the compiler limits for Enterprise COBOL V5 and V6, other Enterprise COBOL versions, IBM® COBOL, VS COBOL II, and OS/VS COBOL programs.
These are guidelines to the limits in the table:
- Interpret a limit stated in megabytes (MB) as: x megabytes minus 1-B.
- Interpret a limit stated in kilobytes (KB) as: x kilobytes minus 1-B.
- Interpret a limit stated in gigabytes (GB) as: x gigabytes minus 1-B.
- B stands for bytes.
- N/L stands for no limit.
- Footnotes are at the end of the table.
Language element | Enterprise COBOL V5 and V6 | Other Enterprise COBOL versions | IBM COBOL and VS COBOL II | OS/VS COBOL |
---|---|---|---|---|
Size of program | 999,999 lines | 999,999 lines | 999,999 lines | 999,999 lines |
Number of literals | 4,194,303-B1 | 4,194,303-B1 | 4,194,303-B1 | 16,384-B |
Total length of literals | 4,194,303-B1 | 4,194,303-B1 | 4,194,303-B1 | 32,767-B after OPT |
Reserved word table entries | 1536 | 1536 | 1536 | N/L |
COPY REPLACING . . . BY . . . (items per COPY statement) | N/L | N/L | N/L | 150 |
Number of COPY libraries | N/L | N/L | N/L | N/L |
Block size of COPY library | 32,760-B | 32,767-B | 32,767-B | 16,384-B |
IDENTIFICATION DIVISION | ||||
ENVIRONMENT DIVISION | ||||
CONFIGURATION SECTION | ||||
SPECIAL-NAMES paragraph | ||||
mnemonic-name IS | 18 | 18 | 18 | 18 |
UPSI-n . . . (switches) | 0-7 | 0-7 | 0-7 | 0-7 |
alphabet-name IS . . . | N/L | N/L | N/L | N/L |
literal THRU . . . or ALSO . . . | 256 | 256 | 256 | 256 |
INPUT-OUPUT SECTION | ||||
FILE-CONTROL paragraph | ||||
SELECT file-name . . . | A maximum of 65,535 file names can be assigned external names | A maximum of 65,535 file names can be assigned external names | A maximum of 65,535 file names can be assigned external names | A maximum of 65,535 file names can be assigned external names |
ASSIGN system-name . . . | N/L | N/L | N/L | N/L |
ALTERNATE RECORD KEY data-name . . . | 253 | 253 | 253 | 253 |
RECORD KEY length | N/L2 | N/L2 | N/L2 | 255 |
RESERVE integer (buffers) | 2553 | 2553 | 2553 | 2553 |
I-O-CONTROL paragraph | ||||
RERUN ON system-name . . . | 32,767 | 32,767 | 32,767 | 32,767 |
RERUN integer RECORDS | 16,777,215 | 16,777,215 | 16,777,215 | 16,777,215 |
SAME RECORD AREA | 255 | 255 | 255 | 255 |
SAME RECORD AREA FOR file-name . . . | 255 | 255 | 255 | 255 |
SAME SORT/MERGE AREA | N/L4 | N/L4 | N/L4 | N/L4 |
MULTIPLE FILE file-name . . . | N/L4 | N/L4 | N/L4 | N/L4 |
DATA DIVISION | ||||
77 data item size | With LP(32): 999,999,999 -B
With LP(64): 2,147,483,646 -B |
134,217,727 | 16,777,215 | 1,048,576 |
Total 01 + 77 (data items) | N/L | N/L | N/L | 255 |
88 condition-names . . . | N/L | N/L | N/L | N/L |
66 RENAMES . . . | N/L | N/L | N/L | N/L |
PICTURE clause, number of characters in character-string | 50 | 50 | 30 | 30 |
PICTURE clause, numeric item digit positions | With
ARITH(COMPAT): 18 With
ARITH(EXTEND): 31 |
18 (or 31)6 | For IBM COBOL:
18 (or 31)6 For VS COBOL II:
18 |
18 |
PICTURE clause, numeric-edited character positions | 249 | 249 | 249 | 127 |
PICTURE symbol replication ( ) | With LP(32): 999,999,999
With LP(64): 2,147,483,646 |
134,217,727 | 16,777,215 | 99,999 |
PICTURE symbol replication ( ), class DBCS items | With LP(32): 499,999,999
With LP(64): 1,073,741,823 |
67,108,863 | 8,388,607 | N/A |
PICTURE symbol replication ( ), class national items | With LP(32): 499,999,999
With LP(64): 1,073,741,823 |
67,108,863 | N/A | N/A |
PICTURE symbol replication (editing) | 32,767 | 32,767 | 32,767 | 99,999 |
Elementary item size | With LP(32): 999,999,999
With LP(64): 2,147,483,646 |
134,217,727 | 16,777,215 | 32,767 |
OCCURS integer | With LP(32): 999,999,999
With LP(64): 2,147,483,646 |
134,217,727 | 4,194,303 | 65,535 |
Table size | With LP(32): 999,999,999
With LP(64): 2,147,483,646 |
134,217,727 | 8,388,607 | 32,767 |
Table element size | With LP(32): 999,999,999
With LP(64): 2,147,483,646 |
134,217,727 | ||
ASC or DES KEY . . . (per OCCURS clause) | 12 | 12 | 12 | 12 |
Total length of keys (per OCCURS clause) | 256B | 256B | 256B | 256B |
INDEXED BY . . . (index names by OCCURS clause) | 12 | 12 | 12 | 12 |
Total number of indexes (index names) per class or program | 65,535 | 65,535 | 65,535 | 65,535 |
Size of relative index | 32,765 | 32,765 | 32,765 | 32,765 |
FILE SECTION | ||||
FD record description entry | 1,048,575 | 1,048,575 | 1,048,575 | 1,048,575 |
FD file-name . . . | 65,535 | 65,535 | 65,535 | 65,535 |
LABEL data-name . . . (if no optional clauses) | 255 | 255 | 255 | 185 |
Label record length | 80-B | 80-B | 80-B | 80-B |
DATA RECORD data-name . . . | N/L4 | N/L4 | N/L4 | N/L4 |
BLOCK CONTAINS integer | 2,147,483,6479 | 2,147,483,6479 | For IBM COBOL:
2,147,483,647 For VS COBOL II:
1,048,5755 |
32,760 |
RECORD CONTAINS integer | 1,048,5755 | 1,048,5755 | 1,048,5755 | 32760 |
SD file-name . . . | 65,535 | 65,535 | 65,535 | 65,535 |
DATA RECORD data-name . . . | N/L4 | N/L4 | N/L4 | N/L4 |
WORKING-STORAGE SECTION | ||||
Total size of items without the EXTERNAL attribute | With LP(32): 2,147,483,646 -B
With LP(64): Unlimited, up to the available 64-bit addressing capacity of the machine. |
134,217,727-B | 134,217,727-B | 1,048,576 |
Total size of items with the EXTERNAL attribute | With LP(32): 2,147,483,646 -B
With LP(64): Unlimited, up to the available 64-bit addressing capacity of the machine. |
134,217,727-B | 134,217,727-B | N/A |
LINKAGE SECTION | ||||
Total size | With LP(32): 2,147,483,646 -B
With LP(64): Unlimited, up to the available 64-bit addressing capacity of the machine. |
134,213,631-B | 134,217,727-B | 1,048,576 |
PROCEDURE DIVISION | ||||
Procedure and constant area | 4,194,3031 | 4,194,3031 | 4,194,3031 | 1M+32-KB |
PROCEDURE DIVISION USING identifier . . . | 32,767 | 32,767 | 32,767 | N/L |
Procedure-names | 1,048,5751 | 1,048,5751 | 1,048,5751 | 64-KB1 |
Statements per line (FDUMP/TEST) | 7 | 7 | 7 | 7 |
Subscripted data-names per statement | 32,767 | 32,767 | 32,767 | 511 |
ADD identifier . . . | N/L | N/L | N/L | N/L |
ALTER procedure-name 1 TO procedure-name 2 . . . | 4,194,3031 | 4,194,3031 | 4,194,3031 | 64-KB1 |
CALL . . . BY CONTENT identifier | 2,147,483,647 | 2,147,483,647 | 2,147,483,647 | N/A |
CALL literal . . . | 4,194,3031 | 4,194,3031 | 4,194,3031 | N/L |
CALL identifier or literal USING identifier or literal . . . | 16,380 | 16,380 | 16,380 | N/L |
Active programs in run unit | 32,767 | 32,767 | 32,767 | 32,767 |
Number of names called (DYN option) | N/L | N/L | N/L | 64-K |
CANCEL identifier or literal . . . | N/L | N/L | N/L | N/L |
CLOSE file-name . . . | N/L | N/L | N/L | N/L |
COMPUTE identifier . . . | N/L | N/L | N/L | N/L |
DISPLAY identifier or literal . . . | N/L | N/L | N/L | N/L |
DIVIDE identifier . . . | N/L | N/L | N/L | N/L |
ENTRY USING identifier or literal . . . | N/L | N/L | N/L | N/L |
EVALUATE . . . subjects | 64 | 64 | 64 | N/L |
EVALUATE . . . WHEN clauses | 256 | 256 | 256 | N/L |
GO procedure-name . . . DEPENDING | 255 | 255 | 255 | 2031 |
INSPECT TALLYING and REPLACING clauses | N/L | N/L | N/L | 15 |
MERGE file-name ASC or DES KEY . . . | N/L | N/L | N/L | 12 |
Total merge key length | 4092-B7 | 4092-B7 | 4092-B7 | 256-B |
MERGE USING file-name . . . | 168 | 168 | 168 | 168 |
MOVE identifier or literal TO literal . . . | N/L | N/L | N/L | N/L |
MULTIPLY identifier . . . | N/L | N/L | N/L | N/L |
OPEN file-name . . . | N/L | N/L | N/L | N/L |
PERFORM | 4,194,303 | 4,194,303 | 4,194,303 | 64-K |
SEARCH . . . WHEN . . . | N/L | N/L | N/L | N/L |
SET index or identifier . . . TO | N/L | N/L | N/L | N/L |
SET index . . . UP or DOWN | N/L | N/L | N/L | N/L |
SORT file-name ASC or DES KEY | N/L | N/L | N/L | 12 |
Total sort key length | 4092-B7 | 4092-B7 | 4092-B7 | 256-B |
SORT USING file-name . . . | 168 | 168 | 168 | 168 |
STRING identifier . . . | N/L | N/L | N/L | N/L |
STRING DELIMITED identifier or literal . . . | N/L | N/L | N/L | N/L |
UNSTRING DELIMITED identifier or literal . . . | N/L | 255 | 255 | 15 |
UNSTRING INTO identifier or literal . . . | N/L | N/L | N/L | N/L |
USE . . . ON file-name . . . | N/L | N/L | N/L | N/L |
|