[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Expanding horizons



Someone mentioned to me, off list, that the list was so quiet of late
because "all the problems have been solved." If so (at least until
MicroSludge muddies the waters again, as it will no doubt do), perhaps
it's time to expand the possibilities. Herewith something I've been
promising to discuss for some time: the amazing benefits of using XyWrite

as a programming editor.

I need to send out monthly bills to various subscribers to the town
weekly (everyone who subscribes within a given month is considered to
have his or her subscription expire on the last day of that month in the
next year--or next two if they subscribed for two years). Once I
assembled the data from the various database tables, I then had to
generate bills that differed considerably, one from another, according
to various circumstances of the subscription. Neither XyWrite's nor
WordImPerfect's mail merge capabilities were up to the task. The
database app could do it, but its output would be plain text, and
management wanted a professional-looking bill, with the paper's name in
our distinctive black-letter font and a line-bordered table for the
options.

XyWrite to the rescue. By writing the program to generate the bills in
XyWrite, embedding the formatting codes (within quotation marks, so that
dBase interprets them as literals to be output as typed), and then
calling and printing the resultant file in XyWrite, I was able to satisfy
the suits--even using archaic DOS apps that they never heard of.

Here's an example (&BILLFSPC is a memory variable, containing the name
of the file to be created; dBase requires that you first declare that
output should go to the file, with "set alternate to", then specify that
data is not to overwrite previously written data, by specifying
"additive", and only then start sending data to the file with "set
alternate on"; a single ? means "start a new line and output what
follows"; a double one, "output what follows on the same line"):

set alternate to d:\hhmail\bills\&BILLFSPC
set alternate to d:\hhmail\bills\&BILLFSPC additive
set alternate on
? "≪PW8.5IN≫≪FD11IN≫≪PB80≫"
?? "≪OF1IN,1IN≫≪TP.4IN,1.75IN≫≪BT1IN,1IN,0.84IN,1.32IN≫"
?? "≪UFTimes New Roman≫≪SZ12PT≫"
?? "≪TS.5IN,1.5IN,2.5IN,3.2IN≫"
?? "≪RHA≪FC≫≪UFChaucer≫≪SZ24PT≫"
??"The Clarion Herald"

Eventually, the whole letterhead is included in ≪RHA, which is then
closed, a date and the invoice number are output, and the name and
address are output from the data table. I can even create column tables
this way. The one thing I cannot do, because dBase can't, is get a tab
character; I use {} and then CI in XyWrite to get a tab.

I should imagine any programming language that can output literals to a
file would let you do the same thing. One thus has the programming
possibilities of that application, and the output possibilities of
XyWrite all in one. Or do more modern languages choke on the high-order
formatting characters? Any one else ever try this?

Patricia M. Godfrey