I am trying to log Debugger’s “call statistics” from a Natural batch RPC server. I used SYSRPC to set-up several subprograms for access from an on-line session. To keep things simple, I set NTASKS=1 in my RPC parameters. I initialize Debugger as the RPC server comes up via the STACK parameter. The JCL includes
//CMPRINT DD SYSOUT=* NATURAL LOG
//CMPRT10 DD SYSOUT=* SERVER LOG
//CMHCOPY DD SYSOUT=* CALL STATISTICS
//TRACE1 DD SYSOUT=* SERVER TRACE
//CMPRMIN DD *
STACK=(LOGON library,user,pswd;RGZCSIN)
/*
RGZCSIN invokes Test Mode and starts Call Statistics.
STACK TOP COMMAND "TEST SET CALL ON" /* CALL Statistics
STACK TOP COMMAND "TEST ON" /* Test mode
END
To print the statistics, I invoke subprogram RGZCSPR via RPC. RGZCSPR also includes a CALLNAT to USR600N.
DEFINE DATA LOCAL
1 #M (A8/32) (HD='Module')
1 #L (P3/32) (HD='Lvl')
END-DEFINE
WRITE '=' *LIBRARY-ID '=' *PROGRAM 'print'
STACK TOP COMMAND "TEST PRINT CALL"
CALLNAT "USR0600N" #M (*) #L (*)
DISPLAY (ES=T ZP=F SG=F) #M (*) #L (*)
STOP
END
With this set-up, no RPCs are included in the Call Statistics report, nor are lower-level CALLNATs, nor are programs which are invoked within the subprograms via FETCH RETURN.
CMPRINT contains
1Test mode started.
1Call statistics started.
1Page 1
0 Module Lvl
-------- ---
0LIB : RGZLIB PROG: RGZCSPR print
RGZCSPR 2
NATSRVD 1
but CMHCOPY is empty.
When I change the STACK parameter to include one more program, say RGZCSPGM, that program, plus its CALLNATs are included in the report.
STACK=(LOGON library,user,pswd;RGZCSIN;RGZCSPGM)
1Test mode started.
1Call statistics started.
1Page 1
0LIB : RGZLIB PROG: RGZCSPGM
LIB : RGZLIB PROG: RGZCSSB1
LIB : RGZLIB PROG: RGZCSSB2
CMHCOPY contains:
112:26:05 ***** NATURAL TEST UTILITIES ***** 08/03/2010
Library RGZLIB - Print Called Objects - Object *
Page 1
Object Library Type DBID FNR S/C Ver Cat Date Time Calls
RGZCSPGM RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 1
RGZCSSB1 RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 1
RGZCSSB2 RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 1
It would appear that logging begins with level 1 modules in the RPC server. But, if I invoke any of the logged subprograms via RPC (eg RGZCSSB2), those RPC calls are included in the statistics.
112:39:13 ***** NATURAL TEST UTILITIES ***** 08/03/2010
Library RGZLIB - Print Called Objects - Object *
Page 1
Object Library Type DBID FNR S/C Ver Cat Date Time Calls
RGZCSPGM RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 1
RGZCSSB1 RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 1
RGZCSSB2 RGZLIB Program 112 205 S/C 4.2 2010-08-03 10:13 2 <<<<<<<<<<
Is this a bug? To me, it doesn’t indicate a C/E. In either case, my Technology Partner status does not authorize me to log this formally in Empower, and there are too many levels of bureaucracy to ask my client to ask their data center support to call SAG. Perhaps a Forum Moderator (Wolfgang Weil?) could assist.