home *** CD-ROM | disk | FTP | other *** search
- SBP
- ╜ 'wplet' mailmerge for WordPerfect
-
- ╜ select phase
- ╫c1$(25,1)
- å t
- a: f$ "": ┬"Open file","",11,a%,f$: ╜ ***** Select File for data *****
- ía% 0 p Æ
-
- ç:f1$ f$
- ┤ Öf1$
- ╜ **************** Now strip path off filename
- a0: f% ?(1,f$,"\"): íf% pf$ -(f$, /(f$) f%): wa0
- b$ "":c$ "":b1$ "? ":lct% 0:blk% 1
-
- ╜ *********************************************** Now get fields in blocks *
- ¢i% 1 q25:c1$(i%,0) "":c1$(i%,1) "": ▒i%
-
- a1: b$ "Block " (blk%,"99") " = "
-
- b: a$ "": ┬b$,"select another or <CANCEL> to end this block",5,a%,a$
- ía% 0 p wc
- b$ b$ a$ ",": í /(b$) 60 pb1$ b$:b$ "Block " (blk%,"99") " = ..." -(b1$,35)
- lct% lct% 1
- c1$(lct%,0) a$ "." f$
- wb
-
- c: c1$(lct%,1) (18)
- c$ c$ +(b$, /(b$) 1) "/"
- ┬"Another block","",21,a%: ía% pb$ "":blk% blk% 1:b1$ "? ": wa1
- c$ c$ "#"
- lct% lct% 1
- c1$(lct%,1) (5)
- {c$
-
- ╜ now 'pseudo export'
-
- d1: ┬"Current index is " ú "." f$,"Select Index to define order <CANCEL> for " ú,7,a%,i$: ╜ ******** define order *******
-
- ía% pz$ "INDEX " i$ "." f$: ûz$
- d2: ╔ ╨ ~: ╜ **************************************** ask for filter *****
-
- ╔ `
- í B(f$) p ┬"No records found matching this filter","",1,a%: ía% p wd2 ^ wgetout
- ct% 0
- d3: ┬"Enter Merge File Name","<CANCEL> to end",17,a%,mf$: ╜ ** get merge file *
- ╜ *********************************************************** check ovrewrite/append
- ía% 0 p wgetout
- í O( J(mf$)) p ┤mf$ ¢ ╢: wd4
- ┬"Mergefile " mf$ " exists","<OK> to Overwrite or Append, <CANCEL> to re-choose",1,a%
- ía% 0 p wd3
- ┬mf$,"<OK> to Overwrite, < CANCEL > TO APPEND ",1,a%
- ía% p ┤mf$ ¢ ╢ ^ ┤mf$ ¢ T
- d4: ╪ O B(f$)
- ¢i% 1 qlct%
- ╜ **************** set up '? fieldname.file;' ****************************
- íi% lct% p
- zz$ "zz% = LEN(TRIM$(" c1$(i%,0) "))": ûzz$
- ízz% pzz$ "? " c1$(i%,0) ";": ûzz$
- ízz% c1$(i%,1) (18) pzz% zz% 1: { (18);: ╜ *** if end block CTRL/R ****
- Æ í
- íc1$(i%,1) (5) pzz% zz% 1: { (5);: ╜ ***** if end record CTRL/E ***
- ízz% p { (10);: ╜ ******************************** anyway <NEWLINE> *******
- ▒i%
- ct% ct% 1
- ╔ ▒
- ┘
- å ╢
- {: {&5.0ct%," records exported to " mf$
- getout: ╔ ╨
- ╜ LIST mf$
- Æ
-
-
-