In my spare time I created a script that will look at all files on a
particular volume set and display certain info about those files. (a
combination of listf,2 & listf,3)
We have several volume sets and at times they tend to fill up. This script
helps me track some of the files that are causing the problem. I know you
can do a listf,2 (in VESOFT) and gather this info but I only wanted to see
the files on a specific volume set.
There is an online help section that can be viewed by typing "discinfo ?" or
just "discinfo"
To specify a certain volume_set you would type 'discinfo ,VOL_SET' .
You can also specify a different date range, the default is any file that's
no more than 7 days old. To specify a different range type "discinfo
,vol_set,14"
To specify a different sector size (default is greater than 9999) type
"discinfo ,vol_set,,1000"
Don't forget the comma's !!
Feed back is appreciated.
ENJOY :)
If anyone has a better way I open to their ideas. There are two files
needed : discinfo & flimit1 (both are listed below). Before running
discinfo you must fully qualify the flimit1 file statement inside discinfo
or you will get errors displayed on your screen. The flimit1 line in
discinfo is 4 lines from the end; currently it points to flimit1.cmd.sys.
************************* HERE'S THE DISCINFO COMMAND SCRIPT
***************************
parm disc_group="@.@",disc_vol="",discday=7,discsect=9999
option nohelp nolist
############################################################################
#########
#
# This script uses a special vesoft script called flimit1. These two files
# should reside in a group who's path is defined by your hppath variable.
# In order to run you must have Vesoft's MPEX software.
#
# Files are:
# DISCINFO (this file)
# FLIMIT1 (when executed it will create a compiled file called
flimit18.grp.acct)
#
# NOTE: You must modify this script and fully qualify the flimit1 file
name.
# The line to modify is about 4 lines from the last line in the
script.
# If you don't you will get the following error on our screen.
# Bad %LISTF mode: (this will appear for every file that's
found).
#
############################################################################
##########
if '!disc_group' = "?" or ups('!disc_group') = 'HELP' or '!disc_vol'=""
echo ![chr(27)]&w6f132X
echo This script will allow you to see what files, on a specific volume
set, have
echo been created or modified since a specified date (which you can define)
and
echo only view those files with a sector size greater than '9999'
(default).
echo
echo Syntax for this script is:
echo variables in '( )' brackets have a default value, which you can
change.
echo variables in square brackets '[ ]' are required input.
echo
echo DISCINFO (group_set),[volume_name],(numer_of_days),(sectors)
echo Examples:
echo discinfo ,my_vol
echo shows all files on (my_vol) Volume_Set, created/modified since
(today-7), and sectors > 9999
echo
echo discinfo ,vol_2,28,4999
echo shows all files on Volume(vol_2), created/modified since
(today-28), and sectors > 4999
echo
echo FOR THOSE WITH 'SM' CAPABILITY
echo discinfo @.Test,my_vol
echo shows all files in the TEST account on (my_vol) Volume_Set
echo created/modified since (today-7) and sectors > 9999
echo
echo ![chr(27)]l
input disc_80;prompt = " Press the 'enter' key to put your screen back
to 80 columns"
echo ![chr(27)]&w6f80X
echo ![chr(27)]m
return
endif
if pos('SM','!hpusercapf') = 0 and pos('AM','!hpusercapf') = 0
echo
echo Sorry, you can't run this command
echo
return
endif
setjcw insidempex = 0
if insidempex = 0
run mpex.pub.vesoft;parm=1;info="!hpfile
!disc_group,!disc_vol,!discday,!discsect">$null
echo ![chr(27)]&w6f132X
if pos('AM','!hpusercapf')>0 and pos('SM','!hpusercapf') = 0
setvar disc_group="@"
echo
echo you can only view groups within
your own account
endif
echo
echo ========= &dBHere's the
results &d@ =========
echo Files Added/Modified since
!disc_date
echo Sectors > !discsect
print discf03,,,,0
echo
echo Press the 'enter' key to put your
screen back to 80 columns
input disc_80;prompt = " ** Some
of the data will disappear **"
echo ![chr(27)]l
echo ![chr(27)]&w6f80X
echo ![chr(27)]m
deletevar disc_@, @mpex@ >$null
setvar hpautocont false
else
setvar disc_day !discday
setvar hpautocont true
yespurge discf0#,temp >$null
file discf01,new;temp;dev=disc;msg;rec=-81,,f,ascii;disc=10000;nocctl
build discf02;temp;dev=disc;rec=-133,,f,ascii;disc=50000;nocctl;msg
file discfb=discf02,oldtemp;acc=append
build discf03;temp;dev=disc;rec=-133,,f,ascii;disc=50000;nocctl
file discfc=discf03,oldtemp;acc=append
veaudit listgroup !disc_group(homevolumeset=ups('!disc_vol')) >*discf01
setvar DISC_EOF veftempinfo('discf01').eof
echo ******* EXTRACTING FILE INFO *******
setvar disc_date strwrite(today-!disc_day:'%1M %0D, %0Y')
repeat
input disc_rec < discf01
if "!disc_rec"[0:1] <> " "
if pos("ACCESS ALLOWED","!disc_rec") = 0
setvar disc_acct ltrim(rtrim('!disc_rec'[0:8]))
errclear
listacct !disc_acct >$null
if cierror = 0
if integerparse(ltrim('!disc_rec'[19:15])) > 0
setvar disc_grp rtrim('!disc_rec'[9:8])
listf @.!disc_grp.!disc_acct(credate > today-!disc_day and credate <
today and sectors > !discsect and intcode > -1),6 >>*discfb
endif
endif
endif
endif
fornum disc_cntr=1,!DISC_EOF
setvar DISC_EOF veftempinfo('discf02').eof
setlvar disc_hdr false
echo ========== Cleaning up File Info ==========
while setvar(DISC_EOF,DISC_EOF-1)>0
input disc_rec2 < discf02
if fexists(rtrim("!disc_rec2"[0:26]))
if not disc_hdr
echo
Cr. Date -Acc Date>>*discfc
echo FILE GROUP ACCOUNT CODE SIZE TYPE End of File
Flimit Sectors File Ownership dd/mmm/yy dd/mmm/yy>>*discfc
echo -------- -------- -------- ----- ----- ---- ------------
---------- ------- ------------------ --------- -------->>*discfc
setlvar disc_hdr true
endif
listf ![rtrim("!disc_rec2"[0:26])],^flimit1.cmd.sys >>*discfc
endif
endwhile
endif
================= HERE'S THE FLIMIT1 (Vesoft Expression) FILE
======================
MPEXHEADER1:=" ";
for rfile in mpexfileset
do
begin
writeln (file:9,
group:9,
account:9,
code:6,
FMTRECSIZE:6:'RIGHTJUST',
" ",
fmttype:6,
eof:11,
flimit:11,
sectors:11,
owner:20:'RIGHTJUST',
" ",credate,
" ",accdate
);
end;
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|