Pro*COBOL Precompiler Programmer's Guide
Release 8.1.5






Prev Next

Operating System Dependencies

Some details of COBOL programming vary from one system to another. This appendix is a collection of all system-specific issues regarding Pro*COBOL. References are provided, where applicable, to other sources in your document set.

System-Specific References in this Manual

The references in this section appear in Chapter 4, "Datatypes and Host Variables" using similar order and headings.

COBOL Versions

The Pro*COBOL Precompiler supports the standard implementation of COBOL for your operating system (usually COBOL-85 or COBOL-74). Some platforms may support both COBOL implementations. Check your Oracle system-specific documentation.

Host Variables

How you declare and name host variables depends on which COBOL compiler you use. Check your COBOL user's guide for details about declaring and naming host variables.


Declare host variables according to COBOL rules, specifying a COBOL datatype supported by Oracle. Table 4-6, "Host Variable Declarations" shows the COBOL datatypes and pseudotypes you can specify. However, your COBOL implementation might not include all of them.


Host variable names must consist only of letters, digits, and hyphens, and must begin with a letter. They can be any length, but only the first 30 characters are significant. Your compiler might allow a different maximum length.

INCLUDE Statements

You can INCLUDE any file. When you precompile your Pro*COBOL program, each EXEC SQL INCLUDE statement is replaced by a copy of the file named in the statement.

If your system uses file extensions but you do not specify one, the Pro*COBOL Precompiler assumes the default extension for source files (usually COB). The default extension is system-dependent. Check your Oracle system-specific documentation.

If your system uses directories, you can set a directory path for INCLUDEd files by specifying the precompiler option INCLUDE=path. You must use INCLUDE to specify a directory path for nonstandard files unless they are stored in the current directory. The syntax for specifying a directory path is system-specific. Check your Oracle system-specific documentation.


With the MAXLITERAL precompiler option you can specify the maximum length of string literals generated by the precompiler, so that compiler limits are not exceeded. The MAXLITERAL default value is 256, but you might have to specify a lower value.

For example, if your COBOL compiler cannot handle string literals longer than 132 characters, specify "MAXLITERAL=132." Check your COBOL compiler user's guide. For more information about the MAXLITERAL option, see Chapter 14, "Precompiler Options"

PIC N or Pic G Clause for Multi-byte NLS Characters

Some COBOL compilers may not support the use of the PIC N or PIC G clause for declaring multi-byte NLS character variables. Check your COBOL user's guide before writing source code that uses these clauses to declare multi-byte NLS character variables.

RETURN-CODE Special Register May Be Unpredictable.

The contents of the RETURN-CODE special register (for those systems that support it) will be unpredictable after any SQL statement or SQLLIB function.


Copyright © 1999 Oracle Corporation.

All Rights Reserved.