%META:TOPICINFO{author="ChrisBartram" date="1149892988" format="1.1" version="1.1"}% %META:TOPICPARENT{name="Hp3000MpexXeqs"}%
comment +----------------------------------------------+
comment | The following MPEX command file uses |
comment | DBGENERAL to reduce empty datasets to a |
comment | capacity of one (or the lowest blocking |
comment | factor on detail datasets.) |
comment | |
comment | Sometimes applications have modules no one |
comment | uses or there are test databases that have |
comment | parts no one will ever use. Additionally |
comment | they may have been cloned "en masse" and |
comment | erased for use in another account. Those |
comment | new accounts having a lesser requirement |
comment | for some datasets than the parent. Over |
comment | time, the cloned, non-used datasets will |
comment | sit there with a large capacity and zero |
comment | entries. If you're a small site, manual |
comment | maintenance of this may not be a problem. |
comment | However if you have a large number of |
comment | databases the following may help. |
comment | |
comment | This was designed at a MANMAN shop. The |
comment | know "ASK" database password was used as the |
comment | default. The new capacity as a parameter |
comment | was also added in case you prefer to force |
comment | the capacity to another number. |
comment | |
comment | It uses MPEX's REPEAT/FORFILES to modify only|
comment | empty datasets. Detail datasets are done |
comment | first, Master datasets are done second. |
comment | This was done because the DBGENERAL prompts |
comment | of Masters and Detail datasets are different.|
comment | |
comment | MPEXs DBGENALT command only is useful if you |
comment | have at least one entry in a dataset because |
comment | it works on percentage of fullness. Not |
comment | useful when the number of entries is zero. |
comment | |
comment | Tracy Johnson, 30 July 1999. |
comment +----------------------------------------------+
parm dbname newcap="1" dbpass="ASK"
OPTION LIST
runcreate dbgenrl.pub.bradmark
runinput YOUR_DBGENERAL_PASSWORD
repeat
SETVAR DBSET VEFINFO("!mpexcurrentfile").DBSETNAME
runinput 3.5
runinput !DBNAME
runinput !DBPASS
runinput Y
runinput !DBSET
runinput !NEWCAP
runinput Y
runinput
forfiles !dbname@(dbsettype="D" and dbsetentries=0)
runinput E
runactivate
runcreate dbgenrl.pub.bradmark
runinput LUCAS2
repeat
SETVAR DBSET VEFINFO("!mpexcurrentfile").DBSETNAME
runinput 3.3
runinput !DBNAME
runinput !DBPASS
runinput Y
runinput !DBSET
runinput !NEWCAP
runinput 4
runinput
forfiles !dbname@(dbsettype<>"D" and dbsetentries=0)
runinput E
runactivate
-- Main.ChrisBartram - 09 Jun 2006