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
/
MBUG
/
MBUG105.ARC
/
MAILMEN.LQR
/
PRINTLAB.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
3KB
|
147 lines
* PRINTLAB.PRG COPYRIGHT NOVEMBER 1, 1983 BY PHILIP K. PERLMAN
SET TALK OFF
ERASE
STORE T TO BEVEL
DO WHILE BEVEL
STORE ' ' TO ANS1
@ 10,5 say "Do you wish to print labels of friends or business (F or B) ?"
@ 10,75 GET ANS1
READ
CLEAR GETS
IF !(ANS1) = 'F' .OR. !(ANS1) = 'B'
STORE F TO BEVEL
ELSE
ENDIF
ENDDO
ERASE
@ 10,5 SAY 'Mount Labels one across by 15/16" high in Printer'
@ 12,5 SAY 'Press any key when ready'
set console off
wait
set console on
IF !(ANS1) = 'F'
USE &DBF1 INDEX &NDX1
GO TOP
SET PRINT ON
? CHR(15)
DO WHILE .NOT. EOF
IF FRIEND <> ' '
? TRIM(FIRST), LAST
? ADDR1
? ADDR2
? TRIM(CITY)-"," , STATE, ZIP
?
?
ENDIF
SKIP
ENDDO
? CHR(18)
SET PRINT OFF
RETURN
ENDIF
IF !(ANS1) = 'B'
STORE T TO RIGHT
DO WHILE RIGHT
STORE ' ' TO P
ERASE
@ 10,5 SAY "Press 'A' To Print Labels For All Categories"
@ 12,5 SAy "Press 'S' to print selected categories"
@ 12,70 get P
READ
CLEAR GETS
IF !(P) = 'A' .OR. !(P) = 'S'
STORE F TO RIGHT
ELSE
ENDIF
ENDDO
IF !(P) = 'A'
ERASE
USE &DBF1
GO TOP
SET PRINT ON
? CHR(15)
DO WHILE .NOT. EOF
IF FRIEND = ' '
? TRIM(FIRST), LAST
? COMPANY
? ADDR1
? TRIM(CITY)-"," , STATE, ZIP
?
?
ENDIF
SKIP
ENDDO
? CHR(18)
SET PRINT OFF
RETURN
ENDIF
IF !(P) = 'S'
STORE T TO CONTINUE
DO WHILE CONTINUE
SET PRINT OFF
STORE T TO LEVEL
DO WHILE LEVEL
STORE ' ' TO ANS
STORE ' ' TO CAT
ERASE
?
?
?
?
ACCEPT "What Priority Level Are You Searching (1,2, OR 3) ?" TO ANS
?
?
ACCEPT "What Category Are You Looking For ?" TO CAT
IF ANS = '1' .OR. ANS = '2' .OR. ANS = '3'
STORE 'PROF'-ANS TO PROF
STORE DRV1-':'-'PROF'-ANS TO MNDX
STORE F TO LEVEL
ELSE
ENDIF
ENDDO
ERASE
STORE !(CAT) TO CAT
USE &DBF1 INDEX &MNDX
FIND &CAT
ERASE
SET PRINT ON
? CHR(15)
STORE T TO TRUE
DO WHILE .NOT. EOF .AND. &PROF = '&CAT'
? TRIM(FIRST), LAST
? COMPANY
? ADDR1
? TRIM(CITY)-"," , STATE, ZIP
?
?
SKIP
ENDDO
ERASE
STORE ' ' TO CONT
@ 10,5 SAY 'Do you wish to continue ?'
@ 12,5 SAY "Press 'N' to Return to the Menu"
@ 14,5 SAY 'Press any other key to continue'
@ 14,40 GET CONT
READ
CLEAR GETS
IF !(CONT) = 'N'
? CHR(18)
SET PRINT OFF
STORE F TO CONTINUE
RETURN
ELSE
ENDDO
ENDIF
ENDIFASE
?
?
?
?
ACCEPT "What Priority Level Are You Searching (1,2, OR 3) ?" TO ANS
?
?
ACCEPT "What Category Are You Looking For ?" TO CAT
IF ANS = '1' .OR. ANS = '2' .OR. ANS = '3'
STORE 'PROF'-ANS TO PROF
STORE VAL(ANS)+2 TO ANS
STORE ST