NetBase for MPE Reference Guide
Chapter 13
13-8
NBTRACE
NBTRACE.PUB.NETBASE records an application’s activity from NetBase’s viewpoint. With NBTRACE
you can see which calls are being intercepted by the NetBase shell, which ones are successful, and
which ones fail. NBTRACE can help identify the exact file not found by identifying which FOPEN
failed and what it was attempting to open.
NBTRACE is enabled by setting a JCW for the session. It logs its results to NBATnnn.IPC.NETBASE
files, where nnn is the process number. Most file system and all IMAGE intrinsics intercepted by
NetBase are recorded. If you perform a trace on a CM program, and none of its calls are in the
resulting trace, NetBase may not be enabled. To verify, run NBVERS.PUB.NETBASE,STATE.
To use NBTRACE:
1. To start the trace, set a JCW:
:SETJCW NBDISABLE=WARN
2. Run your application.
3. Reset the JCW as follows:
:SETJCW NBDISABLE=0
4. Run NBTRACE to convert the results into a readable format. The results are in a message file, so
you may want to redirect the results to a spool file in order to review the information more than
once.
:FILE QUEST;DEV=LP,1
:RUN NBTRACE.PUB.NETBASE,USER;PARM=1 >*QUEST
The trace files are NBAT####.IPC.NETBASE (five files). If the program that is being traced
creates a son process, then NBAT0001 contains the father process and NBAT0002 contains the
trace for the son process. The ;PARM=# indicates the trace file to view.