HP 3000 Manuals

The Program Development Part [ COBOL/HP-UX Operating Guide for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Operating Guide for the Series 700 and 800

The Program Development Part 

This part of the COBOL Operating Guide covers the basic processes for
creating runnable files from COBOL source code.  The topics covered are
explained in the following sections.

COBOL System Interface 

Access to the major components of the Micro Focus COBOL compilation
system - the compiler, the native code generator and the system linker -
is via a single command:  cob.  Files specified to this command can be
any mixture of COBOL source, intermediate code, native code, linkable
object code, C source files or assembler source files.  By default, the
cob command converts the specified COBOL source files into intermediate
code files which are suitable for animation; that is, files which can be
executed under the control of Animator.  However, depending on the option
you specify to it, the cob command can output native code, intermediate
code, dynamically linked or statically linked executable modules.

Compiling 

The Micro Focus COBOL Compiler compiles COBOL source code into
intermediate (.int) code.  This intermediate code is a sequence of
instructions to an abstract Micro Focus COBOL machine.  Files for use by
the Animator (.idy) are also created.

The mechanism to invoke compilation is described, and all of the
available options are explained.  The methods for applying the options
and setting your own defaults are covered, together with other aspects of
compilation.

Animating 

Animator is an interactive program debugging tool for use with Micro
Focus COBOL programs.

The Animator functions are explained, along with a description of how
animation is invoked. 

Generating 

The Native Code Generator translates the intermediate (.int) code
produced by the compiler into the native (.gnt) code for your processor.

The mechanism to invoke generation is described, and all of the available
options are explained.  The methods for applying the options and setting
your own defaults are covered, together with other aspects of generation.

Linking 

The system linker provided with your UNIX system links the required
run-time support libraries to your native code generated object files and
creates one executable file.

The different methods of linking are described, providing guidance on
selecting the type appropriate for your requirements.

Running 

The Run Time System (RTS) loads files of intermediate or native code.  If
both .int and .gnt code is available, then by default, the RTS passes
native code to your processor for direct execution, although it can
execute compiled intermediate code interpretively if you select this
option.  The RTS also acts as the interface between your Micro Focus
COBOL program and such operating system functions as file and device
handling and memory management.

This chapter describes how to prepare and run a program on the Micro
Focus COBOL system.  It explains the use of switches in controlling the
program's behavior at run time and how to specify parameters on the
command line which your program can read.

COBOL System Library Routines 

A library of routines is provided with this COBOL system to allow access
to facilities beyond those supported by COBOL syntax.  Those routines
which are portable between UNIX and non-UNIX environments are describedin
the chapters Library Routines (Call-by-Name) and Library Routines 
(Call-by-Number).  Routines specific to UNIX environments are described
in the appendix Advanced Programming Features.

Writing Programs 

This chapter contains information to aid you in writing efficient
programs.  It also provides guidance on handling large programs and
details on calling subprograms.



MPE/iX 5.0 Documentation