home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
DATABASE
/
HANDYP10.LBR
/
FONEBOOK.CZD
/
FONEBOOK.CMD
Wrap
OS/2 REXX Batch file
|
2000-06-30
|
4KB
|
159 lines
STOR T to fonebook
@ 18,0
@ 16,0
@ 3,52 say chr(27)+chr(66)+chr(50)
SET intensity off
@ 3,52 say 'PHONE BOOK SUBSYSTEM'
@ 3,71 say chr(27)+chr(67)+chr(50)
SET intensity on
@ 5,48 say 'A - Family telephone number list'
@ 6,48 say 'B - Acquaintances telephone list'
@ 7,48 say 'C - Office/co-workers phone list'
@ 8,48 say 'D - Business firm telephone list'
@ 9,48 say 'E - Shop/services telephone list'
@ 10,48 say 'F - Emergency phone numbers list'
@ 11,48 say 'G - Other telephone numbers list'
@ 14,48 say 'R - Exit to the main system menu'
SET intensity off
@ 16,52 say "Option (0-9; A-G or R)? "
SET console off
WAIT to option
SET console on
IF val(option)>0 .or. option='0'
DO changeop
RETU
ENDI
IF !(option)='R'
RETU
ELSE
USE fonebook index fonebook
STOR ' ' to action
STOR !(option) to option
DO WHIL fonebook
IF !(action)#'P'
ERAS
SET intensity on
@ 1,0 say 'ADDRESS & PHONE BOOK for'
DO CASE
CASE option='A'
@ 1,25 say 'FAMILY'
CASE option='B'
@ 1,25 say 'ACQUAINTANCES'
CASE option='C'
@ 1,25 say 'OFFICE/CO-WORKERS'
CASE option='D'
@ 1,25 say 'BUSINESS FIRMS'
CASE option='E'
@ 1,25 say 'SHOPS & SERVICES'
CASE option='F'
@ 1,25 say 'EMERGENCIES'
otherwise
@ 1,25 say 'OTHER CATEGORIES'
ENDC
@ 17,0 say '--------------------------------------------------------------------------------'
SET intensity off
@ 18,0 say 'Enter one of the following single letter commands:'
SET intensity on
@ 19,0 say 'A)dd E)dit P)age Q)uit R)estart S)elect'
FIND &option
STOR 3 to line
STOR 0 to col
IF !(action)#'P'
DO WHIL line*col<630 .and. disptype=option .and. .not. eof
SET intensity off
@ line,col say # using '###'
IF !(disptype)='D' .or. !(disptype)='E'
@ line,col+5 say firm
ELSE
@ line,col+5 say name
ENDI
STOR trim(phone) to fone
@ line,col+(38-len(fone)) say fone
STOR line+1 to line
IF line>=15 .and. col=0
STOR 3 to line
STOR 42 to col
ENDI
SKIP
ENDD
ENDI
ENDI
STOR ' ' to action
@ 20,0 say ' '
WAIT to action
DO CASE
CASE !(action)='A'
GOTO bottom
APPE BLAN
REPL disptype with option
EDIT #
CASE !(action)='E'
GOTO top
FIND &option
BROW
CASE !(action)='P'
STOR 3 to line
DO WHIL line<=15
@ line,0
STOR line+1 to line
ENDD
STOR 3 to line
STOR 0 to col
DO WHIL .not. eof .and. disptype=option .and. line*col<630
@ line,col say # using '###'
IF !(disptype)='D' .or. !(disptype)='E'
@ line,col+5 say firm
ELSE
@ line,col+5 say name
ENDI
STOR trim(phone) to fone
@ line,col+(38-len(fone)) say fone
STOR line+1 to line
IF line>=15 .and. col=0
STOR 3 to line
STOR 42 to col
ENDI
SKIP
ENDD
CASE !(action)='Q'
STOR F to fonebook
CASE !(action)='R'
GOTO top
CASE !(action)='S'
@ 21,0
@ 20,0 say ' '
ACCE 'Enter number adjacent to your selection and press RETURN' to sel
STOR val(sel) to num
GOTO num
ERAS
@ 1,1 say name
IF spouse#' '
@ 1,1+(2+len(trim(name))) say '('+trim(spouse)+')'
ENDI
@ 1,1+(6+len(trim(name))+len(trim(spouse))) say relation
@ 1,1+(8+len(trim(name))+len(trim(spouse))+len(trim(relation))) say birthdate
@ 2,1 say firm
IF category#' '
@ 2,1+(2+len(trim(firm))) say '('+trim(category)+')'
ENDI
@ 4,1 say street
@ 5,1 say trim(city)+','
@ 5,1+(2+len(trim(city))) say trim(state)
@ 5,1+(4+len(trim(city))+len(trim(state))) say zip
@ 7,1 say 'phone number: '+phone
@ 8,1 say 'mailing list: '+cardlist
@ 9,1 say 'display type: '+disptype
@ 11,1 say 'Edit (Y/N)? '
SET console off
WAIT to ed
SET console on
IF !(ed)='Y'
EDIT #
PACK
ENDI
ENDC
ENDD
USE
ENDI
RETU