Introduction MTB Statements File System Compiler Applications Reference Guide Index

Overview Creating MTB Source Programs Compiling MTB Programs Compiler Directives Special Characters

Creating MTB Source Programs

MTB source programs are created in one of two ways. While working in the Comet environment, the Comet editor utility (a program named CED) may be used to create an MTB source program. Outside of the Comet environment, virtually any text editor or word processor may be used to create an MTB source program.

The MTB compiler recognizes Comet editor files and text files as source files, so feel free to choose the editing method you prefer.

The CED program creates a Comet keyed file with a record size of 94 bytes and key size of 7 bytes. The data records contains MTB statements (up to 80 bytes) followed by an exclamation mark and 7 bytes representing the editor line number. The associated key contains the editor line number as well.

Source programs created outside of the Comet environment are created as "text" files. In this case, the compiler reads up to 132 characters per source line. Note: If you create your MTB source programs as text files, you must register them in the Comet directory file (QDIR) before you compile the program. Refer to the DIRMAINT utility program for additional information.

Many MTB programs employ a convenient feature of the MTB compiler, the inclusion of compiler commands in the source program itself. Therefore, some of the examples in this documentation include lines at the beginning of the program -- commands that are processed by the MTB compiler during the compilation of the program.

Also see Compiling MTB Programs.