3k Associates Inc HP3000 FAQ TWiki TWiki > TWiki > Hp3000CommandFiles > Hp3000MpexXeqs > Hp3000MpexXeqCheckcapCmd TWiki webs:
Main | TWiki | Sandbox
TWiki . { Welcome | Register | Changes | Topics | Index | Search | Go }

##  CHECKCAP.CMD - MPEX DBCAPACITY CHECKER
##  Written by Adrian Partridge
##  FEB 1995 GSL - http://WWW.GAINSBOROUGH.COM/
##
##  DBCAPACITY CHECKER simply goes through all databases on your system,
##  reporting on any datasets that are gt 70% full.

REPEAT
 ECHO
 ECHO Checking capacity of datasets in database ![MPEXCURRENTFILE]
 SETLVAR ROOTDB TOKEN(MPEXCURRENTFILE,'.')+'@.'+REMTOKEN(MPEXCURRENTFILE,'.')
 REPEAT
  IF BETWEEN(RFILE.DBSETFULLNESS,.7,.8) THEN
   ECHO ![STRWRITE('Note    - dataset ',RFILE.DBSETNAME,&
     ' is ',ROUND(RFILE.DBSETFULLNESS*100),'% full')]
  ELSEIF RFILE.DBSETFULLNESS>.8 AND RFILE.DBSETFULLNESS<1 THEN
   ECHO ![STRWRITE('Warning - dataset ',RFILE.DBSETNAME,&
     ' is ',ROUND(RFILE.DBSETFULLNESS*100),'% full')]
  ELSEIF RFILE.DBSETFULLNESS=1 AND RFILE.DBSETCAPACITY<>1 THEN
   ECHO ![STRWRITE('Error!  - dataset ',RFILE.DBSETNAME,&
     ' is full!')]
 ENDIF
 NOMSG FORFILES !ROOTDB(DBSETENTRIES>1 AND INTCODE=-401 AND DBSETFULLNESS>.7)
FORFILES !["!DBFILESET(INTCODE=-400)"]

-- ChrisBartram - 09 Jun 2006



Topic Hp3000MpexXeqCheckcapCmd . { Edit | Attach | Backlinks: Web All webs | Printable | History: r1 More }
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.Hp3000MpexXeqCheckcapCmd