Executing Transact/V Programs [ HP Transact Documentation Update Notice ] MPE/iX 5.5 Documentation
HP Transact Documentation Update Notice
Executing Transact/V Programs
This section describes how to execute Transact programs and explains how
to control input to and output from the Transact processor.
Transact programs are executed (the p-code is interpreted) by running the
Transact processor with the MPE V RUN command:
:RUN TRANSACT.PUB.SYS
After an acknowledgement message, Transact issues the following prompt:
SYSTEM NAME>
Respond by entering the program's name as specified in the SYSTEM
statement of the program you want to execute. In addition to this
required response, you can specify one or more optional responses
separated by commas. These optional responses specify the mode with
which you want to open a database, and the test mode in which you want to
execute, followed optionally by the locations where you want testing to
begin and/or end. The syntax of a full response to the SYSTEM NAME>
prompt is:
program-name [,mode [,test-mode [,start [,end ]]]]
where:
program-name The name of the program as it appears in the SYSTEM
statement in the source program (required).
mode The mode to be used in opening any databases specified
in the program. The mode consists of a single digit
indicating one of the open modes to be specified for
DBOPEN. If you do not specify a mode here or in the
SYSTEM statement of your program, Transact opens the
databases in mode 1. Mode 1 requires locking and allows
concurrent modifications to be made to a database. Any
mode specified in the SYSTEM statement of the program
takes precedence over a mode specified here. See the
discussions in Chapter 6 on database access and
understanding locking.
test-mode The test mode you want to use to debug your program.
Test modes are indicated by a one or two digit number.
(The exact meaning of each test mode is explained in
Chapter 10.)
start The location where you want testing to begin. This is
the internal location number of a line of processor
code, optionally preceded by a segment number if it is
in a segment other than segment 0. (See "Compiler
Listing" in this chapter.)
segment number.start.
end The location where you want testing to end. Specify as
the internal location number of a line of processor
code, optionally preceded by a segment number if end is
in a segment other than segment 0, in the format:
segment number.end.
For example, suppose you want to open any databases named in your program
in mode 3, and you want to execute in test mode 24 between internal
locations 0 and 8. Respond to SYSTEM NAME> as follows:
SYSTEM NAME> MYPROG,3,24,0,8
If the processor cannot find a p-code file associated with the program
name ("IPxxxxxx", where "xxxxxx" is the program name), it generates an
error message and reissues the SYSTEM NAME> prompt. If you respond with
a carriage return to the original or reissued prompt, control returns to
the MPE operating system.
You can use the INFO= option to bypass responding to the SYSTEM NAME>
prompt. This option enables you to specify a system name when you invoke
the processor:
:RUN TRANSACT.PUB.SYS; INFO="APPL01.SOURCE"
Note that the INFO= parameters are enclosed in quotation marks. When the
INFO= option is used, the SYSTEM NAME> prompt does not appear.
NOTE Unlike the programs developed and executed under MPE control, a
Transact/V program can only be executed by running the Transact
processor. You cannot execute a Transact p-code file with the MPE
RUN command.
After it locates the p-code file, the processor generates the following
prompt if databases have been defined in the SYSTEM statement and no
password supplied:
PASSWORD FOR databasename>
You must enter the correct password to open any databases so specified.
If the password is invalid, then you are prompted again for the correct
password. If you enter a carriage return in response to the second
prompt, control returns to the SYSTEM NAME> prompt and you can request
another program or specify other modes. Be sure to enter the password
exactly as it is defined. For example, if it is defined with all
uppercase letters, enter it in exactly that way.
Once your program is executing, you can redisplay the SYSTEM NAME> prompt
by pressing the Ctrl Y key to stop execution and get the > prompt.
Controlling Input Sources to the Transact/V Processor
TRANIN is the formal file designator for responses to prompts issued by
the processor. The default setting for TRANIN is $STDINX. You may,
however, use a file equation to change that. The processor will then
read input from the specified file or device until it encounters an
end-of-file condition. If it reaches end-of-file before all of the
prompts are answered, it returns to $STDINX.
[REV BEG]
When a file equation is set for TRANIN and a Transact program calls
Report, Inform, or another Transact program, TRANIN will continue to be
read. (When Report or Inform is initiated from the command interpreter,
it reads from REPIN or INFOIN, respectively.) The input device is only
opened once at the beginning of the main Transact program. Any called
system will share the input device or input file.[REV END]
TRANSORT is the name of the sort file opened and used by the processor.
The default size of this file is 10,000 records divided into 30 extents.
The size of this file can be altered by using the SORT= or WORKFILE=
options with the SYSTEM statement.
If a larger or smaller sort file is desired after the program has been
compiled, use a file equation to change the size. This will override the
settings in the SYSTEM statement. For example, to reduce the sort file
size to 5,000 records, use the following MPE FILE command:
:FILE TRANSORT; DISC=5000
Controlling Output Destinations from the Transact/V Processor
TRANLIST is the formal file designator for the destination of processor
output that is normally sent to the line printer. The default setting
for TRANLIST is DEV=LP. You can, however, change the list device by means
of a file equation. The file equation or the destination default is
activated by the PRINT option to a command or by a SET(OPTION) PRINT
statement.
TRANOUT is the formal file designator for output from the processor that
is normally sent to your terminal during a session or to the line printer
during a batch job ($STDLIST). You can direct such output to another file
or device by specifying TRANOUT in a file equation. If you do this, the
SYSTEM NAME> prompt and other processor output is sent to the specified
file or device. (Note that TRANOUT is also the file designator for
output from the compiler.)
TRANVPLS is the name of the file used by the processor to open the VPLUS
terminal. If VPLUS forms are to be directed to a device other than your
terminal during program testing, use a file equation to specify a
particular terminal. For example, suppose your terminal is logical
device 20 and you want the VPLUS forms displayed on another terminal,
logical device 40, use the following file equation:
:FILE TRANVPLS; DEV=40
[REV BEG]
If VPLUS is used in batch mode, TRANVPLS should be directed to a device
capable of handling VPLUS escape sequences or to $NULL.[REV END]
TRANDUMP is the formal file designator for the destination of test mode
output if you specify a negative test mode in response to the SYSTEM
NAME> prompt. Normally, test mode output is sent to your terminal in a
session or to the line printer in a batch job (TRANOUT). To send test
mode output to another device, specify TRANDUMP in a file equation. This
is particularly useful when you are using test mode with a program that
uses VPLUS, and you do not have another terminal handy for the VPLUS
forms.
For example, you can direct test mode output to the line printer as
follows:
SYSTEM NAME> VTEST,,-34 <---negative test mode directs
test output to TRANDUMP
You can also direct the test mode output to a disk file by equating
TRANDUMP with this file. For example, you can send your test mode output
to a file TEST with the following commands:
:BUILD TEST; REC=-80,,F,ASCII
:FILE TRANDUMP=TEST
:RUN TRANSACT.PUB.SYS
SYSTEM NAME> VTEST,,-34 <---test output goes to file TEST
Test mode output from the program VTEST is saved in the file TEST, which
can be examined or listed with a text editor after your program
completes.
A third method is to defer test mode output by setting the output
priority to 1. For example:
:FILE TRANDUMP; DEV=,1 <---priority 1 defers test mode output
:RUN TRANSACT.PUB.SYS
SYSTEM NAME> VTEST,,-34
After your program executes, you can run SPOOK5.PUB.SYS for MPE/V or a
text editor for MPE/iX to examine the test mode information saved in a
spool file.
MPE/iX 5.5 Documentation