*
* DUM/LAB 8/24/83 BY R. SHIPP (460-9353)
ERASE
? '==============================================='
?
? ' DUMP FILE ONTO LABELS'
? ' ---------------------'
?
? '   1 = CONTINUE'
?
? '   / = EXIT BACK TO MAIN MENU'
?
? 'ENTER ONE OF THE ABOVE'
?
? '=============================================='
WAIT TO TEMP
IF TEMP='/'
     USE
     DO MENU
ENDIF
DO INDEX
DO LABTES
USE B:&FILE INDEX A:&IFILE
DO CODSEL
STORE STR(#,4) TO RECORD
STORE 0 TO COUNT
SET MARGIN TO 1
DO WHILE.NOT.EOF
SET PRINT OFF
STORE ' ' TO MNAMEL1
STORE ' ' TO MNAMEF1
STORE ' ' TO MPHONE1
STORE ' ' TO MCODEF1
STORE ' ' TO MCODES1
STORE ' ' TO MYEAR1
STORE ' ' TO MSTREET1
STORE ' ' TO MCITY1
STORE ' ' TO MSTATE1
STORE ' ' TO MZIP1
STORE ' ' TO MMAP1
STORE ' ' TO L11
STORE ' ' TO L21
STORE ' ' TO L31
STORE ' ' TO L41
IF *
   SKIP
   LOOP
ENDIF
IF CHECKING = T
   STORE T TO CHECK
ELSE
   STORE F TO CHECK
ENDIF
DO WHILE CHECK
DO CASE
CASE C1 $ CODES
CASE C2 $ CODES
CASE C3 $ CODES
CASE C4 $ CODES
CASE C5 $ CODES
CASE C6 $ CODES
OTHERWISE
   SKIP
   IF EOF
STORE' 'TO MNAMEL1
STORE' 'TO MNAMEF1
STORE' 'TO MPHONE1
STORE' 'TO MCODEF1
STORE' 'TO MCODES1
STORE' 'TO MYEAR1
STORE' 'TO MSTREET1
STORE' 'TO MCITY1
STORE' 'TO MSTATE1
STORE' 'TO MZIP1
STORE' 'TO MMAP1
   ELSE
   LOOP
ENDCASE
ENDIF
STORE F TO CHECK
ENDDO
STORE STR(#,4) TO RECORD1
STORE (COUNT+1) TO COUNT
STORE NAMEL TO MNAMEL1
STORE NAMEF TO MNAMEF1
STORE PHONE TO MPHONE1
STORE CODEF TO MCODEF1
STORE CODES TO MCODES1
STORE YEAR TO MYEAR1
STORE STREET TO MSTREET1
STORE CITY TO MCITY1
STORE STATE TO MSTATE1
STORE ZIP TO MZIP1
STORE MAP TO MMAP1
STORE (MNAMEL1+', '+MNAMEF1) TO L11
DO WHILE LEN(L11)<34
   STORE (L11+' ') TO L11
   LOOP
ENDDO
STORE (MSTREET1+' '+MCODEF1) TO L21
DO WHILE LEN(L21)<34
   STORE (L21+' ') TO L21
   LOOP
ENDDO
STORE (MCITY1+' , '+MSTATE1+'  '+MZIP1) TO L31
DO WHILE LEN(L31)<34
   STORE (L31+' ') TO L31
   LOOP
ENDDO
STORE (MPHONE1+'   '+MCODES1+'   '+MMAP1+'   '+STR(#,4)) TO L41
DO WHILE LEN(L41)<34
   STORE (L41+' ') TO L41
   LOOP
ENDDO
SKIP
STORE ' ' TO MNAMEL2
STORE ' ' TO MNAMEF2
STORE ' ' TO MPHONE2
STORE ' ' TO MCODEF2
STORE ' ' TO MCODES2
STORE ' ' TO MYEAR2
STORE ' ' TO MSTREET2
STORE ' ' TO MCITY2
STORE ' ' TO MSTATE2
STORE ' ' TO MZIP2
STORE ' ' TO MMAP2
IF *
   SKIP
   LOOP
ENDIF
IF CHECKING = T
   STORE T TO CHECK
ELSE
   STORE F TO CHECK
ENDIF
DO WHILE CHECK
DO CASE
CASE C1 $ CODES
CASE C2 $ CODES
CASE C3 $ CODES
CASE C4 $ CODES
CASE C5 $ CODES
CASE C6 $ CODES
OTHERWISE
   SKIP
   IF EOF
STORE' 'TO MNAMEL2
STORE' 'TO MNAMEF2
STORE' 'TO MPHONE2
STORE' 'TO MCODEF2
STORE' 'TO MCODES2
STORE' 'TO MYEAR2
STORE' 'TO MSTREET2
STORE' 'TO MCITY2
STORE' 'TO MSTATE2
STORE' 'TO MZIP2
STORE' 'TO MMAP2
   ELSE
   LOOP
ENDCASE
ENDIF
STORE F TO CHECK
ENDDO
STORE STR(#,4) TO RECORD2
STORE (COUNT+1) TO COUNT
STORE NAMEL TO MNAMEL2
STORE NAMEF TO MNAMEF2
STORE PHONE TO MPHONE2
STORE CODEF TO MCODEF2
STORE CODES TO MCODES2
STORE YEAR TO MYEAR
STORE STREET TO MSTREET2
STORE CITY TO MCITY2
STORE STATE TO MSTATE2
STORE ZIP TO MZIP2
STORE MAP TO MMAP2
STORE (MNAMEL2+', '+MNAMEF2) TO L12
STORE (MSTREET2+' '+MCODEF2) TO L22
STORE (MCITY2+' , '+MSTATE2+'  '+MZIP2) TO L32
STORE (MPHONE2+'   '+MCODES2+'   '+MMAP2+'   '+STR(#,4)) TO L42
SET PRINT ON
? L11+'  '+L12
? L21+'  '+L22
? L31+'  '+L32
? L41+'  '+L42
?
?
SET PRINT OFF
SKIP
ENDDO
USE
SET PRINT ON
? 'DATE = '+DATE()+' TOTAL LABELS='+STR(COUNT,4)
?  LN1
?  LN2
?  LN3
?  LN4
?
SET PRINT OFF
DO MENU
* THE END -- DUM/LAB
*

