home *** CD-ROM | disk | FTP | other *** search
- DEFINT A-Z
-
- ' Program Name: FDLARPTS.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 FDLARpt.Txt
- ' as input. Output to FDLARpt(1 to n).Txt
- '
- ' Note: FDLARPTS.EXE must be executed in the directory
- ' where FDLARpt.Txt resides. No specific error checking
- ' is done to make sure that FDLARpt.Txt exists. If it
- ' doesn't the program will BOMB.
- '
- ' 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 FDLARpts.bas from MS DOS QBasic and return
- ' to the DOS system prompt run as follows:
- ' QBASIC /RUN FDLARPTS
-
- DIM Header$(1 TO 50)
-
- ON ERROR GOTO Drats: 'Global error trap
-
- 'Open FDLARpt.Txt - output created by BinkLA
- '-------------------------------------------
- OPEN "FDLARpt.Txt" FOR INPUT AS #10 'Read access
-
- 'Get the FDLARpt.Txt header info
- '-------------------------------
- x% = 1
- DO UNTIL EOF(10)
- LINE INPUT #10, Header$(x%)
- IF MID$(Header$(x%), 13, 4) = "From" THEN
- EXIT DO
- END IF
- x% = x% + 1
- LOOP
- Rpt% = 1
- DO UNTIL EOF(10)
- Rpt$ = LTRIM$(STR$(Rpt%))
- OPEN "FDLARpt" + Rpt$ + ".Txt" FOR OUTPUT AS Rpt%
-
- 'Write Out "FDLARptn.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 LEFT$(ReportBody$, 1) = ">" OR EOF(10)
- CLOSE Rpt%
- Rpt% = Rpt% + 1
- PRINT "FDLARpt" + Rpt$ + ".Txt - Done"
- LOOP
- PRINT "Finished!"
- CLOSE : SYSTEM
-
- Drats:
-
- BEEP
- PRINT "Program bombed!"
- SYSTEM
-
-