home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
rcpm
/
qwik4v1.lbr
/
QW-MAIN.CZD
/
QW-MAIN.CMD
Wrap
OS/2 REXX Batch file
|
1987-12-20
|
4KB
|
169 lines
* Program..: QW-MAIN.CMD
* Author...: Thomas L. Ensminger
* Date.....: 12/05/87
* Notice...: Copyright 1987, All Rights Reserved
* Reserved.: select, selectnum, editchoice, poschoice,
* error, findkey, expression, string, is:eof
* clearline, addchoice, is:some, lastrecord
*
SET TALK OFF
ERASE
STORE "QWIK4 version 1.0 (c) AB17 Remote Systems 1987" TO mstring
ERASE
STORE len(mstring) TO mlen
STORE ((80-mlen)/2)-1 TO mcol1
STORE mcol1+mlen TO mcol2
@ 11,mcol1 SAY mstring
STORE 1 TO x
DO WHILE x<80
STORE x+1 TO x
ENDDO
DO WHILE mcol2>=mcol1
@ 11,mcol1 SAY " "
@ 11,mcol2 SAY " "
STORE mcol1+1 TO mcol1
STORE mcol2-1 TO mcol2
ENDDO
ERASE
SET TALK OFF
SET BELL OFF
SET COLON OFF
STORE $(STR(0,81),1,80) TO clearline
DO WHILE T
ERASE
@ 1, 0 SAY "========================================"
@ 1,40 SAY "========================================"
@ 2, 0 SAY "||"
@ 2,25 SAY "QWIK4 Database Main Menu"
@ 2,78 SAY "||"
@ 3, 0 SAY "========================================"
@ 3,40 SAY "========================================"
@ 4, 0 SAY "||"
@ 4,78 SAY "||"
@ 5, 0 SAY "||"
@ 5,78 SAY "||"
@ 6, 0 SAY "||"
@ 6,78 SAY "||"
@ 7, 0 SAY "||"
@ 7,78 SAY "||"
@ 8, 0 SAY "||"
@ 8,78 SAY "||"
@ 9, 0 SAY "||"
@ 9,78 SAY "||"
@ 10, 0 SAY "||"
@ 10,78 SAY "||"
@ 11, 0 SAY "||"
@ 11,78 SAY "||"
@ 12, 0 SAY "========================================"
@ 12,40 SAY "========================================"
@ 5,30 SAY "0. Exit QWIK4 "
@ 10,30 SAY "5. QWK4 Report "
@ 6,30 SAY "1. View Records"
@ 7,30 SAY "2. Add Records"
@ 8,30 SAY "3. Edit Records"
@ 9,30 SAY "4. Pack Records"
STORE 6 TO selectnum
DO WHILE selectnum < 0 .OR. selectnum > 5
STORE " " TO select
@ 12,33 SAY " Select : : "
@ 12,42 GET select PICTURE "#"
READ
STORE VAL(select) TO selectnum
ENDDO
DO CASE
CASE selectnum= 0
CLEAR
SET COLON ON
SET BELL ON
SET TALK ON
SET TALK OFF
ERASE
STORE "AB17 Remote Systems Application Program " TO mstring
STORE len(mstring) TO mlen
STORE ((80-mlen)/2)-1 TO mcol1
STORE mcol1+mlen TO mcol2
@ 11,mcol1 SAY mstring
STORE 1 TO x
DO WHILE x<80
STORE x+1 TO x
ENDDO
DO WHILE mcol2>=mcol1
@ 11,mcol1 SAY " "
@ 11,mcol2 SAY " "
STORE mcol1+1 TO mcol1
STORE mcol2-1 TO mcol2
ENDDO
ERASE
QUIT
CASE selectnum= 1
* DO view
USE QWIK4DB INDEX QWIK4IN
ERASE
@ 1, 0 SAY "View Qwik4 Database"
DO QW-frame
IF # = 0
STORE " " TO select
@ 11,0 SAY "[ No Data! ]"
@ 12,0 SAY "[ Any Key ]==> ";
GET select
READ NOUPDATE
ELSE
DO QW-gets
CLEAR GETS
STORE "X" TO poschoice
DO WHILE poschoice <> " "
DO QW-posn
ENDDO
ENDIF
USE
CASE selectnum= 2
* DO add
USE QWIK4DB INDEX QWIK4IN
COPY STRUCTURE TO QWIK4DB.add
SELECT SECONDARY
USE QWIK4DB.add
ERASE
@ 1, 0 SAY "Add to Qwik4 Database"
DO QW-frame
@ 11,0 SAY "Enter ^W to Exit"
STORE "X" TO addchoice
DO WHILE addchoice <> " "
APPEND BLANK
DO QW-gets
READ
STORE TRIM( FILENAME ) TO addchoice
ENDDO
DELETE
USE
SELECT PRIMARY
APPEND FROM QWIK4DB.add
USE
CASE selectnum= 3
* DO edit
USE QWIK4DB INDEX QWIK4IN
ERASE
@ 1, 0 SAY "Edit Qwik4 Database"
DO QW-frame
IF # = 0
STORE " " TO select
@ 11,0 SAY "[ No Data! ]"
@ 13,0 SAY "[ Any Key ]==> ";
GET select
READ NOUPDATE
ELSE
DO QW-gets
CLEAR GETS
DO QW-edit
ENDIF
USE
CASE selectnum= 4
* DO pack
DO QW-pack
CASE selectnum= 5
* DO report
DO QWK-rpt
ENDCASE
ENDDO T