From: frederic@bingvaxu.cc.binghamton.edu (Brian Frederick)
Subject: 1991 NL STATS 4 of 4
Originator: frederic@bingvaxu.cc.binghamton.edu
Organization: State University of New York at Binghamton
Date: Fri, 10 Apr 1992 22:15:55 GMT

:all.bat - generates all the stats from 2 files: bboff.dat & bbpit.dat

goto NEXT
Sample data:
BATTERS     H AG TEAM OWN POS      AB   R   H  HR RBI  SB   BA  SLG  OBP HRR SBR   $  Note  
ALICEA,L    L 22 CARD ##  II       68   5  13   0   0   0 .191 .235 .276   0   0   0  L
ANDERSON,D  R 32 GNTS DS  SS,OI   226  24  56   2  13   2 .248 .314 .286 113 113   5  RA
MOTA,AN     R 26 ASTR ##  2B      482  85 138  19   4   2 .299 .000 .339  

PITCHERS    H AG TEAM OWN  W  S  Inn    H  BB  SO  Rat   ERA  BAA   $   Note
SMITH,LEE        CARD SS   6 47  73.0  70  13  67  1.14  2.34 .242  30  CC
BLAIR,W     R 26 ASTR ##   0  0  18.0   5   5   7  0.00  0.50 .209   0  MPY
WILLIAMS,BR R 23 ASTR ##   0  0  12.0  11   4   4  1.25  3.75 .234   0  SPY

:NEXT

echo S=start, H=halftime, M=might strt, A=alt, D=down to minors, L=loser, P=promising, Y=young, O=old, B=breaks >> cover.off
echo BATTERS     H AG TEAM OWN POS      AB   R   H  HR RBI  SB   BA  SLG  OBP HRR SBR   $ Note  >> cover.off 

echo S=start, C=close, M=Mid-releif, L=loser, P=Promising, Y=young, O=old, B=breaks >> cover.pit
echo PITCHERS    H AG TEAM OWN  W  S  Inn    H  BB  SO  Rat   ERA  BAA   $   Note >> cover.pit

echo. >>spacer
echo ********************************************************************************************** >> spacer
echo ********************************************************************************************** >> spacer
echo. >>spacer

echo. >>line
echo. >>line

:OFF STATS
type bboff.dat | sort         > tmp.nam
type bboff.dat | sort /+35 /r > tmp.ab
type bboff.dat | sort /+48 /r > tmp.hr
type bboff.dat | sort /+51 /r > tmp.rbi
type bboff.dat | sort /+55 /r > tmp.sb
type bboff.dat | sort /+83 /r > tmp.val
type bboff.dat | sort /+87 /r > tmp.n1
type bboff.dat | sort /+88 /r > tmp.n2
type bboff.dat | sort /+89 /r > tmp.n3
type bboff.dat | sort /+90 /r > tmp.n4
type bboff.dat | find "PP"  >> off.ppo
type bboff.dat | find " ## " | find "AA" /v | sort /+27  > tmp.nbm       
:type bboff.dat | sort /+59 /r > tmp.ba
:type bboff.dat | sort /+39 /r > tmp.r
:type bboff.dat | sort /+64 /r > tmp.slg
:type bboff.dat | sort /+69 /r > tmp.obp
:type bboff.dat | sort /+74    > tmp.hrr
:type bboff.dat | sort /+78    > tmp.sbr

for %%f in ( nam,ab,hr,rbi,sb,ba,val,n1,n2,n3,n4,ppo,nbm ) do copy cover.off+tmp.%%f off.%%f

del tmp.*

:OWNERS
for %%f in ( BF,BK,ES,DW,DS,DH,JK,TF,ST,PC,## ) do call make %%f owners.all

:TEAMS
for %%f in ( ASTR,BRVS,CARD,CUBS,DDGR,EXPO,GNTS,METS,PDRE,PHIL,PIRA,REDS ) do call make %%f teams.all

:OFF-POSITION
for %%f in ( 1B,2B,3B,SS,CA,OI,II,OF ) do call pos %%f off.pos

:PITCHING
sort         < bbpit.dat >> tmp.nam
sort /r /+27 < bbpit.dat >> tmp.w  
sort /r /+30 < bbpit.dat >> tmp.sv
sort /r /+33 < bbpit.dat >> tmp.inn
sort /r /+47 < bbpit.dat >> tmp.so
sort    /+52 < bbpit.dat >> tmp.rat
sort    /+57 < bbpit.dat >> tmp.era
sort    /+63 < bbpit.dat >> tmp.baa
sort /r /+69 < bbpit.dat >> tmp.val
sort /r /+73 < bbpit.dat >> tmp.n1
sort /r /+74 < bbpit.dat >> tmp.n2
sort /r /+75 < bbpit.dat >> tmp.n3
sort /r /+76 < bbpit.dat >> tmp.n4
type bbpit.dat | find "PP"  >> tmp.ppp

:tmp
type bbpit.dat | find " AA" /v | find " ## " | sort /r /+68 >> tmp.nbm

sort /r /+27 <tmp.nbm >> tmp.nbw
sort /r /+30 <tmp.nbm >> tmp.nbs
sort /r /+47 <tmp.nbm >> tmp.nbk
sort    /+63 <tmp.nbm >> tmp.nbb

for %%f in ( nam,w,sv,inn,so,rat,era,baa,val,n1,n2,n3,n4,ppp,nmb,nbw,nbs,nbk,nbb ) do copy cover.pit+tmp.%%f pit.%%f

:CLEANUP
del tmp.*
del cover.*
del spacer
del line
:END


***************** cut here *******************************
:pos.bat - generates all stats sorted by position, val 
echo ***** %1 *****          >> %2
type cover.off               >> %2
type bboff.dat | find " %1 " >> temp.%1
type bboff.dat | find " %1," >> temp.%1
type bboff.dat | find ",%1"  >> temp.%1
type temp.%1 | sort /+82 /r  >> %2
type spacer                  >> %2
del temp.%1

***************** cut here *******************************
:make.bat - helps to make the lists

echo ***** %1 *****                         >>%2
type cover.off                              >>%2
type bboff.dat | find " %1 " | sort /+27    >>%2
type line                                   >>%2
type cover.pit                              >>%2
type bbpit.dat | find " %1 " | sort /r /+27 >>%2
type spacer                                 >>%2