What's in COBOL Toolbox? [ Micro Focus COBOL for UNIX, Getting Started ] MPE/iX 5.0 Documentation
Micro Focus COBOL for UNIX, Getting Started
What's in COBOL Toolbox?
The most important parts of COBOL Toolbox are:
* The Toolbox Development Environment, which provides a set of menus
from which you can invoke components of COBOL Toolbox, together
with the UNIX system linker, by pressing function keys.
* The COBOL Editor, with which you create and edit your source
program. It is designed to be especially suitable for editing
COBOL source code. You can invoke the Compiler and Animator (see
below) from within the COBOL Editor.
* The Compiler, which checks that your program is valid COBOL and
produces intermediate code. It can automatically invoke Animator
if it finds no errors; if it does find an error it can load the
source file into the COBOL Editor, with the cursor positioned at
the error.
* COBOL Source Information (CSI), which makes extensive analyses of
your source program available while you are editing or animating.
* The Generator, which produces optimized object code from your
intermediate code.
* The run-time support programs and libraries, which contain
routines supporting advanced features of the COBOL language.
The optimized object code produced by the Generator is native machine
code, and so runs much faster than intermediate code. However,
intermediate code is generally portable across Micro Focus COBOL systems
on different machines and operating systems.
In addition to the above, the command line interfaces from Micro Focus
COBOL are available. Notable are:
* The cob command, which you use to invoke the above components of
COBOL Toolbox; you select these by setting flags on the cob
command line.
* The cobrun command, which runs your intermediate code or generated
code program.
The cob command can also invoke your UNIX system's C compiler, assembler,
and linker, if installed on your system.
The COBOL language in this system gives you powerful facilities over and
above those usually found in other COBOL systems. Notably, you can write
programs to make full use of:
* screen displays
* your own file handlers
* mixed language programming
The system accepts COBOL source programs conforming to any of the
following standards and dialects:
* ANSI'74
* ANSI'85
* Micro Focus COBOL
* IBM OS/VS COBOL
*
IBM VS COBOL II
*
IBM DOS/VS COBOL
*
IBM SAA COBOL
*
IBM COBOL/370
*
IBM COBOL/2
*
Microsoft COBOL
*
RM/COBOL
*
DG Interactive COBOL (v1.3)
*
X/Open COBOL
Industry Standards Used by Micro Focus
The Micro Focus COBOL Compiler, Native Code Generator and Run-time System
comply with the following industry standards, and are routinely certified
each year and appear in the Validated Products List of the US Department
of Commerce, National Institute of Standards and Technology.
1. American National Standards Institute (ANSI) - X3.23-1985
(Programming Language COBOL) amended by X3.23a-1989 (Intrinsic
Function module) and X3.23b-1993 (Corrections Amendment)
The following required modules of the high-level ANSI STANDARD are
supported:
a. Nucleus (2 NUC 1,2)
Provides internal processing of data within the four basic
divisions of a program and the capability for defining and
accessing tables.
b. Sequential I-O (2 SEQ 1,2)
Provides access to records of a file in established
sequence. The sequence is established as a result of
writing the records to the file.
c. Relative I-O (2 REL 0,2)
Provides access to records in either a random or sequential
manner; each record in a relative file is uniquely
identified by an integer specifying the record's logical
position in a file.
d. Indexed I-O (2 INX 0,2)
Provides access to records in either a random or sequential
manner; each record in an indexed file is uniquely
identified by the value of a key within that record.
e. Sort-Merge (1 SRT 0,1)
Orders one or more files of records, or combines two or
more identically ordered files of records, according to a
set of user-specified keys.
f. Inter-Program Communication (2 IPC 1,2)
Allows a COBOL program to communicate with other programs
through transfers of control and access to common data
items.
g. Source Text Manipulation (2 STM 0,2)
Allows the insertion and replacement of source program text
as part of the compilation of the source program. COBOL
libraries contain texts which are available to the compiler
at compile time and which can be treated by the compiler as
part of the source program.
The following optional modules are included:
a. Segmentation (2 SEG 0,2)
Refreshes independent segments when required.
b. Debug (2 DBG 0,2)
Monitors object program execution through declarative
procedures, special debugging lines, and a special
register, DEBUG-ITEM, which gives specific information
about execution status.
c. Report Writer (1 RPW 0,1)
Produces reports by specifying the physical appearance of
the report.
2. ISO 1989-1985 Standard of the International Organization for
Standardization (ISO)
3. Federal Standard COBOL of March 1986 (FIPS PUB 21-2), High Level.
Conforms to FIPS PUB 21-2 COBOL and meets the requirements of
FIRMR 201-9.109
4. Federal Standard COBOL (FIPS PUB 21-3), High Level.
Conforms to FIPS PUB 21-3
5. X/Open CAE Specification, COBOL Language (XPG4).
How You Use COBOL Toolbox
The main functions of COBOL Toolbox are presented to you through a menu
displayed by the Toolbox Development Environment. The menu is displayed
at the bottom of the screen, and shows you which key to press to invoke
the function you want.
Central to the system is the COBOL Editor. You enter this from the
Toolbox menu, and use it to create or change your program and save it in
a source file.
Once you have created your source program, you can invoke the Compiler
from within the COBOL Editor to check that the program is valid COBOL.
When the Compiler finds a syntax error, you can return at once to the
COBOL Editor. The cursor is automatically positioned at the line
containing the error. You correct the error and invoke the Compiler
again.
Once the program checks with no errors, you run it using Animator, which
you can also invoke from within the COBOL Editor. This is called
animating; it enables you to watch and control the working of your
program, seen entirely as COBOL source, and therefore makes testing and
debugging very efficient.
If you find an error while animating, you can return at once to the COBOL
Editor. The cursor is automatically positioned at the line you were
looking at when you found the error. You correct the error and invoke
the Compiler and Animator again.
Alternatively, the Compiler and Animator can be entered directly from the
Toolbox menu after you have exited from the COBOL Editor.
When your program is working correctly, you can run it using the Run
function on the main menu. Any subprograms and run-time support modules
that it needs are automatically loaded as necessary.
Optimizing and Shipping
Once your application is working correctly you may want to optimize it
and/or ship it to your users.
The Compiler produces intermediate code; this is a Micro Focus standard
code, contained in a file with an extension of .int , which can be
interpreted by Animator and the Run function. If you want faster
execution, you can use the Generator to provide optimized object code.
This is native machine code contained in a file with an extension of
.gnt. You run it just like intermediate code.
You can invoke the Generator by using the Generate function on the
Toolbox menu. It can also be invoked from the operating system command
line.
To distribute your application to your users, you can create an
executable file by using the cob command to create native machine code in
.o files and link these with the run-time support files. This executable
file can call intermediate and generated code programs.
Shipping components of this system to users is subject to a license
agreement. Please see the section Shipping Components to Users.
Operating System Extensions
Together with COBOL Toolbox you receive a group of components called the
Operating System Extensions (OSX). Its purpose is to provide a shell that
sits on top of your operating system, providing the same environment on
different operating systems. This enables you to port COBOL applications
easily from one operating system to another.
MPE/iX 5.0 Documentation