|Pro*COBOL Precompiler Programmer's Guide
Part Number A76951-01
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.
The references in this section appear in Chapter 4, "Datatypes and Host Variables" using similar order and headings.
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.
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 Declaractions" 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.
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 1024, 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"
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.
The contents of the RETURN-CODE special register (for those systems that support it) will be unpredictable after any SQL statement or SQLLIB function.
On some platforms such as NT, the COBOL compiler reverses the byte-ordering of binary data. See your platform-specific documentation for the COMP5 precompiler option.