HP 3000 Manuals

Compiler Limits [ HP COBOL II/XL Programmer's Guide ] MPE/iX 5.0 Documentation


HP COBOL II/XL Programmer's Guide

Compiler Limits 

The following compiler limits are maximum values that you cannot change.
If your program exceeds them, the compiler prints internal error
messages.  You can work around some of these limits, as noted.

          Table 7-9.  Compiler Limits 

-----------------------------------------------------------------------------------------------
|                              |                              |                               |
|        Limited Entity        |        Maximum Value         |          Work-Around          |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Value pairs per              | 500                          | Describe the condition with   |
| condition-name.  (A value    |                              | more than one condition-name  |
| pair is a literal, such as   |                              | and use AND or OR.            |
| 3, or of the form literal    |                              |                               |
| THRU literal, such as 10     |                              |                               |
| THRU 20.)                    |                              |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| GO TO DEPENDING ON paragraph | 500                          | Split the GO TO DEPENDING ON  |
| labels.                      |                              | statement into two            |
|                              |                              | statements.                   |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Size and number of macros.   | Program dependent.  Compiler | Eliminate unused macros.      |
|                              | prints message 461 (dynamic  | (The compiler option $CONTROL |
|                              | error, out of space) when it | CROSSREF indicates where      |
|                              | reaches the limit of         | macros are used.)  Break up   |
|                              | 2000.[REV BEG]               | macros into smaller macros.   |
|                              |                              | Or, instead of using macros,  |
|                              |                              | use COPY REPLACING.[REV END]  |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Total number of pseudo-text  | Total Approximately 60.      | None.                         |
| lines in all COPY and        |                              |                               |
| REPLACE statements.          |                              |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Symbol table entries.        | Depends on number and        | None, once the symbol table   |
|                              | lengths of data item names.  | is full.                      |
|                              | If 80% or more of the symbol |                               |
|                              | table and intermediate data  |                               |
|                              | structure is used, the       |                               |
|                              | compiler prints the          |                               |
|                              | percentage.  This indicates  |                               |
|                              | that the compiler is         |                               |
|                              | reaching its limit, you      |                               |
|                              | should consider breaking     |                               |
|                              | your program into smaller    |                               |
|                              | pieces.                      |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Data area.                   | 230 bytes.                   | None.                         |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Paragraph size.              | 100K bytes.                  | Break paragraph into smaller  |
|                              |                              | paragraphs.                   |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Sort files.                  | 50                           | Instead of performing one     |
|                              |                              | sort, perform two sorts and   |
|                              |                              | merge the sorted files into a |
|                              |                              | single file.                  |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Operands per INSPECT,        | Approximately 500 operands   | Break up statements.          |
| STRING, or UNSTRING          | (fewer if they are           |                               |
| statement.                   | subscripted, reference       |                               |
|                              | modified, or literals).      |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------

          Table 7-9.  Compiler Limits (cont.) 
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
|        Limited Entity        |        Maximum Value         |          Work-Around          |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Nonredefined 01 and 77 data  | 255                          | Put separate data items into  |
| items in the LINKAGE         |                              | records in the subprogram and |
| SECTION.                     |                              | the calling program.          |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| PICTURE string.              | 30 characters.               | None.[REV BEG]                |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Call BY CONTENT.             | 64K bytes per call.          | Pass extra parameters by      |
|                              |                              | reference.[REV END]           |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Qualifiers per qualified     | 50                           | None.                         |
| data name.                   |                              |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Identifier.                  | 30 characters (ANSI          | None.  (Use a shorter name).  |
|                              | Standard).                   |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Numeric PICTURE.             | 18 digits (31 in the         | None.                         |
|                              | intermediate result).        |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Levels of a                  | 7                            | Use nested PERFORM            |
| PERFORM...VARYING statement. |                              | statements.                   |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| DISPLAY operands.            | Approximately 500 operands   | Use DISPLAY with no           |
|                              | (fewer if they are           | advancing.                    |
|                              | subscripted, reference       |                               |
|                              | modified, or numeric         |                               |
|                              | literals).                   |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Depth to which you can nest  | 30                           | Break the expression into     |
| parentheses in an expression |                              | several statements.           |
| (where a single set of       |                              |                               |
| parentheses represents a     |                              |                               |
| depth of one).               |                              |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Nonnumeric literal.          | 255 characters.              | None.                         |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| TOP of LINAGE clause.        | 63                           | None.                         |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Nested IF statements.        | 30                           | Use EVALUATE or binary IF     |
|                              |                              | statements.                   |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Nested and concatenated      | 999                          | Put some programs in separate |
| programs in the same file.   |                              | files.                        |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| External data names and      | 4000                         | Combine items into            |
| files.                       |                              | records.[REV BEG]             |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Corresponding pairs in ADD,  | 500                          | Break up groups.              |
| SUBTRACT, MOVE, or CORR.     |                              |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Perform table.               | MAX(N+10,50) where N is the  | Your program is not ANSI      |
|                              | total different perform      | standard.                     |
|                              | exits.                       |                               |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------
|                              |                              |                               |
| Maximum amount of tempcells  | 64K bytes.                   | Break up statements or use    |
| used for functions.          |                              | reference modification to     |
|                              |                              | break up function             |
|                              |                              | parameters.[REV END]          |
|                              |                              |                               |
-----------------------------------------------------------------------------------------------



MPE/iX 5.0 Documentation