|Using Application Server|
Server Express provides everything you need to develop COBOL applications to run on UNIX systems. It also provides for problem-free migration of COBOL applications from a large number of other systems and dialects, including IBM mainframe COBOL, and UNIX systems. Before reading this chapter you should have read your Getting Started, which tells you how to install the COBOL system and gives a brief overview of using it.
This chapter gives an overview of the steps required to create executable files from COBOL source code, and the tools available to help you develop applications. If you want to create object oriented COBOL programs, you need additional information; refer to your OO Programming with Object COBOL for details.
The basic steps in creating an application are:
You can debug your program at any stage in the application development cycle. Although you typically debug applications during application development in the edit-compile-debug cycle (steps 1 to 3 above), you can debug an executable program at any time, using the various debug facilities available in Server Express. This enables you to easily correct and maintain programs once they have gone into a user's environment.
Server Express provides tools and utilities to help you develop COBOL programs and applications. These are described in the following sections.
Creating and editing programs is one of the most basic functions you need when writing applications.
You can edit your programs using the Editor . The Editor is described in detail in the chapter Editor in your Utilities Handbook. Alternatively, you can edit programs using system editors, such as vi.
Before you can debug your program, you must check its syntax. Syntax-checking is the first phase of compilation.
The syntax-check creates:
These files can be used by Animator when debugging a program.
You check the syntax of your program using the cob command. See the chapters Creating Programs, Using the Compiler and COBOL System Interface (cob) for details on compiling and the cob command.
You can also check the syntax of your program from the Editor. The Editor calls the Compiler to check the syntax of a program. If the Compiler finds a syntax error it displays a message. When the syntax check is complete, the Editor returns to the editing screen and positions the cursor in the first error it found. When you have fixed the error you can move the cursor to the next error. See the Editor chapter in your Utilities Handbook for details.
Server Express provides Animator with which you can debug your programs. Animator offers a comprehensive debugging environment.
Animator shows you both the source code of your programs as they are running and the effect of each statement as it is executed. Debugging using Animator is also referred to as "animating".
When you debug a program using Animator you can:
To learn how to use Animator, follow the sample session described in your Getting Started. You can use Animator very effectively by knowing how to use the basic functions:
Monitor (on the Query menu)
When you are familiar with these and with using Animator, you should become familiar with the following additional functions:
For detailed information on using Animator, your Debugging Handbook.
When you have debugged your program you need to compile it to create an executable file format (the types of executable file are described in the section Executable File Types in the chapter Packaging Applications). For more details on how to create programs in particular executable formats , see the chapter Creating Programs.
Server Express offers alternative methods for packaging applications; each method has its advantages and disadvantages. The methods used to package applications are described in detail in the chapter Packaging Applications. You can package applications by:
Server Express enables all subprograms and support modules required by an application to be kept in memory. This avoids the need for the link to system executable step usually required to create an application. To use Server Express in this way, your programs must be compiled to callable shared objects, intermediate code or generated code.
Executable file formats are described in the chapter Packaging Applications.
You can simply ship the programs in your application as callable shared objects, intermediate or generated code files.
You can link a program, using cob, to create an executable file. Linking programs is a two stage process. First, the source code is compiled to create a file in object code format. The object code file is then linked to create a system executable file, a shared library, or a callable shared object. Linking is described in detail in the chapter Linking to System Executables.
Usually you compile and link in one step using the cob command.
When you have packaged an application using one of the methods described earlier in this chapter, you can run the application. An application can be run by typing the name of the system executable file at the command line. For example, if you have linked your application to create a system executable file myprog, this could be run by typing:
at the command line.
If your program reads the command line using an ACCEPT ... FROM COMMAND-LINE statement, enter the required command following the name. For example:
myprog in-file new-file
If your application is built using callable shared objects, or intermediate or generated code files, you might need to use the cobrun trigger. For example:
or, if the programs are multi-threaded:
When you have created and tested your application, you can, if necessary, ship it to your end-users. To ship an application, you need to ship all of the executable programs that make up your application, along with any configuration files and data files. You also need to ship Application Server, which contains all of the Micro Focus Server Express system files required by the application.
See the chapter Using Application Server for information on Application Server.
For more information, see the following chapters:
and the following books:
The chapter Sample Session in your Getting Started guides you through the development process using a tutorial.
Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
|Using Application Server|