InstallingNext"

Chapter 1: Welcome!

Welcome to Micro Focus Object COBOL for UNIX! With this powerful set of software tools you can develop COBOL applications for a variety of UNIX operating systems.

You can easily migrate COBOL applications from many other systems and dialects, including IBM mainframe COBOL.


License Agreement: A number of items in this product, which are needed for running application programs, can be shipped on to your customers provided an appropriate license fee has been paid. You must not ship on any other items from this product. Please see the section Shipping Components to Users, and refer to the license agreement supplied with this product.


1.1 This Book

This book should be the first you read on receiving Micro Focus Object COBOL. Provided you are familiar with COBOL and your operating system, this book is all you need to read to start preparing and running programs.

It also gives an overview of the system, enabling you to find your way around the other books provided with Object COBOL.

The chapters in this book are as follows:

In addition, an appendix gives details of product support.

1.2 Object-oriented Programming

The COBOL language in Object COBOL has language extensions to enable you to use object-oriented programming methods in COBOL. Object-oriented programming is explained in OO Programming with Object COBOL. It is not covered in this Getting Started book.

You can of course use traditional COBOL programming instead of the object-oriented style if you prefer.

1.3 What's in Object COBOL?

Object COBOL includes the functionality and tools that were previously in Micro Focus's COBOL, Toolbox and Dialog System products, with the additional benefits of COBOL language extensions for object-oriented programming.

The most important parts of Object COBOL are:

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, command line interfaces are available. Notable are:

1.3.1 How You Use Object COBOL

The main functions of Object COBOL are presented to you through a menu displayed by the Object COBOL 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 Object COBOL 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 Object COBOL 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.

1.3.1.1 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 Object COBOL 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.

1.3.2 Application Server

Together with Object COBOL you receive a group of components called the Application Server. 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.

The Application Server is also known as the Operating System Extensions (OSX).

1.3.3 How You Use Dialog System

First you invoke the definition software. You use this rather like an editor, but you use it to create and update screensets. You specify the appearance of the user interface for the application by "painting" the screen, that is, using the keyboard to lay the screen out just as it should look. Then you specify data items to contain the screen data, and you specify actions to be taken in response to particular keystrokes. The screen layout, together with its associated data items and actions, is known as a screenset. The screenset is stored in a file, in a format internal to Dialog System.

As well as maintaining the screenset, you can make the definition software generate a copyfile (also called a copybook) containing COBOL data descriptions of the data items you have defined.

You write your application program to process data entered by the operator on the screens you have defined. You include the copyfile in the Working-Storage Section of your program. To send data to, or get data from, the screen you simply set data items defined in this file, and then call the Dialog System run-time system, passing it these data items as parameters. The Dialog System run-time system performs all screen handling, and when it returns you find the data items set according to what happened during the user interaction.

Typically, the application program you write is function-driven; that is, it has a main loop in which each iteration of the loop begins with a call to the Dialog System run-time system, followed by code that takes different actions depending on what the operator entered during the interaction.

Because the design of the interface is separated entirely from your application program, you can re-design the interface whenever you want without altering your application at all. You can even provide several alternative interfaces; to use a different one you simply make a different screenset available at run time.

1.4 Component List

The following is an alphabetical list of the major tools in Object COBOL.

Most of these can be accessed from within Object COBOL's integrated environment, but a few can be run only from the operating system prompt.

Analyzer

Analyzer monitors the frequency of execution of COBOL statements; this enables you to perform a coverage analysis. Analyzer can run either when you are using Advanced Animator (where the execution counts are displayed upon your screen) or when your program is running at full speed (where it produces a report of statement execution).

Animator

The Animator is a testing tool. It displays your source code on the screen and allows you to step through your program or execute it at a controlled speed. It highlights each statement as it is executed. You can start and stop execution, reset the position in the program, set breakpoints, query and change data items, monitor several data items at once, enter COBOL statements to execute, and interact with your program in many different ways.

The version included with Object COBOL is called Advanced Animator, and has the additional features provided by Structure Animator and Analyzer. You can switch these off if you want, thus getting Animator as in Micro Focus COBOL.

It also gives access to COBOL Source Information to give you extensive information about your source code and the ability to navigate your program efficiently.

See also the entry for Base Animator.

Application Configuration System

The Application Configuration System enables programs to use a standard configuration technique to control their behavior. This program is extensively used by Object COBOL itself and enables you to configure many of the tools described here.

Base Animator

The Base Animator is for use when you do not have enough memory to use the full Animator. It has all the same basic facilities, but some are restricted; for example, you can monitor only one data item at a time, and information such as the values of data items is displayed on the bottom line of the screen instead of in windows.

