.mt 6
.mb 8
.op
.po 7
..............................................................
.sv date July 17, 1987
...............................................................
.....................Information about this document
..                     Revise for each appliation
..
.sv disk2 IAT_WF.90A
..
.sv DISK1 Drive C
.sv File1 MRGBASIC.TXT
.SV PATH1 A:\<FILE1>
..
...............................................................
.....................Information about the system
..                     Revise only as needed
..
.SV EQUIP IBM AT, 20 Mb hard disk
..
.sv dos DOS 3.30
.sv file2a WORDSTAR
.sv file2b WS.COM
.sv file2c MAILMERGE
.sv file2d MAILMERGE.OVR
.sv path2 C:\COM\WS30\WS.COM and C:\COM\WS30\MAILMERGE.OVR
.sv CUST PF-1
.SV DISK2a IAT_PM.05A
.SV CUSTDOC WSCUSTPF.1
.SV PATH2A C:\COM\WS30\<CUSTDOC>
..
.sv Printer EPSON RX-80
.sv SP parallel
..
RETRIEVAL:

Processe䠠 o <equip usin <dos> <file2a an䠠 <file2c 
applicatio program foun o <disk1 unde PATȠ <path2> 
Customizatio <cust> wit documentatio  o <disk2a> fil 
<custdoc> pat <path2a> Installe fo  <printer> <SP printer 
Work produc store o Dis <disk2> fil <file1> usin 
PATH<path1>.

Prin usin MERG feature

PF
<date>
..
.pa
.pn1
.he                      -MAILMERG with BASIC-
.fo                               -#-
..
                               by
                        Paul Fleming, Jr.
                      (Boston Osborne Group)
                        83 Church Street
                      Winchester, MA 01890
                          617 729 7418

BACKGROUND

     Recemtly ɠ ha nee fo  BASI progra i whic abou 3 
parameter wer t b entere wher eac ha t b screene i 
fro fou t si way t tra incorrec entries I appeare tha 
additiona constraint migh develo a th progra emerged I 
develope tha th codin segmen (includin remarks fo eac 
paramete becam 15-2 line wit  potentia tota o abou te 
page o listing  Fo debuggin an modificatio purposes i 
woul b advantageou i th progra segment relatin t th th 
variou parameter coul b identica includin lin numbers I 
ocurre t m tha MAILMER migh b use t creat al o thi 
coding an thi prove t b correct.

     Althoug specificall writte aroun th capabilitie o 
WORDSTAҠ an MAILMERG wit suitabl modification  thi 
techniqu shoul wor fo th man version o "lis processing 
employe b othe wordprocesssors Similarly th genera metho 
shoul b applicabl t language othe tha BASIC    

     N attemp i mad her t discus BASIà programmin a 
such However i ma b helpfu t us th CHAI comman t lin 
th derive progra segment together I so th lin number o 
chaine segment nee no b coordinate betwee segments fo 
example lin numbe 1 ca appea i eac segment A use her 
th segment ar merge int on program henc th hundred 
digi i specifi t th parameter bu th ten an unit digit 
ar th sam fo comparabl step i eac segment Also al 
parameter ar entere a string an converte t numerica 
value i needed Th avoid th "Red fro start erro messag 
tha appear i  lette i entere whe  numbe i expected 
Finally BASI program nee no emplo a extende o BAS Her 
th extensio o RU i used 

PROCEDURE

     Eac o th followin step wil b discusse mor full 
below bu th genera procedur is:

a)Usin WORDSTAҠ i th non-documen mode writ  
GENERIC versio o th BASI progra i whic th 
paramete an th screenin limit ar identifie wit 
MAILMERG delimiters Us th CHAI comman o BASI a 
ᠠ las instructio t concantenat th堠 section 
together.

Eve thoug th resul i no useful sometime th 
generi versio wil ru a  BASI progra itself. 

b) Usin PCFIL o som othe simila system develo  
dat bas o al o th parameter an th screenin 
limits Regardles o th technique th dat mus b 
"comm delimited format  

c)   Writ  MAILMERǠ comman fil tha wil cal th 
severa piece togethe t inser th parameter an 
limit int th generi progra fo transformatio int 
 specifi segmen t ru i BASIC MAILMERǠ wil 
repea th transformatio fo eac paramete i th 
dat file.

Not tha th comman fil coul b incorporate int 
th generi file bu thi sometime complicate th 
debuggin process

e)I used disabl th CHAI comman an debu on 
segmen wit  shor dat fil containin example o 
eac for o th parameters Amen th generi progra 
a neede unti eac for work properly Whe al i 
working emabl th CHAI comman an ru th tw o 
thre segment together Debu th generi progra a 
required 

Whe debugging i i ver helpfu t emplo  window 
progra wit WORDSTA ( use NOTE i SIDEKICK s 
tha on ca pas quickl betwee th variou programs 

Whe workin properly appl th entir dat bas t 
deriv th entir se o segments.

Not tha whe ste e i completed eac segmen wil b exactl 
lik al o th other includin lin numbers excep tha th 
paramete name an limit wil hav bee substitute i th 
prope places I on find late tha  paramete mus b 
screene i  differen way modif th generi progra an re-
deriv al o th segment s tha th similarit i maintained 

THE PROGRAM PARTS

     Listin  i a exampl o  ver simpl generi progra 
name MRGBASIC.GEΠ tha contain MAILMER calls (Pleas not 
tha  hav altere m versio o WORDSTA s tha th MAILMER 
delimiter ar  an  rathe tha  an &. MRGBASIC.GEΠ i 
writte t accep  SINGL characte o inpu withi th limit  
define i th data I thi particula case th limit ar  
throug  inclusiv fo  numerica parameter Fo a alpha 
uppercas onl i accepte betwee th limit o th letter give i th data.

     Other limits that often find application are: 

a)   Multipl numerical i 1 2  et wher th numbe 
mus b withi certai limit suc a    < 25.

b)Singl Alphas i  o N wit uppe OR lowe cas 
being accepted

c) Multipl Alphas i ABCD uppe an lowe cas 
acceptable, but an exact quantity is required.

Suc trap ar muc mor involve tha th one use here bu 
ca b inserte i th generi progra a needed  

     Listin  i th comman fil name MRGBASIC.CF tha i t 
b th objec o MAILMERG Listin  i th dat bas name 
MRGBASIC.DT whos element wil b inserte b th comman fil 
int  BASI progra entitle MRGBASIC.RUN Listin  i thi 
BASI progra tha result fro invokin MAILMERG 

     T deriv Listin D plac WORDSTA an MAILMER i driv A 
th generi file comman fil an dat fil  i driv B Ente  
(fo MERGE) Upo receivin th promp askin fo th fil name 
ente B:MRGBASIC.CF followe b CARRIAG RETURN not ESC.

     Th syste the wil inquir i  listin t dis i 
desired answe wit Y(es) Whe aske fo th nam o th ne 
dis file ente MRGBASIC.RUN Terminat th question wit an 
ESC  Th syste the wil "print th derive fil MRGBASIC.RU 
t disk incorporatin al o th dat fil i th process 

     Whe th printin operatio terminates exi WORDSTAR plac 
BASIà i driv  an ente A:BASIà B:MRGBASIC.RUΠ <CR> 

     Wit luck th progra shoul run I no debu a required 

.pa
