Category : Databases and related files
Archive   : CUSTOMR.ZIP
Filename : CUSTRPTS.PRG
* Program..: CUSTRPTS.PRG
* Author...: JIMMY L. HOLDER
* Date.....: 04/25/88
* Notice...: Copyright (c) 1988, JIMMY L. HOLDER, All Rights Reserved
* Notes....:
* Reserved.: selectnum
*
SET TALK OFF
SET BELL OFF
SET STATUS ON
SET ESCAPE OFF
SET CONFIRM ON
SET COLOR TO W/B,N/W,N
USE CUSTOMER INDEX CUSTOMER
PRNT = CHR(15)
PRNT1 = CHR(18)
SET DEVICE TO PRINT
@1,1 SAY PRNT
SET DEVICE TO SCREEN
DO WHILE .T.
* ---Display menu options, centered on the screen.
* draw menu border and print heading
CLEAR
@ 2, 0 TO 15,79 DOUBLE
@ 3, 20 SAY [C U S T O M E R F I L E R E P O R T S]
@ 4,1 TO 4,78 DOUBLE
* ---display detail lines
@ 7,30 SAY [1. REPORT SORTED BY NAME]
@ 8,30 SAY [2. REPORT BY STATE]
@ 9,30 SAY [3. REPORT BY ZIP CODE]
@ 10,30 SAY [4. REPORT BY AREA CODE]
@ 11,30 SAY [5. REPORT BY CUSTOMER NUMBER]
@ 12,30 SAY [6. SALES REPORT]
@ 13, 30 SAY '0. EXIT'
STORE 0 TO selectnum
@ 15,33 SAY " select "
@ 15,42 GET selectnum PICTURE "9" RANGE 0,6
READ
DO CASE
CASE selectnum = 0
SET BELL ON
SET TALK ON
CLEAR ALL
RETURN
CASE selectnum = 1
* DO REPORT BY SORTED BY NAME
USE CUSTOMER
SORT ON NAME TO CUSTSORT
CLOSE ALL
USE CUSTSORT
CLEAR
REPORT FORM CUSTNAME TO PRINT
EJECT
CASE selectnum = 2
* DO REPORT BY STATE
STORE ' ' TO ISTATE
USE CUSTOMER
SORT ON STATE TO CUSTSORT
CLOSE ALL
USE CUSTSORT
* KEYIN STATE WANTED
CLEAR
ACCEPT "Enter State to print.... " TO ISTATE
IF ISTATE = 'ALL'
REPORT FORM CUSTSTAT TO PRINT
EJECT
ELSE
REPORT FORM CUSTSTAT FOR STATE = ISTATE TO PRINT
EJECT
ENDIF
CASE selectnum = 3
* DO REPORT BY ZIP CODE
STORE ' ' TO IZIP
USE CUSTOMER
SORT ON ZIP TO CUSTSORT
CLOSE ALL
USE CUSTSORT
CLEAR
* KEYIN ZIP CODE WANTED
ACCEPT "Enter Zip Code to Print.... " TO IZIP
IF IZIP = 'ALL'
REPORT FORM CUSTZIP TO PRINT
EJECT
ELSE
REPORT FORM CUSTZIP FOR IZIP = ZIP TO PRINT
EJECT
ENDIF
CASE selectnum = 4
* DO REPORT BY AREA CODE
STORE ' ' TO ICODE
USE CUSTOMER
SORT ON PHONE1 TO CUSTSORT
CLOSE ALL
USE CUSTSORT
CLEAR
* KEYIN AREA CODE WANTED
ACCEPT "Enter Area Code to Print.... " TO ICODE
IF ICODE = 'ALL'
REPORT FORM CUSTAREA TO PRINT
EJECT
ELSE
REPORT FORM CUSTAREA FOR ICODE = PHONE1 TO PRINT
EJECT
ENDIF
CASE selectnum = 5
* DO PRINT REPORT
REINDEX
REPORT FORM CUSTOMER TO PRINT
EJECT
CASE selectnum = 6
* DO CUSTRPT1
DO CUSTRPT1
ENDCASE
* CLEAN UP FILES
ERASE CUSTSORT.DBF
SET DEVICE TO PRINT
@1,1 SAY PRNT1
SET DEVICE TO SCREEN
*END DO T
ENDDO T
RETURN
* EOF: CUSTOMER.PRG
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/