See also the entry for Animator.

Callable File Handler

The Callable File Handler is an interface to the File Handler enabling you to call it from your program using CALL statements (see the entry for the File Handler).

This gives you low-level control over files of all COBOL organizations, so you can write sophisticated file and database handling programs. You can also use it to access COBOL format files from other languages, such as C or Assembler.

Callable Sort Module

The Callable Sort Module is a stand-alone sort routine which enables you to sort and reorder data files. It is faster than the default COBOL sort mechanism. The CALL interface provides greater flexibility in sorting data and enables you to substitute alternative sort modules.

Class Library

The Class Library is a set of predefined objects which you can use as a foundation for building your own applications using object-oriented programming.

cob command

The cob command invokes all stages of compiling, generating and linking a COBOL application, including COBOL programs, C routines, assembler routines, and system libraries.

COBOL Editor

The COBOL Editor is an editor designed for the COBOL programmer. It is tailored for the creation of COBOL source programs, but can also be used for creating documentation and other text files.

You can invoke the Compiler and Animator from within the COBOL Editor, so it is an integrated environment for processing source code. You also have access to COBOL Source Information for more information about your programs, and the On-line Reference for more information about the COBOL language and system.

COBOL Source Information

The COBOL Source Information (CSI) functions let you perform a static analysis of your program source. The information provided includes extensive information about data items, copyfiles, sections and paragraphs in your program. These functions allow you to find your way around your source very quickly and are particularly useful for maintenance of existing programs. This information is available from within the COBOL Editor and Animator.

cobrun command

As an alternative to linking, you can have the Compiler produce your object code in a .gnt or .int file. You run this file using the cobrun command, which loads run-time support modules as necessary.

COBOL System Library Routines

The COBOL system library routines can be called directly from your program, providing many operations not available in the COBOL language itself.

Object COBOL has additional routines over those supplied in Micro Focus COBOL. The extra routines provide features needed for cross-system compatibility, such as generic screen attributes.

Common Communications Interface

The Common Communications Interface (CCI) provides a standard mechanism for communicating over networks using a variety of protocols. A program written to work with CCI will work with any of the protocols supported by CCI, simply by interchanging modules.

Communications Module

The Communications Module, also known as the Message Control System, is the logical interface between a COBOL program and the consoles to be controlled by the program.

Compiler

The Compiler checks that your program is valid COBOL and converts it into intermediate code in an .int file to be interpreted by Animator or the Run-time System.

Dialog System

Dialog System creates character-based user interfaces for your COBOL applications. All handling of the interface is done for you, leaving your program free to concentrate on processing the data.

DBCS Transparency Support

DBCS Transparency is a level of DBCS support that supports creating native language applications using DBCS code sets. You can use it under system locales such as, for example, Traditional Chinese, Simplified Chinese, and Korean provided you have them on your system. It enables you to use single- and double-byte character strings, using tools such as Animator, Editor and Screens to create and maintain application programs that support your native language.

Device Handling and Terminfo Support

Device Handling and Terminfo Support enables you to use UNIX devices with the run-time system and the run-time support modules.

Dialect Compatibility Tools

The Dialect Compatibility Tools are file conversion programs and documentation to help you convert source programs and files from other COBOL systems to work on this system.

Directory Facility

The Directory Facility is used by Object COBOL whenever you are prompted for a filename. It provides directory lists, listings of library files and file contents, deletion and renaming functions. You can call it directly from your program using CALL statements.

EBCDIC Support

The Object COBOL system provides support for EBCDIC data on UNIX systems, making the behavior of applications on your computer highly compatible with that on IBM mainframes. When you use this option, the program stores all data in EBCDIC, and operations such as comparisons and sorts use the EBCDIC collating sequence.

External File-name Mapping Support

File-name mapping enables you to alter the physical file-name accessed by your program at run time, assign files to UNIX pipes, assign the index and data files of indexed files to different directories, and assign a file to a printer.

File Handler

The File Handler is a module providing run-time support for COBOL files.

File Handler Utilities

The File Handler Utilities provide various functions for supporting COBOL files. There are utilities to: convert a file to a different type; inspect a file for consistency; build an empty indexed file; add or delete indexes; access file and index information; reindex a corrupt file; and reorganize an indexed file.

Fileshare Version 2

Fileshare V2 provides rapid network I/O by compressing I/O requests into packets and sending them across network lines, so that the file processing is done on the server that contains the files. It can also link several files together into a logical database. You can set up a recovery log when accessing that database, providing a high level of data integrity.

Fileshare V2 has transaction logging which allows your user to delay writing changes to files until all the information is complete. You can secure these changes with a COMMIT or cancel them with a ROLLBACK.

