Getting Started with TRANSACT (32247-90007)
16 Chapter1
Getting Started
Compiling and Executing Transact Programs
Let’s look at what is happening in the above example on a line by line basis.
1 By default, the compiler TRANCOMP expects the user dictionary to be in
the PUB group of the logon account. We are changing the default to be the
logon group by issuing a file equation.
2 We run the Transact compiler to transform the source input into
intermediate code which can then be executed using the processor (see line
18 below).
4 The compiler asks for the name of the file containing the source code to be
compiled. The source code was previously entered by using a text editor
such as EDIT or TDP.
5 By default, the compiler listing goes to $STDLIST (the terminal in this
case). To override the default, we could have entered the name of a file or
directed the output to the printer.
6 The compiler has many options which can be entered at this prompt.
These options control, for example, whether an object file is created, the
format of the listing generated, ways to optimize code generated so as to
conserve resources, such as stack usage, and so forth.
No options are required. Quite often, you will probably not want to see the
compiled listing. You can keep the listing from printing by responding
NOLIST.
9 Since we entered no options, TRANCOMP uses the default options, which
are shown here. LIST means that a listing will be generated, CODE calls
for the generation of an object or code file, DICT specifies that a dictionary
is to be used to resolve file and element definitions, and ERRS means that
we want to see a listing of any compiler errors.
10 Lines 10 through 12 are the compiler listing. In this example, the listing
consists of the source line number, an internal location reference number
that is used when test modes are in effect to debug a program, and the
source text.
18 At this point we run TRANSACT. The compiler does not create a true
object or program file like that produced by COBOL or PASCAL. It creates
what is called an intermediate processor code file. TRANSACT interprets
the contents of this file and performs the functionality of our source
program.
20 The processor asks for the name used in the SYSTEM statement of the
source program. It uses this name to figure out the name of the MPE file
that contains the intermediate processor code. The MPE file name is
always in the format IPname where name is the name used in the
SYSTEM statement. For this system, the name is IPEX1.