Pro*COBOL
Precompiler for Windows NT and Windows 95/98
Getting Started A67993-01 |
|
This chapter provides an overview of how to use Pro*COBOL
release 8.1.5 and 1.8.50 for Windows NT and Windows 95/98.
Specific topics discussed are:
When you install Pro*COBOL release 8.1.5, Oracle Universal
Installer creates a directory called \PRECOMP in your ORACLE_BASE\ORACLE_HOME
directory.
Note: The \PRECOMP directory can contain files for other products, such as Pro*C/C++. |
The \PRECOMP directory contains the following directories:
Directory Name | Contents |
---|---|
\ADMIN |
Configuration files |
\DEMO |
Sample programs |
\DOC |
Readme files |
\LIB |
Library files |
\MESG |
Message files |
\PUBLIC |
Header files |
Use the following commands to precompile a file:
Use . . . | For Pro*COBOL Release . . . |
---|---|
PROCOB FILENAME |
8.1.5 |
PROCOB18 FILENAME |
1.8.50 |
By default, if no extension is provided, Pro*COBOL tries
to open FILENAME.PCO.
If you do not specify the ONAME option, Pro*COBOL generates
a file named FILENAME.CBL.
The ORACLE_BASE\ORACLE_HOME\PRECOMP\PUBLIC
directory contains the Pro*COBOL header files.
Additional
Information:
See the Pro*COBOL Precompiler Programmer's Guide for more information about ORACA, SQLCA, and SQLDA. |
The ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB directory
contains the library file that you use when linking Pro*COBOL applications.
The library file is called ORASQL8.LIB.
Chapter 7 of the Pro*COBOL
Precompiler Programmer's Guide describes the precompiler options.
This section highlights issues related to Pro*COBOL for Windows NT and
Windows 95/98.
A configuration file is a text file that contains precompiler
options.
For release 8.1.5, the system configuration file is called PCBCFG.CFG. This file is located in the ORACLE_BASE\ORACLE_HOME\PRECOMP\ADMIN directory. It has the following option:
For release 1.8.50, the system configuration file is called
PCCCOB.CFG This file is located in ORACLE_BASE\ORACLE_HOME\PRECOMP\ADMIN.
See the following section, "COMP5",
for more information about this option.
The following table describes how to set the value of COMP5:
If you are using the Fujitsu COBOL compiler, set the MAXLITERAL
option to 160. The Fujitsu COBOL compiler cannot handle string literals
that are longer than 160 characters.
You can set this option in a configuration file as well as
at the command line.
The default value of the MAXLITERAL option is 256.
This section describes how to compile and link Pro*COBOL applications using the following compilers:
You can compile and link a Fujitsu COBOL application in either of two ways:
Programs generated by Pro*COBOL can be compiled and run from
within Fujitsu COBOL PROGRAMMING-STAFF.
To avoid potential inconsistencies when calling routines
in the Oracle libraries, use the "COMP5YES" option. This step is required
because binary numbers for COBOL BINARY/COMP data are stored in Big Endian
format. Oracle libraries expect binary numbers to be stored in Little Endian
format (machine format).
The compiler option "TEST" must be selected when the COBOL
application is compiled.
When you click Build/Rebuild, PROGRAMMING-STAFF generates
the executable and WINSVD debug information.
After building the application, you can debug the application
using the Interactive Debugger WINSVD. To start WINSVD, choose WINSVD from
the Tools menu of PROGRAMMING-STAFF.
For release 8.1.5, use the following commands to build an executable:
C:\> COBOL32 -M FILENAME.CBL C:\> LINK FILENAME.OBJ F3BICIMP.LIB LIBC.LIB KERNEL32.LIB USER32.LIB /OUT:FILENAME.EXE ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB
These commands produce an .EXE file, which you can run like
any other Windows NT or Windows 95/98 program.
For release 1.8.50, the following commands can be used to build an executable:
COBOL32 -M sample1.cbl LINK sample1.obj f3bicimp.lib libc.lib kernel32.lib user32.lib /out:sample1.exe ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB
Use the following commands to build an executable for debugging:
C:\> COBOL32 -M -Dt FILENAME.CBL C:\> LINK FILENAME.OBJ F3BICIMP.LIB LIBC.LIB KERNEL32.LIB USER32.LIB /OUT:FILENAME.EXE ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB /DEBUG /DEBUGTYPE:COFF
These commands produce an .EXE file, as well as WINSVD debug
information. You can debug the application using the Interactive Debugger
WINSVD.
For release 1.8.50, the following commands can be used to build an executable for debugging:
COBOL32 -M -Dt sample1.cbl LINK sample1.obj f3bicimp.lib libc.lib kernel32.lib user32.lib /out:sample1.exe ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB /DEBUG /DEBUGTYPE:COFF
You can compile and link a Micro Focus COBOL application in either of two ways:
Programs can be compiled and run from within the Micro Focus
COBOL debugger, Animator V2.
To avoid potential inconsistencies when calling routines in the Oracle libraries, choose the Compiler Directives menu option and enter:
MAKESYN "COMP-5" = "COMP"
This step is required because Micro Focus COBOL stores binary
numbers in Big Endian format. Oracle libraries expect binary numbers to
be stored in Little Endian format (machine format).
By default, Micro Focus COBOL subprograms are compiled to
be dynamically linked at runtime. In these programs, called subprograms,
names are resolved and linked at runtime. The name is resolved by looking
for the file SUBPROGRAM.OBJ or SUBPROGRAM.DLL.
For release 8.1.5, use the following commands to build a dynamic linking executable:
C:\> COBOL FILENAME /MAKESYN "COMP-5" = "COMP" C:\> CBLLINK FILENAME ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB
For release 1.8.50, the following commands can be used to build a dynamic linking executable:
COBOL sample1 /MAKESYN "COMP-5" = "COMP" CBLLINK sample1 ORACLE_BASE\ORACLE_HOME\PRECOMP\LIB\ORASQL8.LIB
These commands produce an .EXE file, which you can run like
any other Windows NT or Windows 95/98 program.
Note: Micro Focus COBOL must be installed on the same system as Pro*COBOL to successfully run the file. |
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|