home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 126
/
af126a.adf
/
Football.lzx
/
football
/
exec
/
Results.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-05-22
|
3KB
|
81 lines
/* ***********************************************************************
RESULTS PROGRAM FOR FOOTBALL REXX SUITE
---------------------------------------
Copyright Mark Naughton 1996
Version Date History
--------------------------------------------------------------------------
1.0 270996 First release. Displays all results from 'Teams.sf'
file.
1.1 121196 Updated to get arguments and to use '*.sflearn' to get
a true display as '.sf' was in order. Now called as a
component of FOOTBALL.
131196 Added checks for files - if not found, exits without
a message.
211196 Updated and tidied the display.
190497 Added title to display.
1.2 060997 Amended to handle new Automatic Scheduling schedules.
Removed - new program for this. Formatting needs to be
handled properly.
151297 Tidied display.
180499 Improved match/fixture display.
**************************************************************************
Procedure
---------
1. Check files exist.
2. Open file and print all lines without '*' with the exception of
the league name which is underlined; possibly dates as well.
3. Close file and exit.
************************************************************************** */
ARG league_file
version = 1
league_file = "Data/" || league_file
input_file = '.sflearn'
separator = '*'
if exists(league_file || input_file) = 0 then exit
if open(datafile,league_file || input_file,'r') then do
say
say center("Display League Results",78)
say "-------------------------------------------------------------------------------"
say
do while ~eof(datafile)
line = readln(datafile)
if pos(separator,line) = 0 then do
t1 = right(strip(substr(line,1,30)),30,' ')
say t1||substr(line,31)
end
else do
if words(line) > 1 then do
say subword(line,2)
uline = ''
do i=1 to length(subword(line,2))
uline = insert('-',uline,i,1)
end
say strip(uline)
end
else
if words(line) = 1 then
say
end
end
say "-------------------------------------------------------------------------------"
close(datafile)
end
else do
say
say "ERROR : (Results)"
say
say "Cannot open '"league_file||input_file"' for reading."
end
exit