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
/
MBUG098.ARC
/
USER0.LBR
/
LABEL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
5KB
|
261 lines
* File:- LABEL.CMD
* Print Genalogy Address Labels, Postcode Numb/Order.
* By, J.L.Read. Merrylands. NSW.
* Modified Version 1.2
* Date:- 31/01/88
ERASE
SET BELL OFF
SET TALK OFF
@ 1,1 SAY"Labels"
SET INTEN ON
@ 4,19 SAY">>> FAMILY TREE ADDRESS LABEL PRINTER <<<"
SET INTEN OFF
@ 7,37 SAY"-==-"
@ 14,23 SAY"Search and Print Address Labels"
@ 22,1 SAY"Print Address Labels <Y> or <N>."
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND)= "Y"
DO B:SELEC
@ 7,28 SAY"&MFAMLY"
@ 12,32 SAY"Loading File."
USE B:PERSONS INDEX B:REF
SELECT SECONDARY
USE PHONE INDEX PHONIND,NAMEIND,CODEIND
SELECT PRIMARY
@ 12,30
@ 22,0
@ 22,1 SAY"Update Names To Address File. Y/N."
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND) ="Y"
@ 22,0
@ 22,0 SAY"Updating Names To Address File, WAIT."
DO UPDATE
ENDIF !(COMMAND) ="Y"
@ 22,0
@ 22,1 SAY"Set Family Tree Control if B:DISK Has been Changed Y/N."
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND) ="Y"
@ 22,0
@ 22,0 SAY"Setting Family Tree Control, WAIT."
GO TOP
DO WHILE .NOT. EOF
STORE REF:NO TO CURPER
STORE CONTROL TO MCONT
SELECT SECONDARY
FIND &CURPER
IF #=0
SELECT PRIMARY
SKIP
LOOP
ENDIF
REPLACE SELECT WITH MCONT
SELECT PRIMARY
SKIP
ENDDO
RELEASE CURPER,MCONT
ENDIF !(COMMAND) ="Y"
@ 22,0
SET INTEN ON
@ 22,1 SAY"TURN YOUR PRINTER ON"
SET INTEN OFF
@ 22,22 SAY"Press <RETURN> When Ready."
SET CONSOLE OFF
WAIT
SET CONSOLE ON
ERASE
STORE T TO FORM3
DO WHILE FORM3
@ 1,1 SAY"Labels"
GO TOP
SET INTEN ON
@ 4,19 SAY">>> FAMILY TREE ADDRESS LABEL PRINTER <<<"
SET INTEN OFF
@ 7,28 SAY"&MFAMLY"
@ 10,29 SAY"Enter <CR> To Exit."
STORE " " TO LIST
@ 15,20 SAY"Enter M)ultiple P)code S)ingle:- " GET LIST PICTURE "!"
@ 18,38 SAY"-=-"
@ 22,1 SAY"Press <RETURN> When Ready."
SET CONFIRM ON
READ
SET CONFIRM OFF
CLEAR GETS
IF $(LIST,1,1)= " "
SELECT SECONDARY
USE
SELECT PRIMARY
USE
RELEASE FORM3,MREF2,COMMAND,MFAMLY,LIST
* RESTORE FROM MEMRET
RETURN
ENDIF
DO CASE
CASE LIST ="S"
@ 10,45 SAY"Abort."
@ 15,0
STORE " " TO MREF2
@ 15,19 SAY"Enter Reference No. Single Label:- " GET MREF2 PICTURE "9999"
SET CONFIRM ON
READ
SET CONFIRM OFF
IF $(MREF2,1,1) =" "
RELEASE MREF2
@ 10,45 SAY"Exit. "
@ 15,0
LOOP
ENDIF
FIND &MREF2
IF #=0
@ 22,0
@ 22,1 SAY" Reference No. &MREF2 Not On File."
STORE 1 TO XX
DO WHILE XX <100
STORE XX+1 TO XX
ENDDO WHILE XX<100
RELEASE XX
@ 10,45 SAY"Exit. "
@ 15,0
@ 22,0
LOOP
ENDIF #=0
STORE "Mr." TO TITL
IF MARR:NAME =" " .AND. SEX ="F"
STORE "Miss" TO TITL
ENDIF
IF MARR:NAME >" " .AND. SEX ="F"
STORE "Mrs." TO TITL
ENDIF
SELECT SECONDARY
FIND &MREF2
IF #=0
@ 22,0
@ 22,1 SAY"No Address On File."
STORE 0 TO XX
DO WHILE XX<100
STORE XX+1 TO XX
ENDDO
RELEASE XX,M1LAB,TITL
@ 10,45 SAY"Exit. "
@ 15,0
@ 22,0
SELECT PRIMARY
LOOP
ENDIF
@ 10,45 SAY"Exit. "
@ 22,0
@ 22,1 SAY"Printing Address Label."
SET CONSOLE OFF
SET PRINT ON
? " &TITL",TRIM(FST:NAM),TRIM(POSTAL)+"."
? " ",TRIM(STREET)+"."
? " ",TRIM(LOCATN)+"."
? " ",TRIM(STATE)+"."," ",PCODE+"."
?
?
?
?
?
SET PRINT OFF
SET CONSOLE ON
SELECT PRIMARY
RELEASE TITL,MREF2
@ 15,0
@ 22,0
CASE LIST ="M"
GO TOP
@ 22,0
@ 22,1 SAY"Printing Labels."
SET CONSOLE OFF
SET PRINT ON
DO WHILE .NOT. EOF
STORE REF:NO TO CURP
STORE CONTROL TO MCONT
STORE "Mr." TO TITL
IF MARR:NAME =" " .AND. SEX ="F"
STORE "Miss" TO TITL
ENDIF
IF MARR:NAME >" " .AND. SEX ="F"
STORE "Mrs." TO TITL
ENDIF
SELECT SECONDARY
FIND &CURP
IF #=0
SELECT PRIMARY
SKIP
LOOP
ENDIF
IF MAIL ="Y" .AND. SELECT ="&MCONT"
? " &TITL",TRIM(FST:NAM),TRIM(POSTAL)+"."
? " ",TRIM(STREET)+"."
? " ",TRIM(LOCATN)+"."
? " ",TRIM(STATE)+"."," ",PCODE+"."
?
?
?
?
?
ENDIF
SELECT PRIMARY
SKIP
ENDDO
SET PRINT OFF
SET CONSOLE ON
RELEASE CURP,TITL,MCONT
@ 22,0
CASE LIST ="P"
@ 22,0
@ 22,0 SAY"Print Labels In Postcode Order Y/N."
SET CONSOLE OFF
WAIT TO COMMAND
SET CONSOLE ON
IF !(COMMAND) ="Y"
@ 22,0
@ 22,0 SAY"Printing Labels In Postcode Order, WAIT."
STORE CONTROL TO MCONT
SELECT SECONDARY
SET INDEX TO CODEIND
SET CONSOLE OFF
SET PRINT ON
DO WHILE .NOT. EOF
IF MAIL ="Y" .AND. SELECT ="&MCONT"
? " ",TRIM(FST:NAM),TRIM(POSTAL)+"."
? " ",TRIM(STREET)+"."
? " ",TRIM(LOCATN)+"."
? " ",TRIM(STATE)+"."," ",PCODE+"."
?
?
?
?
?
ENDIF
SKIP
ENDDO
SET INDEX TO PHONIND
SET CONSOLE ON
SET PRINT OFF
RELEASE MCONT
SELECT PRIMARY
ENDIF !(COMMAND)
@ 22,0
OTHERWISE
@ 22,0
@ 22,1 SAY"Enter M, P, or S Only."
STORE 0 TO XX
DO WHILE XX<100
STORE XX+1 TO XX
ENDDO
RELEASE XX
@ 22,0
ENDCASE
ENDDO FORM3
ELSE COMMAND <>"Y"
RELEASE COMMAND
ENDIF
RETURN