Count your systems libraries

You Can View User Feedback To This Tip

Here's a simple CL program to count and print the number of libraries on your system. You should run this as part of your monthly security auditing and track in a monthly security audit spreadsheet. It can help you spot unexpected activity and document increased system usage.

  PGM
DSPOBJD    OBJ(*ALL) OBJTYPE(*LIB) OUTPUT(*OUTFILE) +  
             OUTFILE(QTEMP/#OFLIBS)  
RUNQRY     QRYFILE((QTEMP/#OFLIBS)) OUTTYPE(*PRINTER) +
             OUTFORM(*SUMMARY)
ENDPGM 
USER FEEDBACK TO THIS TIP

  • Just an FYI, the 'Back door to get command line access' trick will only work on OS/400 V4R4 and below. The V4R5 implementation has removed this back door. —Dave Barth


This was first published in June 2001

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.