Getting Started with TRANSACT (32247-90007)
148 Chapter8
Special Topics
Test Facility
Test Facility
Transact provides an extensive test facility to aid in the debugging of a program. The
Transact Reference Manual provides a detailed description of this facility.
Three of the options that provide the answers to most debugging problems are options 25,
34, and 42. Option 25 provides information whenever a database or file access occurs.
Option 34 provides information whenever a VPLUS action occurs and option 42 provides
information whenever the data storage description changes.
Depending on the program being debugged and the test option chosen, Transact may
display a considerable amount of data for you. Another useful option which helps reduce
the amount of data displayed is to indicate a range of internal location reference numbers
where the display is to occur. Data is then displayed only when the program is executing
within the range specified. Before using this option, you must first compile your program
with the LIST option in order to get a listing of internal location reference numbers.
The test facility by default displays the data on your terminal. Quite often, it is desirable
to direct the data to a file so as not to interfere with terminal activity. This is especially
true when debugging a VPLUS program. The file designator used for displaying test
facility results is TRANDUMP. The default of the terminal can be altered to some other
device, typically a spooler file by doing two things. First set up a file equate such as:
FILE TRANDUMP;DEV=LP,1
Second, when specifying the option desired to the test facility, precede the option with a
minus sign.
Below is an example of debugging a VPLUS program with test option 34 and directing the
output to a spooler file. First, the program is compiled to get the internal location reference
numbers, then the file equation is entered to direct the test results to the TRANDUMP file.
When the program is run, test mode 34 is specified, and the debugging range is limited to
the update-customer paragraph (internal location reference numbers 21 to 28). The last
step is to look at the SPOOK output.
:run trancomp.pub.sys
TRANSACT/3000 COMPILER HP32247A.02.02 - (C) Hewlett-Packard Co. 1984
SOURCE FILE> ex74
LIST FILE>
CONTROL>
TRANSACT/3000 COMPILER A.02.02 : MON, MAR 18, 1985, 8:11 AM COMPILED
LISTING OF FILE EX13.HOWTO.MILLER PAGE 1
COMPILING WITH OPTIONS: LIST,CODE,DICT,ERRS
1.000 system ex74,base=orders,vpls=formfile;
2.000 0000 list(auto) customer;
3.000 0005 level;
4.000 0006 get(form) mainmenu,f1=add-customer
5.000 0006 ,f2=update-customer
6.000 0006 ,f3=report-customer;