Forms-2

The Forms-2 utility enables you to design, create and edit interactive screen layouts for use with application programs that use Enhanced ACCEPT/DISPLAY syntax.

Generator

The Generator produces optimized native machine code from the intermediate code created when your program is compiled.

Header-to-copy

The Header-to-copy utility translates C-language header files into their equivalent COBOL copyfiles. Its main use is to simplify COBOL programming when using system libraries whose basic definitions are provided only for C programs. Examples are interfaces to OS/2 Presentation Manager, Windows API, UNIX TP systems and various relational databases on UNIX.

Help

Help provides information about the function keys on the menu you are using. It is present as F1=help on every menu.

Integrated Preprocessor Support

The Integrated Preprocessor is an extension to the Compiler. It allows the Compiler to invoke a user-defined language processor to convert non-COBOL syntax to COBOL syntax.

When using Animator you see the original source, as it is before statements are altered by the preprocessor.

Library

Library is a utility that groups individual files into one file, making them easier to administer.

Linein

The Linein program provides a simple mechanism that you can add to your programs or menus, for entering any text string. Many components of Object COBOL use it.

Menu Handler

The Menu Handler displays and processes menus. The menus of COBOL Object COBOL itself were created using it, and you can use its facilities to configure the menus of Object COBOL. It can also be called by your programs to enable you to present a sophisticated menu system with a minimal amount of programming.

National Language Support

National Language Support (NLS) enables your program to adapt itself automatically at run time to the character set, currency symbol, and editing symbols appropriate to your user's country. It also ensures correct collation and folding of national (for example, accented) characters, and provides library routines to fetch messages in the appropriate national language from a message file.

This facility depends on operating system support.

On-line Reference

The On-line Reference (OLR) is a quick reference guide that you can display on your screen. It contains quick-reference information such as directives and COBOL syntax, extracted from the printed books for Object COBOL.

The On-line Help System used to display the On-line Reference enables you to find information directly or via context menus, and to browse through the information or follow cross-references.

You can access the On-line Reference from the operating system prompt, and also from within the COBOL Editor and the Animator.

Panels

Panels is a set of routines that your application can call to use windowing on a character-mode screen. It allows overlapping windows, separate or synchronized updating of text and attributes, scrolling of text in a window, and the creation of popup or pulldown menus.

Profiler

The Profiler gives you detailed statistics on the run-time performance of a COBOL program.

Run-time Configuration Support

Run-time Configuration Support consists of environment variables and tunables in a run-time configuration file, which you can configure to affect certain run-time behavior.

Sample Programs

Many sample programs are provided to supplement the documentation of certain components and to demonstrate features in Object COBOL.

Screen and Keyboard Configuration Tools

The screen and keyboard configuration tools are utilities you can use to configure screen and keyboard handling to your own environment and requirements, or to be compatible with other COBOL systems.

Screen and Keyboard Handler

The Screen and Keyboard Handler, often known as Adis, is a module that provides run-time support for the enhanced (full screen) ACCEPT/DISPLAY verbs and Screen Section features available with this system.

Screen Painting Utility

With Screens, you can specify the layout of a form for displaying on the screen, by typing (often called "painting") it just as it will appear. Screens generates COBOL source code descriptions for you to include in the Screen Section of your program. Optionally it can create a complete program, called the Index Program, which you use to handle data via your forms.

Session Recorder

The Session Recorder enables you to record all keystrokes and screen images during the execution of your COBOL program. These screen images and keystrokes can later be replayed for demonstration use or compared with previous sets for use in the regression testing of interactive applications.

The Session Recorder provided with Object COBOL can only be used for character mode sessions.

Structure Animator

The Structure Animator is accessed from within the Animator. It displays the structure of the program as a block diagram in place of Animator's display of the source. Stepping through the program executes the program one block at a time, and Animator's debugging facilities are generally available but operating on blocks rather than individual statements.

Object COBOL Development Environment

The Object COBOL Development Environment is the name given to the set of menus through which you invoke the main components of Object COBOL.

Windowing Support

Windowing Support consists of COBOL syntax which enables you to draw lines and boxes on the screen and create virtual windows on a physical screen. The syntax also allows underlying displays to be kept and restored.

1.5 Documentation

The extensive documentation provided with this product ensures that users with special or advanced requirements can find the information they need. For normal use of the product, you need read only a small part of the documentation. This section describes the structure of the documentation and where to look for what you want.

1.5.1 Generic Documentation

Micro Focus COBOL systems are available for DOS, Windows, Windows 95, Windows NT, and OS/2 V2.1 or later, and for many varieties of UNIX. Both 32-bit and 16-bit versions are available (16-bit is not available on UNIX.)

