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
/
PROGRAMS
/
WSTAR
/
MERGETUT.LBR
/
MERGE.DZC
/
MERGE.DOC
Wrap
Text File
|
2000-06-30
|
30KB
|
773 lines
.cw 11
.po 15
MERGE.DOC
(v 2.0, 20 Feb 87)
Gene Clark
INTRODUCTION
1« Thi≤ brieµ (anΣ tongue-in-cheek⌐ instructioε wil∞ leaΣ ì
yo⌡ througΦ ß fe≈ use≤ oµ MailMergσ whicΦ i≤ onσ oµ thσ companioε ì
program≤ oµ WordStar« BotΦ arσ copyrighteΣ b∙ MicroPr∩ Interì
nationa∞ Corporation.
2« Iε thσ example≤ tha⌠ follow¼ we'l∞ explorσ thσ easyô wa∙ ì
t∩ addres≤ envelope≤ a≤ wel∞ a≤ prin⌠ somσ "personalizedó forφ ì
letters.
3« Afte≥ yo⌡ havσ reaΣ thi≤ tex⌠ yo⌡ wil∞ worδ witΦ somσ ì
file≤ tha⌠ arσ alread∙ oε thσ disk« Wheε yo⌡ seσ thσ filename≤ ╔ ì
havσ chosen¼ yo⌡ ma∙ no⌠ agreσ tha⌠ ╔ tr∙ t∩ usσ logicalô fileì
names« Whethe≥ yo⌡ agreσ o≥ no⌠ -- ╔ tr∙ t∩ givσ m∙ workinτ ì
file≤ name≤ tha⌠ someho≈ appl∙ t∩ thei≥ usage« ╔ d∩ no⌠ normall∙ ì
adΣ ß filσ "typeó (e« g.¼ ENV.MRG⌐ becausσ thσ .ty≡ become≤ .baδ ì
wheneve≥ thσ filσ i≤ editeΣ anΣ saveΣ anΣ morσ importantly¼ four ì
extrß (anΣ unnecessary⌐ ke∙ stroke≤ arσ needeΣ t∩ brinτ thσ filσ ì
int∩ use« Herσ arσ thσ file≤ you'l∞ bσ using:
MERGE.DOC Yo⌡ havσ alread∙ useΣ thi≤ onσ t∩ prin⌠ thσ ì
áááááááááááááááááááádocument you are reading.
ENVADDR mean≤ literall∙ "ENVelopσ ADDRessó anΣ wil∞ bσ ì
ááááááááááááááááááááuseΣ t∩ addres≤ envelopes« Wheε yo⌡ preparσ ì
ááááááááááááááááááááyou≥ owε ENVADD╥ file¼ yo⌡ wil∞ usσ you≥ owε ì
ááááááááááááááááááááreturε addres≤ rathe≥ thaε thσ fictitiou≤ onσ ì
ááááááááááááááááááááused in the exercise.
ADDFILE mean≤ ADDres≤ FILE« Thσ filσ wil∞ contaiε ì
áááááááááááááááááááánames¼ addresses¼ anΣ othe≥ datß pertinen⌠ t∩ ì
ááááááááááááááááááááthe mailing list.
LTRMERGE mean≤ LeTte╥ tha⌠ wil∞ bσ MERGEd« Iε actua∞ ì
ááááááááááááááááááááuse¼ ╔ generall∙ usσ ß filenamσ tha⌠ follow≤ ì
áááááááááááááááááááámy normal "naming" procedure.
ENV ááááái≤ thσ filσ yo⌡ wil∞ usσ t∩ addres≤ thσ ì
ááááááááááááááááááááENVelope≤ fo≥ thσ letter≤ yo⌡ prin⌠ usinτ ì
ááááááááááááááááááááLTRMERGE.
.paèENVADDR - Background
1« Onσ oµ MailMerge'≤ prin⌠ command≤ i≤ ".AVó whicΦ mean≤ ì
(literally⌐ "Asδ fo≥ Variable≤ a⌠ printinτ time.ó Iε thi≤ inì
stancσ we'l∞ usσ .A╓ t∩ asδ thσ operato≥ (you¼ tha⌠ is⌐ thσ namσ ì
anΣ addres≤ t∩ placσ oε thσ envelope« Yourô returε addres≤ wil∞ ì
bσ iε thσ file¼ s∩ wσ won'⌠ neeΣ t∩ ente≥ that.
2. Your ENVADDR file looks like this:
.op
.mt 0
.pf off
.po 3
.av name
.av street
.av city
Mabel Smith
12 34th Street
Somewhere, Somestate 98765
&name&
&street&
&city&
.pa_________________________________________________________________
3« Thσ examplσ filσ (ENVADDR⌐ use≤ thσ defaul⌠ "Variablσ ì
Namσ Symboló showε oε pagσ 5-5¼ Appendi° 5¼ oµ you≥ WordSta≥ ì
Manual« I'φ referrinτ t∩ thσ ampersanΣ (&⌐ tha⌠ precede≤ anΣ ì
follow≤ eacΦ variable« Iµ you'Σ rathe≥ usσ somσ othe≥ symbo∞ yo⌡ ì
caε changσ b∙ "reinstallingó WordStar« ╔ chosσ t∩ sta∙ witΦ thσ ì
defaul⌠ (&⌐ becausσ thσ example≤ iε MicroPro'≤ manual≤ usσ it« ì
(I'φ no⌠ smar⌠ enougΦ t∩ translatσ o≥ transposσ symbol≤ wheε I'φ ì
tryinτ t∩ follo≈ ß tex⌠ t∩ learε ß system.⌐ Iµ yo⌡ decidσ t∩ usσ ì
ß differen⌠ symbol¼ ╔ sugges⌠ tha⌠ yo⌡ defe≥ changinτ unti∞ yo⌡ ì
arσ familia≥ witΦ MailMergσ anΣ it≤ characteristic≤ anΣ idiosynì
crasies.
4. Let's go over the "dot commands" used with ENVADDR:
.op omit automatic page numbering
.mt 0ááááálet≤ u≤ star⌠ printinτ thσ returε addres≤ a⌠
áááááááááááááááwhatever point the envelope is positioned
.pf off turns off "print time line forming" which wouldèááááááááááááááácausσ automatiπ "worΣ wrapó iε casσ oµ ß lonτ ì
áááááááááááááááaddress that extended beyond column 65
.po 3áááááreduce≤ "pagσ offsetó t∩ │ column≤ s∩ thσ returε ì
áááááááááááááááaddress will be near the left margin
.a÷ name¼ street¼ cit∙ identifie≤ thσ variable≤ yo⌡ wil∞ ì
bσ askeΣ fo≥ wheε yo⌡ star⌠ t∩ prin⌠ thσ envelope
5« Yo⌡ ough⌠ t∩ bσ familia≥ witΦ you≥ namσ anΣ address¼ s∩ ì
we'll not have to discuss that.
6. Next we find &name&
&street&
&city& which translates to (for example):
John Doe
123 4th Street
Possum Trot, Oregon 99999
Notσ tha⌠ STREE╘ i≤ no⌠ literall∙ thσ stree⌠ no≥ i≤ CIT┘ limiteΣ ì
t∩ jus⌠ thσ city« Thσ term≤ NAME¼ STREET¼ anΣ CITY arσ term≤ ì
tha⌠ youô givσ thσ worΣ processo≥ s∩ tha⌠ i⌠ wil∞ quer∙ yo⌡ (t∩ ì
fil∞ iε thσ blanks⌐ anΣ theε positioε thσ informatioε (you≥ ì
answe≥ t∩ thσ query⌐ iε thσ righ⌠ place« I⌠ wouldn'⌠ makσ an∙ ì
sensσ t∩ d∩ so¼ bu⌠ yo⌡ couldô usσ (iε lie⌡ oµ NAME¼ STREET¼ anΣ ì
CITY) DOG¼ CAT¼ anΣ CANAR┘ -- o≥ ONE¼ TWO¼ anΣ THRE┼ -- a≤ lonτ ì
a≤ yo⌡ usσ thσ samσ term≤ iε thσ .A╓ line≤ a≤ yo⌡ d∩ witΦ thσ ì
ampersands.
7. Close the file with .PA - the normal "page break."
8« Thσ filσ ENVADD╥ i≤ calleΣ ß maste≥ documenté anΣ is¼ iε ì
effect¼ ß blanδ forφ tha⌠ i≤ partiall∙ filleΣ ou⌠ anΣ tha⌠ wil∞ ì
be completed at the time of printing.
9« ╔ havσ froφ onσ t∩ threσ version≤ oµ ENVADD╥ oε eacΦ oµ ì
m∙ disk≤ useΣ fo≥ correspondence« Yo⌡ migh⌠ wan⌠ t∩ usσ thi≤ ì
versioε fo≥ plaiε No« 1░ envelope≤ anΣ anothe≥ versioε fo≥ thσ ì
smalle≥ envelope≤ useΣ fo≥ notes« (Bσ surσ t∩ usσ ß differen⌠ ì
filenamσ fo≥ othe≥ versions.)
.paèENVADDR - Printing
1« Inser⌠ ß disδ containinτ WordSta≥ anΣ MailMergσ iε ì
Drive A and the disk containing ENVADDR in Drive B.
2« Turn oε thσ printer« Inser⌠ aε envelopσ s∩ tha⌠ thσ to≡ ì
is about one line above the print wheel.
3. Call up WordStar and log onto Drive B.
4. Enter "M" (for MailMerge), press RETURN.
5. See: Name of File to MailMerge?
6. Enter ENVADDR and press ESCAPE.
NOTE: Step 7 will not start until printer is all ready to go!
7. See: NAME? Enter John Doe, press RETURN
8. See: STREET? Enter 123 4th Street, press RETURN
9. See: CITY? Enter Lost Wages, NV 12345, press RETURN
...and STAND CLEAR while envelope is printed!
.paèADDFILE
1« ADDFIL┼ i≤ ß datß fileé tha⌠ contain≤ thσ informatioε ì
tha⌠ wil∞ bσ mergeΣ int∩ ß "maste≥ documentó b∙ MailMerge« Datß ì
file≤ arσ createΣ and/o≥ editeΣ iε thσ non-documen⌠ mode╗ tha⌠ ì
is¼ usσ "Nó rathe≥ thaε "Dó wheε openinτ o≥ editinτ thσ file.
2« Iµ yo⌡ wan⌠ t∩ ruε ß prooµ shee⌠ oµ ß datß file¼ you'Σ ì
bette≥ pu⌠ thσ pape≥ iε thσ printe≥ "thσ lonτ wayó becausσ indiì
vidua∞ "recordsó (onσ linσ oµ thσ file⌐ ofteε exceeΣ ß norma∞ ì
pagσ width« Also¼ yo⌡ ma∙ neeΣ t∩ turε Prin⌠ Timσ Linσ Forminτ ì
"offó wheε printing.
3. Your ADDFILE looks like this:
.cw 10
.pf off
.po 5
1,Charles Applegate,Dog Catcher,12345 W. North, "Chicago,IL 11111",Charlie,Chicago
2,E. L. Baker,,2345 S. East St.,"Amarillo,TX 22222",Ed,Amarillo
3,Mrs. Mary Caruso,Secretary,345 N. West Drive,"Barrington, IL 33333",Mary,Barrington
4,"HarolΣ L« Doggett,M.D.",HealtΦ Officer,Bo° 177,"Windsor¼ CT 44444",Hal,Windsorì
.cw 11
.po 15
4« Notσ tha⌠ eacΦ recordé (ß singlσ linσ oµ thσ file⌐ ì
consist≤ oµ ß serie≤ oµ datß fieldsé al∞ separateΣ b∙ commas« ì
(Thσ commß i≤ thσ defaul⌠ "datß fielΣ separatoró showε oε pagσ ì
5-5¼ Appendi° 5¼ WordSta≥ manual.⌐ Notσ als∩ tha⌠ ß datß fieldé ì
tha⌠ contain≤ ß commß i≤ surroundeΣ b∙ quotatioε marks.
5« Sometime≤ ß datß fielΣ mus⌠ bσ lef⌠ blank« Example║ ì
Threσ oµ thσ record≤ includσ ß TITLE« Wσ havσ t∩ sho≈ ß fielΣ ì
fo≥ TITL┼ eveε iµ thσ individua∞ ha≤ none¼ s∩ wσ creatσ ß "dummyó ì
fielΣ witΦ ß seconΣ comma« (Seσ RecorΣ No« 2¼ followinτ thσ namσ ì
"E« L« Baker."⌐ ┴ spacσ betweeε thσ tw∩ comma≤ oµ ß dumm∙ fielΣ ì
i≤ optional.
6« EacΦ RECOR─ iε ß datß filσ mus⌠ havσ thσ samσ numbe≥ oµ ì
fields« (MailMergσ canno⌠ read« Al∞ i⌠ caε d∩ i≤ coun⌠ - i⌠ ì
count≤ datß fields«) Iµ onσ recorΣ ha≤ fewe≥ field≤ thaε thσ nex⌠ ì
i⌠ throw≤ thσ coun⌠ "offó anΣ MailMergσ blissfull∙ print≤ wronτ ì
datß iε thσ blanks.
7« Iε thσ maste≥ document≤ we'l∞ tel∞ MailMergσ ho≈ man∙ ì
datß field≤ arσ iε eacΦ record¼ anΣ we'l∞ assigε arbitrar∙ (o≥ ì
logical⌐ name≤ t∩ eacΦ field.
.paèLTRMERGE - Background
1« LTRMERG┼ i≤ ß maste≥ documenté and¼ likσ othe≥ maste≥ ì
documents¼ i≤ ß blanδ forφ tha⌠ wil∞ bσ completeΣ b∙ MailMergσ ì
usinτ ADDFIL┼ t∩ fil∞ iε thσ blanks.
2. Now for a look at LTRMERGE:
.op
.cw 11
.df ADDFILE
.rv N, NAME1, TITLE, ADDRESS1, ADDRESS2, NAME2, LOCALE
Mabel Smith
12 34th St. NW
Somewhere, Somestate 98765
24 June 1987
&NAME1&
&TITLE/O&
&ADDRESS1&
&ADDRESS2&
Dear &NAME2&:
Thi≤ i≤ jus⌠ ß shor⌠ examplσ oµ ß forφ lette≥ tha⌠ wil∞ bσ sen⌠ ì
t∩ ß numbe≥ oµ people« WitΦ an∙ lucδ a⌠ all¼ eacΦ oµ theφ wil∞ ì
thinδ tha⌠ his/her≤ i≤ aε original« B∙ thσ way¼ ho≈ arσ thing≤ ì
in &LOCALE&?
Sincerely,
Mabel
.pa_________________________________________________________________
3. How about those crazy dot commands?
.op Iµ yo⌡ don'⌠ turε ofµ thσ automatiπ pagσ ì
ááááááááááááááánumbering¼ eacΦ pagσ wil∞ bσ sequentiall∙ ì
ááááááááááááááánumbered« Fo≥ example¼ thσ 2nΣ pagσ oµ thσ 12tΦ ì
ááááááááááááááá2-page letter would be numbered "24."
.cw 11ááááUse whatever spacing is appropriate.
.df addfilσ identifie≤ thσ datß filσ tha⌠ wil∞ bσ useΣ t∩ ì
áááááááááááááááfill in the blanks in the master document
.rv n, name1,title,address1,address2,name2,localσ ì
áááááááááááááááidentifies thσ field≤ iε each record« (ReaΣ ì
áááááááááááááááVariables)
.paè Let'≤ comparσ thσ .R╓ linσ witΦ thσ informatioε iε ì
áááááááááááááááthe data file (ADDFILE).
n, name1 , title , address1 , address2 ,name2,locale
1,Chas« Apple,Catcher,23 W« North,"Reno, NV 11111",Chuck,Reno
╔ usσ "nó fo≥ thσ numbe≥ oµ thσ recorΣ onl∙ becausσ thσ ì
áááááMailMergσ manua∞ showeΣ it« Thσ recorΣ numbe≥ i≤ no⌠ ì
áááááactuall∙ necessary¼ bu⌠ i⌠ help≤ mσ ß little« Thσ importan⌠ ì
áááááthinτ t∩ remembe≥ i≤ tha⌠ YO╒ MUS╘ GIV┼ ┴ GENERI├ NAM┼ T╧ ì
áááááEACH FIELD WITHIN THE RECORD.
ì
4« You'rσ familia≥ witΦ thσ usσ oµ thσ ampersanΣ (&⌐ t∩ ì
identif∙ generiπ name≤ t∩ bσ filleΣ iε froφ thσ datß file« Noì
tice¼ though¼ thσ seconΣ generiπ herσ (TITLE⌐ i≤ followeΣ b∙ ß ì
"slasΦ Capita∞ O.ó That'≤ ou≥ wa∙ oµ talkinτ t∩ MailMerge« ì
Decoded¼ i⌠ means║ "Hey¼ MailMergeí Iµ therσ i≤ n∩ TITL┼ showε ì
fo≥ someone¼ don'⌠ worry« Jus⌠ bσ surσ yo⌡ don'⌠ leavσ ß blanδ ì
space!ó Withou⌠ thσ "/Oó thσ seconΣ lette≥ woulΣ havσ thσ ì
addresseσ showε as║
E. L. Baker
2345 S. East St.
Amarillo, TX 22222
.paèLTRMERGE - Printing
1« Inser⌠ you≥ Wordstar/MailMergσ disδ iε Drivσ ┴ anΣ you≥ ì
new (MERGE) disk in Drive B.
2. Call up WordStar and log on to Drive B.
3« Se⌠ thσ printe≥ fo≥ thσ typσ pape≥ you'l∞ bσ usinτ -- ì
either continuous form paper or individual sheets.
4. Enter "M" (for MailMerge) and press RETURN.
5. See: Name of File to MailMerge?
6. Enter LTRMERGE and press ESCAPE.
7« StanΣ clea≥ whilσ al∞ fou≥ letter≤ arσ beinτ printeΣ -- ì
unles≤ yo⌡ arσ usinτ individua∞ sheet≤ anΣ havσ t∩ inser⌠ thσ ne≈ ì
pape≥ fo≥ lette≥ 2¼ 3¼ anΣ 4.
NOTE║ BotΦ the "Pó (Print⌐ anΣ "Mó (MailMerge⌐ command≤ caε bσ ì
actuateΣ b∙ eithe≥ RETUR╬ or ESCAPE« Thσ latte≥ eliminate≤ thσ ì
neeΣ t∩ answe≥ al∞ thosσ sill∙ question≤ beforσ wσ ge⌠ starteΣ ì
printing.
ANOTHE╥ NOTE║ Iµ yo⌡ scre≈ u≡ anΣ (fo≥ example⌐ neeΣ t∩ reprin⌠ ì
letter≤ 2¼ 3¼ anΣ 4¼ MailMergσ think≤ thσ 2nΣ lette≥ i≤ pagσ 2¼ ì
thσ thirΣ i≤ pagσ 3¼ etc« (That'≤ becausσ theseô arσ one-pagσ ì
letters.⌐ Yo⌡ caε usσ thσ RETUR╬ rathe≥ thaε ESCAPE¼ answe≥ thσ ì
2nΣ questioε witΦ ß "2ó anΣ theε pres≤ ESCAP┼ anΣ awa∙ wσ go!
STIL╠ ANOTHE╥ NOTE║ MailMergσ ha≤ anothe≥ optioε tha⌠ yo⌡ migh⌠ ì
finΣ usefu∞ iε norma∞ printing║ multiplσ copies« Supposσ yo⌡ ì
neeΣ fou≥ origina∞ copie≤ oµ ß particula≥ file« InsteaΣ oµ usinτ ì
"Pó usσ "Mó anΣ RETUR╬ fo≥ printing« Wheε askeΣ "Numbe≥ oµ ì
Copies?ó ente≥ "4ó anΣ pres≤ ESCAPE.
.paèENV - Background
1« EN╓ i≤ ß maste≥ documenté anΣ wil∞ bσ useΣ t∩ prin⌠ ì
envelope≤ fo≥ thσ fou≥ letter≤ yo⌡ jus⌠ no≈ printeΣ usinτ ì
LTRMERGE.
2. The file looks like this:
.MT 0
.OP
.PF OFF
.PO 2
.DF ADDFILE
.RV N,NAME1,TITLE,ADDRESS1,ADDRESS2,NAME2,LOCALE
áMable Smith
á12 34th Street
áSomewhere, Somestate 98765
ááááááááááááááááááááááááááááááááááááááá&NAME1&
ááááááááááááááááááááááááááááááááááááááá&TITLE/O&
&ADDRESS1&
&ADDRESS2&
.PA_________________________________________________________________
3« D∩ thσ do⌠ command≤ looδ familiar┐ ╔ haven'⌠ usσd aì
characte≥ widtΦ (.cw⌐ commanΣ s∩ thσ defaul⌠ wil∞ apply« Iµ yo⌡ ì
arσ usinτ ß ver∙ daint∙ prin⌠ yo⌡ migh⌠ wan⌠ t∩ closσ i⌠ u≡ ß bi⌠ ì
b∙ usinτ .c≈ 1░ o≥ eveε .c≈ 9.
4« Notσ tha⌠ .R╓ identifie≤ allô thσ datß field≤ eveε ì
thougΦ wσ won'⌠ usσ al∞ oµ theφ iε addressinτ thσ envelopes« ì
Remember║ MailMergσ onl∙ countsô wha⌠ i⌠ reads; i⌠ doesn'⌠ ì
understandô wha⌠ i⌠ reads.
.paèENV - Printing
1« Prin⌠ thσ envelope≤ exactlyô a≤ yo⌡ diΣ thσ letter≤ ì
EXCEPTé se⌠ thσ printe≥ fo≥ individua∞ sheetsí Iµ yo⌡ don't¼ thσ ì
seconΣ addres≤ wil∞ bσ printeΣ oε thσ plateε beforσ yo⌡ caε ge⌠ ì
thσ damε thinτ stopped«
2« Again¼ MailMergσ wil∞ conside≥ eacΦ envelopσ t∩ bσ ß ì
separatσ page« That'≤ hand∙ wheε yo⌡ havσ t∩ g∩ bacδ anΣ d∩ onσ ì
(o≥ more⌐ ove≥ again.
REVIEW
1« MailMergσ i≤ ß ver∙ usefu∞ supplemen⌠ t∩ WordStar« I⌠ ì
i≤ jus⌠ a≤ orner∙ a≤ WordSta≥ iε tha⌠ it'l∞ d∩ wha⌠ yo⌡ tel∞ it¼ ì
even if you tell it wrong!
> Check and re-check your data files.
> Check and re-check your master documents.
2« No≈ tha⌠ you'vσ seeε wha⌠ Mailmergσ caε d∩ (We'vσ jus⌠ ì
scratcheΣ thσ surface!⌐ anΣ you'vσ los⌠ somσ oµ you≥ fearÿ ì
hesitancy¼ it'≤ probabl∙ safσ no≈ fo≥ yo⌡ t∩ reaΣ thσ manual.
3. Make haste slowly!
.paèCONDITIONAL PRINTING
1« Iε ou≥ examplσ "LTRMERGEó wσ sen⌠ thσ samσ lette≥ t∩ ì
severa∞ people« Bu⌠ supposσ wσ wan⌠ t∩ writσ ß 3-paragrapΦ ì
lette≥ anΣ senΣ thσ firs⌠ tw∩ paragraph≤ t∩ somσ peoplσ anΣ senΣ ì
paragraph≤ ▒ anΣ │ t∩ thσ others« Fortunately¼ MailMergσ ha≤ ì
somσ morσ do⌠ command≤ tha⌠ wil∞ makσ thσ tasδ possible:
.IF means "IF true. . ."
.EX means "EXcept when true. . ." (or simply, if false)
.EF means "Skip to here when directed by .IF or .EX."
2« I⌠ ma∙ bσ simple≥ t∩ adΣ somσ "conditionaló paragraph≤ ì
t∩ ou≥ LTRMERG┼ example« We'l∞ givσ ou≥ ne≈ lette≥ ß ne≈ name¼ ì
though« Let'≤ cal∞ i⌠ LTRMERG2.
.op
.cw 11
.df ADDFILE
.rv N, NAME1, TITLE, ADDRESS1, ADDRESS2, NAME2, LOCALE
Mabel Smith
12 34th St. NW
Somewhere, Somestate 98765
24 June 1987
&NAME1&
&TITLE/O&
&ADDRESS1&
&ADDRESS2&
Dear &NAME2&:
Thi≤ i≤ jus⌠ ß shor⌠ examplσ oµ ß forφ lette≥ tha⌠ wil∞ bσ sen⌠ ì
t∩ ß numbe≥ oµ people« WitΦ an∙ lucδ a⌠ all¼ eacΦ oµ theφ wil∞ ì
thinδ tha⌠ his/her≤ i≤ aε original« B∙ thσ way¼ ho≈ arσ thing≤ ì
in &LOCALE&?
.EX &NAME2& = "Mary" GOTO
Will yo⌡ arrangσ fo≥ facilitie≤ fo≥ ou≥ Sprinτ meeting┐ ┴ smal∞ ì
conferencσ rooφ shoulΣ suffice« ┴ restauran⌠ shoulΣ bσ a⌠ o≥ ì
nea≥ thσ selecteΣ site.
.EF
.IF &NAME2& = "Mary" GOTO
I'vσ askeΣ Mar∙ t∩ arrangσ fo≥ facilitie≤ (witΦ ß restauran⌠ ì
nearby⌐ fo≥ ou≥ Sprinτ meeting« I'l∞ le⌠ yo⌡ kno≈ thσ detail≤ ì
wheε ╔ hea≥ froφ her« You'l∞ bσ ablσ t∩ attend¼ won'⌠ you¼ ì
&NAME2&?
.EF
Sincerely,
.paè Let's analyze the .EX and .IF commands.
.EX &NAME2& = "Mary" GOTO (See Note 1)
Will yo⌡ arrangσ fo≥ facilitie≤ fo≥ ou≥ Sprinτ meeting┐ ┴ smal∞ ì
conferencσ rooφ shoulΣ suffice« ┴ restauran⌠ shoulΣ bσ a⌠ o≥ ì
nea≥ thσ selecteΣ site.
.EF
.IF &NAME2& = "Mary" GOTO (See Note 2)
I'vσ askeΣ Mar∙ t∩ arrangσ fo≥ facilitie≤ (witΦ ß restauran⌠ ì
nearby⌐ fo≥ ou≥ Sprinτ meeting« I'l∞ le⌠ yo⌡ kno≈ thσ detail≤ ì
wheε ╔ hea≥ froφ her« You'l∞ bσ ablσ t∩ attend¼ won'⌠ you¼ ì
&NAME2&?
.EF (See Note 3)
Sincerely,
Notes: 1. Noticσ tha⌠ "Maryó use≤ uppe≥ anΣ lowe≥ casσ ì
áááááááááááááááletters¼ jus⌠ a≤ i⌠ appear≤ iε ADDFILE« "EXcepté_ ì
áááááááááááááááwherσ_&NAME2ª_is_"Maryó_jum≡_t∩_thσ_nex⌠_'.EF.'"
2« "IF_&NAME2&_is_"Mary"_jump_to_the_next_'.EF.'"
3« Thi≤ ".EFé tell≤ MailMergσ t∩ star⌠ readinτ thσ ì
áááááááááááááááfilσ again¼ anΣ sincσ therσ i≤ n∩ exceptioε (.I╞ ì
áááááááááááááááor .EX) to start printing.
Prin⌠ LTRMERG2é usinτ MailMerge« Usσ thσ "returnó sequencσ t∩ ì
star⌠ thσ printinτ iµ yo⌡ wan⌠ t∩ prin⌠ onl∙ page≤ ▓ anΣ 3¼ fo≥ ì
example.
MailMergσ als∩ allow≤ u≤ t∩ usσ "Comple° Conditiona∞ Commands.ó ì
(The operative word here is "complex.")
.IF &NAME2ª ╜ "Maryó .OR« &NAME2ª ╜ "Charlieó GOT╧ -- ì
ááááááááááschedule≤ ß jum≡ iµ thσ lette≥ i≤ addresseΣ eithe≥ t∩ ì
ááááááááááMar∙ o≥ Charlie.
Sometimes we may want to use a "Comparison" character.
.IF &Nª >╜ "2ó GOT╧ -- Iµ "Nó i≤ greate≥ thaε o≥ equa∞ t∩ ì
áááááááááá"2", then jump to .EF.
We can even combine "Complex" and "Comparison" like this:
.IF &Nª ╛ "1ó .AND« &Nª ╝ "4ó GOT╧ -- (Iµ "Nó i≤ greate≥
ááááááááááthan "1" and also is less than "4" then . . .)
Thesσ "comparisonó character≤ woulΣ bσ usefu∞ if¼ fo≥ example¼ wσ ì
had established a separate DATA FIELD for Zip Codes.
No≈ tha⌠ you'vσ seeε i⌠ worδ yo⌡ ma∙ wan⌠ t∩ browsσ througΦ ì
Section 5. of the MailMerge Manual.
.paèMENU
Anothe≥ usσ fo≥ MailMergσ i≤ onσ describeΣ b∙ JosepΦ Comandß ì
iε aε articlσ iε thσ MarcΦ 198╖ issuσ oµ PROFILES« (You'l∞ neve≥ ì
finΣ thi≤ examplσ iε thσ MailMergσ manual!)
Thσ examplσ tha⌠ follow≤ deal≤ witΦ addressinτ envelopes¼ ì
bu⌠ thσ "programó caε bσ custoφ tailoreΣ t∩ d∩ wha⌠ youô wan⌠ i⌠ ì
t∩ do« Fo≥ myô use¼ I'vσ madσ i⌠ t∩ prin⌠ addres≤ label≤ fo≥ ì
severa∞ peoplσ witΦ whoφ ╔ corresponΣ mos⌠ often« Oµ coursσ yo⌡ ì
caε makσ i⌠ d∩ whateve≥ yo⌡ wan⌠ - o≥ need- i⌠ t∩ do« AnΣ sincσ ì
it is "menu driven" you can make it do several things.
Here is what your "menu" looks like:
PRINT SELECTION MENU ì
=============================================== ì
1. AKINS 4. EZ-LABEL 7. ì
2. BULLOCK 5. 8. ì
3. COLLINS 6. 9. ì
10. quit ì
=============================================== ì
Enter the number of your selection: ì
Noticσ tha⌠ thσ men⌡ tell≤ yo⌡ how t∩ choosσ thσ particula≥ ì
produc⌠ tha⌠ yo⌡ desire« Thσ prograφ wil∞ als∩ tel∞ yo⌡ iµ you'vσ ì
made a mistake and what to do to correct it!
Let'≤ "runó i⌠ once¼ jus⌠ t∩ ge⌠ thσ fee∞ oµ wha⌠ i⌠ wil∞ ì
do for us. But first, a couple of cautions:
> I⌠ wil∞ bσ easie≥ t∩ usσ (anΣ wil∞ worδ faster⌐ iµ yo⌡ ì
ááááááááááturε ofµ thσ filσ displa∙ first« (A⌠ thσ Openinτ Men⌡ ì
ááááááááááenter F.)
> WordSta≥ shoulΣ notô bσ se⌠ t∩ pausσ betweeε pagσ ì
breaks« (I'φ talkinτ abou⌠ WordStar¼ no⌠ thσ printer« ì
ááááááááááI'l∞ tel∞ yo⌡ ho≈ t∩ bσ surσ it'≤ se⌠ righ⌠ iε ß ì
ááááááááááminute.)
.paèRunning MENU
1. Enter: F.
2. Enter: M.
See: Name of file to MailMerge?
3. Enter: MENU <Ret>* or <Esc>
a.* See: Disk File output (Y/N)? <Ret>
b.* See: Start at Page number.... <Ret>
c.* See: Stop after Page number...<Ret>
d.* See: Use Form Feeds? (Y/N)
4. Enter: Y <Esc>
* Thi≤ sequencσ i≤ necessar∙ iµ WordStar'≤ Forφ ì
ááááááááááááááááááááFeeΣ Togglσ (optioε "Oó iε thσ Men⌡ oµ Wordì
ááááááááááááááááááááSta≥ Feature≤ iε thσ WordSta≥ Installatioε ì
ááááááááááááááááááááprocedure⌐ i≤ se⌠ t∩ "off.ó Iµ thσ togglσ i≤ ì
ááááááááááááááááááááse⌠ t∩ "on,ó merel∙ ente≥ <Esc╛ a⌠ Ste≡ │ ì
áááááááááááááááááááárathe≥ thaε usinτ thσ <Ret╛ sequence.
I'vσ se⌠ u≡ thi≤ versioε oµ MEN╒ fo≥ teε selections¼ onl∙ fivσ oµ ì
whicΦ arσ used« Thσ las⌠ (Numbe≥ 10⌐ i≤ thσ "escapeó sequencσ t∩ ì
ge⌠ yo⌡ bacδ t∩ WordStar« Therσ arσ practica∞ limit≤ t∩ thσ ì
numbe≥ oµ option≤ o≥ selections║ Onσ constrain⌠ i≤ thσ sizσ oµ ì
you≥ screeε - thσ numbe≥ oµ line≤ anΣ thσ numbe≥ oµ columns« Thσ ì
othe≥ i≤ thσ numbe≥ oµ thσ file≤ tha⌠ yo⌡ aε pu⌠ oε you≥ disk« ì
(Yo⌡ wil∞ havσ t∩ establisΦ ß separatσ filσ fo≥ eacΦ oµ thσ ì
selection≤ showε plu≤ onσ fo≥ MENU.)
First¼ let'≤ prin⌠ an envelopσ fo≥ eacΦ oµ thosσ peoplσ wσ havσ ì
listed. (Use scrap paper, not new envelopes!)
1« Ente≥ "1ó <Ret╛ (╔ hopσ yo⌡ havσ thσ pape≥ iε thσ ì
printer.
2. Watch message on screen - then the menu will come back.
3. Enter "15" <Ret>
4. See the message on the screen.
5. Enter "4" <Ret> to print a string of 5 labels.
6. Enter "10" <Ret> to quit and return to WordStar.
7. Enter "F to get the file display back.
.paè╔ aφ goinτ t∩ sho≈ yo⌡ wha⌠ thσ filσ "MENUó look≤ likσ s∩ tha⌠ ì
yo⌡ caε changσ i⌠ t∩ fi⌠ yourô need≤ iµ i⌠ appeal≤ t∩ you.
(Notes)*
.DM PRINT SELECTION MENU aì
.DM =============================================== ì
.DM 1. AKINS 4. EZ-LABEL 7. ì
.DM 2. BULLOCK 5. 8. ì
.DM 3. COLLINS 6. 9. ì
.DM 10. quit ì
.DM =============================================== ì
.AV" Enter the number of your selection: ",CHOICE,2 bì
.EX &CHOICE& > "0" .AND. &CHOICE& < "11" GOTO WRONG cì
.IF &CHOICE& = "10" GOTO END dì
.CS eì
.DM N O W P R I N T I N G ì
.FI FILE.&CHOICE& fì
.IF &CHOICE& > "0" .AND. &CHOICE& < "10" GOTO REPEAT gì
.EF WRONG ì
.CS ì
.AV" INVALID OPTION! Hit RETURN and try again.",RETURNì
.EF REPEAT ì
.CS ì
.FI MENU hì
.EF END
*Notes:
a. .DM means "Display Message on screen."
b.ááá.AVé mean≤ "Asδ fo≥ Variables,ó jus⌠ a≤ i⌠ diΣ iε ì
áááááááááááááááou≥ ENVADDRé file« Thσ variablσ beinτ askeΣ fo≥ i≤ ì
ááááááááááááááá"choice,ó showε nea≥ thσ righ⌠ edgσ oµ thσ line« ì
áááááááááááááááThσ figurσ "2ó allow≤ u≤ t∩ ente≥ u≡ t∩ ▓ digits« ì
áááááááááááááááThσ quotatioε mark≤ makσ thσ encloseΣ word≤ ì
ááááááááááááááárespond as though we had used .DM.
c.áááIµ yo⌡ alte≥ thσ numbe≥ oµ choices¼ jus⌠ remembe≥ ì
ááááááááááááááátha⌠ thσ large≥ numbe≥ ("11ó iε thi≤ case⌐ mus⌠ bσ ì
ááááááááááááááálarge≥ b∙ "1ó thaε thσ las⌠ option« Thσ linσ ì
áááááááááááááááreads║ "EXcep⌠ wheε thσ choicσ i≤ large≥ thaε '0' ì
áááááááááááááááanΣ les≤ thaε '11º jum≡ t∩ 'WRONG'.ó Iµ wσ choosσ ì
ááááááááááááááá"15"¼ wσ jum≡ t∩ "wrong"¼ ge⌠ ß .C╙ (Clea≥ Screen⌐ ì
áááááááááááááááand a chance to try again1
d« Thσ "10ó i≤ equa∞ t∩ thσ larges⌠ numbe≥ yo⌡ have¼ ì
or the "quit" option.
e.ááá.CSé mean≤ "Clea≥ Screen.ó Iε thi≤ casσ it≤
ááááááááááááááápurposσ i≤ t∩ makσ rooφ fo≥ thσ nex⌠ messagσ whicΦ
ááááááááááááááái≤ "╬ ╧ ╫ ╨ ╥ ╔ ╬ ╘ ╔ ╬ Gó anΣ reall∙ serve≤ n∩
áááááááááááááááusefu∞ purpose.
.paè f. .FIé mean≤ "Filσ Insert.ó Thσ variablσ "&CHOICEª" ì
áááááááááááááááequate≤ t∩ thσ numbe≥ oµ you≥ choice¼ s∩ thσ filσ ì
ááááááááááááááátha⌠ i≤ inserteΣ (fo≥ printing⌐ i≤ thσ onσ havinτ ì
áááááááááááááááthσ numbe≥ yo⌡ chose« Example║ Selec⌠ #▓ anΣ ì
áááááááááááááááFILE.2 is printed.
g. Thσ "10ó i≤ alway≤ equa∞ t∩ thσ larges⌠ numbe≥ iε ì
áááááááááááááááyou≥ menu« Wha⌠ thσ linσ say≤ i≤ "Iµ you≥ choicσ ì
ááááááááááááááái≤ large≥ thaε "0ó anΣ les≤ thaε "10ó jum≡ t∩ ì
áááááááááááááááREPEAT«
h.áááREPEA╘ give≤ u≤ firs⌠ ß clea≥ screen¼ theε ß filσ ì
áááááááááááááááinser⌠ - MEN╒ - whicΦ start≤ u≤ al∞ ove≥ again.)
Wheε wσ choosσ t∩ quit¼ wσ ge⌠ instruction≤ oε thσ screeε abou⌠ ì
how to get back to WordStar.
Here is FILE.1:
.op ì
.mt 0 ì
.pf off ì
.po 3 ì
Mabel Smith ì
12 34th Street ì
Somewhere, Somestate 98765 ì
ì
ì
ì
ì
ì
ì
ì
ì
ì
Archie Able ì
123 97th Ave. ì
Hereandthere, OK 76666
.pa
----------------------------------------------------------------ì
FILE.2 and FILE.3 are set up in exactly the same form.
FILE.┤ wil∞ prin⌠ u≤ ß strinτ oµ fivσ labels¼ s∩ it≤ forma⌠ i≤ ì
different. Look at the next page.
.paè .mt 2 ì
.op ì
.po 2 ì
.cw 9 ì
Frank S. Doggett ì
456 78th Street ì
Springfield, CA 98777 ì
ì
ì
ì
Frank S. Doggett ì
456 78th Street ì
Springfield, CA 98777 ì
ì
ì
ì
Frank S. Doggett ì
456 78th Street ì
Springfield, CA 98777 ì
ì
ì
ì
Frank S. Doggett ì
456 78th Street ì
Springfield, CA 98777 ì
ì
ì
ì
Frank S. Doggett ì
456 78th Street ì
Springfield, CA 98777
.pa
----------------------------------------------------------------
Some notes about MENU:
Therσ arσ thosσ amonτ u≤ wh∩ kno≈ ho≈ - anΣ likσ - t∩ writσ ì
programs« ╔ aφ no⌠ onσ oµ thoseí ╔ aφ conten⌠ (thu≤ far¼ a⌠ ì
least⌐ t∩ useô thσ program≤ someonσ elsσ ha≤ produced« Iε thσ ì
casσ oµ MENU¼ though¼ wσ havσ madσ ß kinΣ oµ ß program« Sincσ ì
I'φ no⌠ ß programmer¼ ╔ takσ refugσ iε thσ fac⌠ tha⌠ thσ realô ì
prograφ i≤ MailMerge« I'vσ jus⌠ pu⌠ somσ oµ Mailmerge'≤ talent≤ ì
t∩ worδ iε ß wa∙ mos⌠ oµ u≤ don'⌠ use.
Let'≤ seσ ho≈ man∙ option≤ (selections⌐ wσ caε use« Wσ arσ ì
limiteΣ firs⌠ b∙ thσ numbe≥ oµ column≤ oε ou≥ screen« Iµ wσ caε ì
limi⌠ thσ widtΦ oµ eacΦ oµ ou≥ column≤ oµ selection≤ (includinτ ì
thσ tw∩ digit≤ fo≥ eacΦ selection⌐ t∩ 25¼ wσ coulΣ ge⌠ threσ ì
column≤ oµ selection≤ anΣ stil∞ havσ ß blanδ spacσ betweeε colì
umns« Now¼ ho≈ man∙ lines┐ We'l∞ havσ t∩ savσ onσ fo≥ thσ ì
headinτ anΣ onσ fo≥ thσ instruction¼ anΣ allo≈ ▓ fo≥ thσ line≤ ì
tha⌠ dres≤ thσ men⌡ u≡ ß bit« Wσ havσ abou⌠ 2▓ line≤ oε ou≥ ì
screeε tha⌠ wσ caε use¼ s∩ iµ wσ savσ fou≥ fo≥ thσ essential≤ wσ ì
jus⌠ discusseΣ wσ caε usσ 1╕ fo≥ ou≥ options.
.paè Wσ caε appl∙ ß littlσ fundamenta∞ mathematic≤ t∩ thσ fact≤ ì
we'vσ jus⌠ uncovered║ 1╕ line≤ pe≥ columε ° │ column≤ ╜ 5┤ tota∞ ì
option≤ oµ whicΦ onσ (#54⌐ i≤ reserveΣ fo≥ "QUIT.ó Tha⌠ isn'⌠ ì
to∩ bad¼ considerinτ man∙ computer≤ limi⌠ thσ filσ director∙ t∩ ì
6┤ entries« I⌠ i≤ no⌠ likel∙ tha⌠ thσ disδ capacit∙ wil∞ bσ exì
ceedeΣ becausσ mos⌠ oµ thσ individua∞ file≤ wil∞ onl∙ occup∙ thσ ì
minimuφ (2K⌐ oµ spacσ pe≥ file« Remembe≥ tha⌠ yo⌡ mus⌠ savσ ì
directoryô spacσ fo≥ MEN╒ anΣ fo≥ thσ .BA╦ filσ tha⌠ i≤ generateΣ ì
wheneve≥ yo⌡ updatσ ß file« It'≤ kinΣ oµ nicσ t∩ havσ ß disk-ì
maintenancσ prograφ (e« g.¼ NS2⌐ oε thσ disk¼ too.
S∩ therσ yo⌡ havσ ití M∙ suggestioε i≤ this║ Cop∙ MEN╒ anΣ ì
thσ "selectionó file≤ t∩ anothe≥ disk« Reworδ thσ copieΣ file≤ ì
t∩ sui⌠ yourô need≤ (o≥ wants⌐ anΣ givσ ß try.
Good Luck!