Variable in export ascii export ascii aaa= “variable name “ –x

Laura Brody laura at hvcomputer.com
Wed Oct 26 11:16:47 PDT 2005


On Wed, 26 Oct 2005 09:37:35 -0700 (PDT), Richard Tartaglia <fp at masscollector.com> wrote:

> With all the bad weather I hope everyone is doing ok.
>
> I have data that comes from the Commonwealth of
> Massachusetts, so there is no way the data is going to
> change. The file is fixed length ascii and contains a
> header record followed by data then another header
> record and more data and so on.
>
> I would like to use a variable name in the export
> name, export ascii   aaa = ?variable name?  - x.
>
> I have been trying different variations but can?t get
> any thing to work. Is it possible or am I wasting
> time.

Are you attempting to do something like this?

Notice that I am putting the filename into variable
"fn" with a straight assignment. I could also get
the filename from a input statement or a listbox
of choices.

@keyE:'----------------------------------------------------------:' export the current record and then run MS Word to:
:' mail merge the info in a letter.:':
::putenv "PFADDWP","OFF":
::fn= "c^A/mmerge.txt":
::export ascii  ofile=(fn) f=\t r=\n:
::ofile(1) = first_name:
::ofile(2) = last_name:
::ofile(3) = address:
::ofile(4) = city { "," < state < zipcode:
::close ofile:
::chdir "c^A/program files/microsoft office/office":
::system noredraw  "winword c^A/letter.doc":
::end:
(Please remember that the code example is written for
a Windows box and that the ^A character is a ":" character
when you actually type this in).

-- 
Laura Brody, Publisher of the filePro Developer's Journal
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859 120 Sixth Street    http://www.hvcomputer.com      |
| Verplanck, NY 10596-0859       Voice mail: (914) 739-5004     |
+------ PC repair locally, filePro programming globally --------+



More information about the Filepro-list mailing list