# Need Call Statistics report of RPC server

**URL:** <https://techcommunity.softwareag.com/t/need-call-statistics-report-of-rpc-server/94274>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Remote-Procedure-Call-RPC\
**Created:** [August 4, 2010, 4:45am UTC](https://techcommunity.softwareag.com/t/need-call-statistics-report-of-rpc-server/94274 "2010-08-04T04:45:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [August 4, 2010, 4:45am UTC](https://techcommunity.softwareag.com/t/need-call-statistics-report-of-rpc-server/94274/1 "2010-08-04T04:45:14Z")

</div>

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

```auto
//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.

```auto
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.

```auto
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

```auto
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.

```auto
STACK=(LOGON library,user,pswd;RGZCSIN;RGZCSPGM)
```

```auto
1Test mode started.           
1Call statistics started.     
1Page 1                  
0LIB : RGZLIB PROG: RGZCSPGM
 LIB : RGZLIB PROG: RGZCSSB1 
 LIB : RGZLIB PROG: RGZCSSB2
```

CMHCOPY contains:

```auto
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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/need-call-statistics-report-of-rpc-server/94274/2 "2021-04-02T14:58:50Z")

</div>