Some books supplied with this COBOL system are generic - they can be used with the Micro Focus COBOL system on all supported environments. Other books are specific to your environment, but might contain some generic chapters.

In a generic book or chapter, information specific to one environment is shown by side headings in the margin. These are explained in the Preface. This is helpful if you are designing cross-platform applications, as you can see which features can be used on all environments.

The chapter Configuring Development Tools in this Getting Started book is an example of a generic chapter.

The following sections describe the books, and tell you which are generic.

1.5.2 Product-specific Books

The books in this section are specifically for Object COBOL for UNIX.

1.5.3 Programmer's Guides

The programmer's guides are generic.

1.5.4 Reference Books

The reference books are generic.

1.5.5 On-line Reference

As well as the printed books, you have an On-line Reference. This is a quick reference guide which is viewed on your screen. It contains directives, COBOL syntax, and other information about the system. The software that displays it uses hypertext technology which enables you to follow your own route through a hierarchy of topics and to follow cross-references. You can access it from the operating system command line and from within certain components such as the COBOL Editor.

1.5.6 Notation

The notation used for the syntax of commands is defined in the prefaces to the books, in a generic section. Wherever possible the books use this notation. Where special requirements make it necessary to use a different notation, the notation is explained in the place where it is used.

You may wish to look at the Preface to this book now to familiarize yourself with this notation.

The Language Reference and the Language Reference - Additional Topics use a different notation, explained in their own prefaces.

1.5.7 The Glossary

It is not always useful to define a term when it is first used, as readers may skip that passage in going straight to the passage containing the information they are looking for. Definitions of most terms have been collected in the Glossary in the Master Index and Glossary book.

1.5.8 On-disk Documents

Information that became available too late to go in the printed books is given in on-disk documents. These documents are plain ASCII text files, and can be accessed using a text editor or operating system commands.

There are two kinds of on-disk documents: release notes and on-disk supplements (ODSs). A release note contains individual entries giving technical or administrative information. An on-disk supplement is a complete chapter, or section for a chapter, forming the main documentation for a component.

The most important release notes are:

These files are in the docs subdirectory of your COBOL system directory.

To find your way around the on-disk documents, start at the Main Release Notes document. Its file-name is readme.1.

1.6 Other Important Information

This section gives further information that you need to be aware of.

1.6.1 Shipping Components to Users

If you are writing applications to ship to end-users, you need to include licensed run-time support modules necessary to run them. This section details which components Micro Focus licenses you to ship to your users.

1.6.1.1 Application Server

When you create an application to ship to your users, you can include any of the Application Server components with it, provided you pay the appropriate license fee to Micro Focus. Alternatively, you or your users can buy Application Server from Micro Focus.


License Agreement: The components that constitute the Application Server (also known as the Operating System Extensions) can be shipped on to your customers only if an appropriate license fee has been paid. You must not ship any other items from this product. Please refer to the license agreement supplied with this product or see your Sales Representative for further information.


1.6.2 Early Release

Micro Focus sometimes includes new features as Early Release. These are selected features, being developed for future Micro Focus products, which have reached a sufficiently advanced stage for us to make them available for you to investigate. We believe they will be of great interest and value to you in their current form.

In general, an Early Release feature is in an advanced state of development or in an early testing phase in preparation for future release, but has not undergone full testing and does not have full documentation.

Micro Focus introduces these Early Release features with the intent of making them fully supported features in future products. However, Micro Focus can make no commitment to this intent, or to retaining the features in their current form in any Micro Focus product.

These features do not generally appear in the books or the On-line Reference. They are normally documented in on-disk supplements.

1.6.3 Key Usage

Because UNIX terminals vary widely, the keys documented in the books may not be available on your keyboard. Also, most UNIX terminals do not send a sequence when the Alt or Ctrl key is pressed, so Object COBOL cannot detect these keys. The appendix UNIX Key Usage Chart in your Object COBOL User Guide lists alternatives for keys that may be undetectable on your specific UNIX terminal, and shows which keys you may be able to configure.

The appendix also tells you how to select soft or hard operation for the Alt and Ctrl keys. With soft operation, the Alt or Ctrl key is automatically turned off after the next keystroke. This means that whenever you want a function from the Alt menu you must hold down Alt again to get the Alt menu displayed; and similarly with Ctrl.

With hard operation, the Alt and Ctrl keys work in a similar way to the Caps Lock key, in that having been pressed they remain in effect until pressed again.

For information on configuring your keyboard, see the chapters Object COBOL Development Environment Menu System in your Object COBOL Character Tools and Keyboard Configuration Utility in your Programmer's Guide to Creating User Interfaces.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

InstallingNext"