Trace Master
Trace Master
Trace Master
Declaration
I/We hereby declare that this document is based on our personal experiences and /
or experiences of my/our project members. To the best of our knowledge, this
document does not contain any material that infringes the copyrights of any other
individual or organization including the customers of Infosys.
divya_manjari
Project Details :
Keywords:
mainframe,COBOL,CICS,debugging,Tracemaster,tools
Introduction:
TRACEMASTER is a tool for debugging and testing COBOL and assembler sources in
mainframe. This document explains the step by step procedure for debugging the
CICS program in CICS and the cobol program in foreground mode.
STEP 1
Compile and link the program for trace master – First of all we need to do some
preparation for testing the program in Tracemaster.We need to create a symbol file
for Tracemaster. Hence, for running a program using Tracemaster, the program needs
to be compiled in a modified manner. The JCL ,Procedure or macros for compilation
needs to undergo following changes:
o Change the program for compilation
IGYCRCTL à XT00VSC2 (Cobol II)
IKFCBL00 à XT000SCB (OS/VS Cobol)
o Add symbol library
prefix.symbol.library(program name)
o Add trace master load library
prefix.XTRESLIB – It should be trace master load library name
specified during installation.
Example: The existing macro for compiling a cobol program has following step:
STEP 2
Load the programs and symbol files through CICS Trace master menu – After
compiling and linking the program, following steps needs to be followed to load the
program :
o do a new copy of the program in CICS screen.
o Type the transaction ID for Tracemaster on CICS Screen.Default is XXT0.
o When you are entering the Tracemaster menu for the first time, go to
‘PROFILE’ option and set the symbol library(prefix.symbol.library ->same
as in compilation procedure).Also set the Display format as
‘C’(character).Save and exit to Tracemaster main menu.
STEP 3
Set the breakpoints – After loading the program, set the breakpoints in the
program, wherever required.
It can be done in following ways
Place the cursor on line and press PF14
BP line number
BP Paragraph name
In the following screen shots two breakpoints are set.
STEP 4
Run the transaction and Debug – Now the program is ready for debugging. Come
out of Tracemaster menu (use exit, not Log-off) and type the transaction id to run
the program to be tested. After the encounter of first break in the program the
Tracemaster screen would be displayed. From here you can execute the program in
debugging mode.You can press PF1 and use the help for PF keys and commands to
be used.Some of the basic functionalities:
• For executing line by line use PF12.
• Run/conditional run by PF10
• To see the value of a variable, place the cursor on it and press PF6
STEP 5
Log off – Enter ‘Abend’ command to terminate the program
Abend x(any arbitrary character)
‘End’ command would only return back to the trace master menu.
Remember to log off from trace master to free the resources
STEP 1
Compile and link the program for trace master – It would be same as that for
CICS program. You need to make same changes in the compilation JCL procedure.
STEP 2
Set Default libraries – Open trace master menu by typing ‘TSO TRMAST’ command
or using ISPF options( For example:option A.16 from ISPF panel brings the
Tracemaster menu)
First time users should set the default libraries using option 0(OPTIONS)on
the menu.ASR,profile and macros libraries are mandatory. For setting a library
enter the corresponding number ahich would display the following screen.
Here enter the dataset name as ‘prefix.XTASR’ or simply XTASR. If the quotes are
dropped, the prefix would be the default prefix. The default prefix could be
changed using option 1(General Options) which is by default your userid. If the
dataset does not exist then a screen for new dataset creation would appear:
You need to fill in the required information.After setting all the libraries, the
libraries would be shown in current library definitions.
STEP 3
Set symbol library and Convert the JCL – Now go back to the main menu
and enter the option for foreground testing.
Here select option 5(Symbols) and give the symbol library name(same as used in
the compilation JCL)
After setting the symbol library use option 3 for converting the JCL which
executes the program for Tracemaster.Specify the member and the PDS and
press enter to get the following screen.
It would list all the steps of the JCL. Select the program to be debugged by
putting S in front of the step executing the program and press PF3.
STEP 4
Run in debug mode - : Now press option 10 (Run Test) to run the program in
debug mode.The screen with source code would be displayed.
Here, you can set the breakpoints and start executing the program by pressing
PF12 or typing RUN command on command line. Other options are same as those
in CICS.
After the testing is over, exit by typing ‘END’ command.