Chapter 3. Program Development Cycle

Table of Contents

Logical Names
Commands and Symbols
Preparing the Database
Creating and Editing a Source Program
Compiling a Source Program
Creating a Library
Controlling Run-time Parameters
Linking
LINKing from DCL
Executing from DCL

This chapter introduces program development in the GT.M environment. The GT.M environment differs from other M implementations in a number of ways. These differences, which include maintaining data and code in separate files and compiling rather than interpreting source code, allow greater programmer control over the development cycle.

In contrast to M environments that interpret M code, GT.M compiles M code from source files into the object files. These object files can be directly linked into an image, permanently or dynamically. Source files and object files are independent of one another. Since GT.M permits access to source and object files in multiple directories. they may be managed independently or all placed together in a specific directory.

GT.M databases are RMS files identified by a small file called a Global Directory. Global Directories allow management of the database files to be independent of the placement of files containing M routines. By changing the Global Directory, you can use the same programs to access different databases.

Program development may utilize both GT.M and VMS development tools. The development methodology and environment chosen for a particular installation, and tailored by the individual user, determines the actual mix of tools. These tools may vary from entirely GT.M with little VMS, to mostly VMS with a modest use of GT.M.

Direct Mode serves as an interactive interface to the GT.M run-time environment and the compiler. In Direct Mode, the user enters M commands at the GT.M prompt, and GT.M compiles and executes the command. This feature provides immediate turnaround for rapid program development and maintenance.

This chapter is based on the tasks that a programmer might perform while developing an application. It provides a "road map" for programmers of varying levels. Some steps may be unnecessary in your environment, so feel free to skip sections that do not apply to your situation.