home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
BKLA201D.ZIP
/
BKLARPTS.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-04-13
|
3KB
|
80 lines
DEFINT A-Z
' Program Name: BKLARPTS.EXE
' Author: R.J.(Bob) Ross FidoNet 1:134/75
' Date Started: January 25th. 1992
' Date Completed: Revised February 19, 1992
' Revised April 13, 1994
'
' Purpose: To make separate reports using BKLARpt.Txt
' as input. Output to BKLARpt(1 to n).Txt
'
' Note: BKLARPTS.EXE must be executed in the directory
' where BKLARpt.Txt resides. No specific error checking
' is done to make sure that BKLARpt.Txt exists. If it
' doesn't the program will BOMB.
'
' This program will not work if you use the -NHA switch
' with BinkLA. If you need to use the -NHA switch and
' produce separate outputs, contact me and I can give
' details on how this can be accomplished by modifying
' the Binklae.lng file
'
' This program is compatable with MS DOS QBasic and
' may be compiled using QuickBASIC 4.5. I Linked with
' Crescent Software library P.D.Q. which makes the EXE
' file a LOT SMALLER.
'
' To run BKLARpts.bas from MS DOS QBasic and return
' to the DOS system prompt run as follows:
' QBASIC /RUN BKLARPTS
DIM Header$(1 TO 50)
ON ERROR GOTO Drats: 'Global error trap
'Open BKLARpt.Txt - output created by BinkLA
'-------------------------------------------
OPEN "BKLARpt.Txt" FOR INPUT AS #10 'Read access
'Get the BKLARpt.Txt header info
'-------------------------------
x% = 1
DO UNTIL EOF(10)
LINE INPUT #10, Header$(x%)
IF RIGHT$(Header$(x%), 3) = "Hrs" THEN
EXIT DO
END IF
x% = x% + 1
LOOP
Rpt% = 1
DO UNTIL EOF(10)
Rpt$ = LTRIM$(STR$(Rpt%))
OPEN "BKLARpt" + Rpt$ + ".Txt" FOR OUTPUT AS Rpt%
'Write Out "BKLARptn.Txt"
'------------------------
FOR H% = 1 TO x%
PRINT #Rpt%, Header$(H%)
NEXT
DO
LINE INPUT #10, ReportBody$
IF LEFT$(ReportBody$, 1) = "" THEN
'do nothing
ELSE
PRINT #Rpt%, ReportBody$
END IF
LOOP UNTIL LEFT$(ReportBody$, 1) = "╘" OR EOF(10)
CLOSE Rpt%
Rpt% = Rpt% + 1
PRINT "BKLARpt" + Rpt$ + ".Txt - Done"
LOOP
CLOSE : SYSTEM
Drats:
BEEP
PRINT "Program bombed!"
SYSTEM