demoinit ; Ed de Moel ; ; (Re)initialize database ; ; Relational: ; ; Person name | comment | Royal ; .01 10,.01 22 ; ; Address detail | street | city | state | zip | prefix | salutation (Country?) ; 4 3 5 19 18 19 ; ; EMail work | home | homepage ; 12 12 13 ; ; Phone work | home | fax | dial-out | pager | cellphone ... ; 1 2 1.5 1.7 19 20 ; | alternate | name of alternate ; 21 9 ; ; VA-FileMan: ; ; 0 NAME ^ WORK # ^ HOME # ^ XMAS_SENT ^ XMAS_REC ^ TYPE ... ; ^ Spouse name ^ Country ^ FAX # ^ DIR ^ MDM ^ pager ^ cell ; 1 STREET 1 ^ STREET 2 ^ CITY ^ STATE/Prov ^ ZIP ; 2,d1,0 Notes ; 3 E-MAIL ; 4 URL ; 5 Bitmap ^ GIF ^ Icon ; 6 Alternate # ^ Royal ; n i s i=0 ;k ^macbeth d first,email,second q ; email n m,l,n s i="" f s i=$o(^macbeth("Person",i)) q:i="" d . q:$d(^macbeth("EMail",i)) . s (x,n)=$p(^macbeth("Person",i),"|",1) . f q:n'[" " s n=$p(n," ",2,$l(n)+2) . s:n="" n=$tr(x," ") s l=96,x=n . f q:'$d(m(n)) s l=l+1,n=x_$c(l) . s l=n_"@macbeth.stratford.uk|",m(n)="" . s l=l_$s($r(5)>3:n_"@macbeth.avon.uk|",1:"|") . s l=l_$s($r(5)>2:"http://www.stratford.uk/~"_n_"/",1:"|") . s ^macbeth("EMail",i)=l . q q ; second n d0,b,g,c s d0=0,i="" f s i=$o(^macbeth("Person",i)) q:i="" d . n fm . s d0=d0+1,fm(0)="macbeth^318000^"_d0_"^"_d0 . ; . s x=^macbeth("Person",i) . s p=$p(x,"|",1),fm(d0,0)=p,fm("B",p,d0)="" . s p=$p(x,"|",2) s:p'="" fm(d0,2,1,0)=p,^fm(d0,2,0)="Notes^318000.01^1^1" . s p=$p(x,"|",3),$p(fm(d0,6),"^",2)=p . ; . s x=$g(^macbeth("Address",i)) . s p=$p(x,"|",1) s:p'="" $p(fm(d0,1),"^",2)=p . s p=$p(x,"|",2) s:p'="" $p(fm(d0,1),"^",1)=p . s p=$p(x,"|",3) s:p'="" $p(fm(d0,1),"^",3)=p . s p=$p(x,"|",4) s:p'="" $p(fm(d0,0),"^",8)=p . s p=$p(x,"|",5) s:p'="" $p(fm(d0,1),"^",5)=p . s c=$p(x,"|",3),p=$p(x,"|",4),b=$p(x,"|",5) . ; . s x=$g(^macbeth("Phone",i)) . s p=$p(x,"|",1) s:p'="" $p(fm(d0,0),"^",2)=p . s p=$p(x,"|",2) s:p'="" $p(fm(d0,0),"^",3)=p . s p=$p(x,"|",3) s:p'="" $p(fm(d0,0),"^",9)=p . s p=$p(x,"|",4) s:p'="" $p(fm(d0,0),"^",11)=p . s p=$p(x,"|",8) s:p'="" $p(fm(d0,0),"^",7)=$p(^macbeth("Person",p),"|",1) . ; . s x=$g(^macbeth("EMail",i)) . s p=$p(x,"|",2) s:p'="" fm(d0,3)=p . s p=$p(x,"|",1) s:p'="" fm(d0,3)=p . s p=$p(x,"|",3) s:p'="" fm(d0,4)=p . ; . s b=$g(^macbeth("BMP",i)),g=$g(^macbeth("GIF",i)),c=$g(^macbeth("ICO",i)) . s:b_c_g'="" fm(d0,5)=b_"^"_g_"^"_c . ; . m ^macbeth("VAFM")=fm . q q ; first ; s i=i+1,^macbeth("Person",i)="Duncan|king of Scotland|Y" s ^macbeth("Address",i)="Throne|The Castle|Dunsinane|Schotland|1|His Excellency" s ^macbeth("EMail",i)="duncan@macbeth.stratford.uk||http://www.stratford.uk/" s ^macbeth("BMP",i)="c:\edm\msmws\duncan.bmp" s ^macbeth("GIF",i)="duncan.gif" s ^macbeth("ICO",i)="c:\edm\msmws\duncan.ico" s ^macbeth("Phone",i)="101-555-3869|101-555-3863|101-555-3860||101-555-3862|101-555-3864|" ; s i=i+1,^macbeth("Person",i)="Malcolm|son of Duncan|Y" s ^macbeth("Phone",i)="101-555-6259|101-555-6253|101-555-6250|101-555-6257|101-555-6252|101-555-6254|" ; s i=i+1,^macbeth("Person",i)="Donalbain|son of Duncan|Y" s ^macbeth("Phone",i)="101-555-3669|101-555-3663|101-555-3660|101-555-3667|101-555-3662|101-555-3664|" ; s i=i+1,^macbeth("Person",i)="Macbeth|general of the king's army" s ^macbeth("Phone",i)="101-555-6229|101-555-6223|101-555-6220|101-555-6227|101-555-6222|101-555-6224|101-555-5234|22" ; s i=i+1,^macbeth("Person",i)="Banquo|general of the king's army" s ^macbeth("Phone",i)="101-555-2269|101-555-2263|101-555-2260|101-555-2267|101-555-2262|101-555-2264|" s i=i+1,^macbeth("Person",i)="Macduff|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-6239|101-555-6233|101-555-6230|101-555-6237|101-555-6232|101-555-6234|" s i=i+1,^macbeth("Person",i)="Lennox|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-5369|101-555-5363|101-555-5360|101-555-5367|101-555-5362|101-555-5364|" s i=i+1,^macbeth("Person",i)="Ross|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-7679|101-555-7673|101-555-7670|101-555-7677|101-555-7672|101-555-7674|" s i=i+1,^macbeth("Person",i)="Menteith|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-6369|101-555-6363|101-555-6360|101-555-6367|101-555-6362|101-555-6364|" s i=i+1,^macbeth("Person",i)="Angus|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-2649|101-555-2643|101-555-2640|101-555-2647|101-555-2642|101-555-2644|" s i=i+1,^macbeth("Person",i)="Caithness|nobleman of Scotland" s ^macbeth("Phone",i)="101-555-2249|101-555-2243|101-555-2240|101-555-2247|101-555-2242|101-555-2244|" s i=i+1,^macbeth("Person",i)="Fleance|son to Banquo" s ^macbeth("Phone",i)="101-555-3539|101-555-3533|101-555-3530|101-555-3537|101-555-3532|101-555-3534|" s i=i+1,^macbeth("Person",i)="Siward|Earl of Northumberland, general of the English forces" s ^macbeth("Phone",i)="101-555-7499|101-555-7493|101-555-7490|101-555-7497|101-555-7492|101-555-7494|" s i=i+1,^macbeth("Person",i)="Young Siward|Siward's son" s ^macbeth("Phone",i)="101-555-9689|101-555-9683|101-555-9680|101-555-9687|101-555-9682|101-555-9684|" s i=i+1,^macbeth("Person",i)="Seyton|an officer attending on Macbeth" s ^macbeth("Phone",i)="101-555-7399|101-555-7393|101-555-7390|101-555-7397|101-555-7392|101-555-7394|" s i=i+1,^macbeth("Person",i)="Boy|son to Macduff" s ^macbeth("Phone",i)="|||||101-555-2694|" s i=i+1,^macbeth("Person",i)="Doctor 1|an English Doctor" s ^macbeth("Phone",i)="101-555-3629|101-555-3623|101-555-3620|101-555-3627|101-555-3622|101-555-3624|" s i=i+1,^macbeth("Person",i)="Doctor 2|a Scotch Doctor" s ^macbeth("Phone",i)="101-555-3639|101-555-3633|101-555-3630|101-555-3637|101-555-3632|101-555-3634|" s i=i+1,^macbeth("Person",i)="Soldier" s ^macbeth("Phone",i)="|||101-555-7657|101-555-7652|101-555-7654|" s i=i+1,^macbeth("Person",i)="Porter" s ^macbeth("Phone",i)="101-555-7689|||101-555-7687||101-555-7684|" s i=i+1,^macbeth("Person",i)="Old Man" s ^macbeth("Phone",i)="||||101-555-6532|101-555-6534|" s i=i+1,^macbeth("Person",i)="Lady Macbeth|Macbeth's wife|Y" s ^macbeth("Phone",i)="101-555-5239||101-555-5230|101-555-5237|101-555-5232|101-555-5234|101-555-6224|4" s i=i+1,^macbeth("Person",i)="Lady Macduff|Macduff's wife" s ^macbeth("Phone",i)="101-555-5249||101-555-5240|101-555-5247|101-555-5242|101-555-5244|" s i=i+1,^macbeth("Person",i)="Gentlewoman|woman attending on Lady Macbeth" s ^macbeth("Phone",i)="101-555-4369||101-555-4360|101-555-4367|101-555-4362|101-555-4364|" s i=i+1,^macbeth("Person",i)="Hecate" s ^macbeth("Phone",i)="101-555-4329||101-555-4320||101-555-4322|101-555-4324|" s i=i+1,^macbeth("Person",i)="First Witch" s ^macbeth("Phone",i)="101-555-3479||101-555-3470|101-555-3477|101-555-3472|101-555-3474|" s i=i+1,^macbeth("Person",i)="Second Witch" s ^macbeth("Phone",i)="101-555-7329||101-555-7320|101-555-7327|101-555-7322|101-555-7324|" s i=i+1,^macbeth("Person",i)="Third Witch" s ^macbeth("Phone",i)="101-555-8449||101-555-8440|101-555-8447|101-555-8442|101-555-8444|" s i=i+1,^macbeth("Person",i)="First Apparition" s ^macbeth("Phone",i)="101-555-3489" s i=i+1,^macbeth("Person",i)="Second Apparition" s ^macbeth("Phone",i)="101-555-7339" s i=i+1,^macbeth("Person",i)="Third Apparition" s ^macbeth("Phone",i)="101-555-8459" s i=i+1,^macbeth("Person",i)="Sergeant" s ^macbeth("Phone",i)="101-555-7379|101-555-7373|101-555-7370|101-555-7377|101-555-7372|101-555-7374|" s i=i+1,^macbeth("Person",i)="Servant" s ^macbeth("Phone",i)="101-555-7389||101-555-7380|101-555-7387|101-555-7382|101-555-7384|" s i=i+1,^macbeth("Person",i)="First Murderer" s ^macbeth("Phone",i)="101-555-3499||101-555-3490|101-555-3497|101-555-3492|101-555-3494|" s i=i+1,^macbeth("Person",i)="Second Murderer" s ^macbeth("Phone",i)="101-555-7349||101-555-7340|101-555-7347|101-555-7342|101-555-7344|" s i=i+1,^macbeth("Person",i)="Third Murderer" s ^macbeth("Phone",i)="101-555-8469||101-555-8460|101-555-8467|101-555-8462|101-555-8464|" s i=i+1,^macbeth("Person",i)="Messenger" s ^macbeth("Phone",i)="101-555-6379||101-555-6370|101-555-6377|101-555-6372|101-555-6374|" q