Article
· Sep 12 2m read

Code Scanner - enhanced

During testing the added Multi-Namespace feature I met a challenge
that required intervention. This simple request created 1000 lines of output.

USER>do ^rcc.find
----------------
 
enter search string [$ZU] <blank> to exit:
          Verbose? (0,1) [0]:
          Force UpperCase? (1,0) [1]:
 
enter code type (CLS,MAC,INT,INC,ALL) [ALL]:
 
select namespace (ALL,%SYS,DOCBOOK,ENSDEMO,ENSEMBLE,SAMPLES,USER) [USER]: all
  • As for the verbose variant you my run a log on your terminal to keep the result in details
  • though a real summary was still missing.

So I decided to append a very condensed statistic to the summary line

;;; skipping ~1000 lines of output
** 0 INC in Namespace USER**
 
** 1206 ** ALL total in Namespace USER
 
** 90120 ** total in ALL Namespaces
sub("%SYS")=10975
sub("%SYS","CLS")=2631
sub("%SYS","INC")=1433
sub("%SYS","INT")=6911
sub("%SYS","MAC")=0
sub("DOCBOOK")=27
sub("DOCBOOK","CLS")=27
sub("DOCBOOK","INC")=0
sub("DOCBOOK","INT")=0
sub("DOCBOOK","MAC")=0
sub("ENSDEMO")=45924
sub("ENSDEMO","CLS")=172
sub("ENSDEMO","INC")=10
sub("ENSDEMO","INT")=45687
sub("ENSDEMO","MAC")=55
sub("ENSEMBLE")=31504
sub("ENSEMBLE","CLS")=172
sub("ENSEMBLE","INC")=10
sub("ENSEMBLE","INT")=31280
sub("ENSEMBLE","MAC")=42
sub("SAMPLES")=484
sub("SAMPLES","CLS")=475
sub("SAMPLES","INC")=0
sub("SAMPLES","INT")=6
sub("SAMPLES","MAC")=3
sub("USER")=1206
sub("USER","CLS")=11
sub("USER","INC")=0
sub("USER","INT")=1192
sub("USER","MAC")=3
----------------

This summary I attached to the end show how and where the
90000+ hits are distributed. 

It works with the ALL namespace selection also for single code types

enter search string [$ZU] <blank> to exit:
          Verbose? (0,1) [0]:
          Force UpperCase? (1,0) [1]:
 
enter code type (CLS,MAC,INT,INC,ALL) [ALL]: mac
 
select namespace (ALL,%SYS,DOCBOOK,ENSDEMO,ENSEMBLE,SAMPLES,USER) [USER]: all
 
** Scan Namespace: %SYS **
 
** MAC **
 
** 0 MAC in Namespace %SYS**
 
** Scan Namespace: DOCBOOK **
 
** MAC **
 
** 0 MAC in Namespace DOCBOOK**
 
** Scan Namespace: ENSDEMO **
 
** MAC **
** 1      Ens.BusinessMetric.G1
** 41     EnsMONLBL
** 13     build
 
** 55 MAC in Namespace ENSDEMO**
 
** Scan Namespace: ENSEMBLE **
 
** MAC **
** 1      Ens.BusinessMetric.G1
** 41     EnsMONLBL
 
** 42 MAC in Namespace ENSEMBLE**
 
** Scan Namespace: SAMPLES **
 
** MAC **
** 3      rcc.find
 
** 3 MAC in Namespace SAMPLES**
 
** Scan Namespace: USER **
 
** MAC **
** 3      rcc.find
 
** 3 MAC in Namespace USER**
 
** 103 ** total in ALL Namespaces
sub("%SYS","MAC")=0
sub("DOCBOOK","MAC")=0
sub("ENSDEMO","MAC")=55
sub("ENSEMBLE","MAC")=42
sub("SAMPLES","MAC")=3
sub("USER","MAC")=3
----------------

try on Demo Server

Demo Server SMP
Demo Server WebTerminal
 

Discussion (0)2
Log in or sign up to continue