Export a Unix variable named file.
Jeff Harrison
jeffaharrison at yahoo.com
Tue Aug 1 15:17:04 PDT 2006
--- George <gclute at comcast.net> wrote:
>
>
> I must be missing something here. I'm trying to
> export a unique file name
> with each invocation.
> Export ascii exp=/tmp/$filename r=\n f=, -x
>
> Apparently export see' s the $variable as a literal
> file name...but then -p
> $filename works just fine in other scripts.
>
> Anybody accomplished this in export?
>
> George Clute
>
>
>
Hi George. Yes, I'm willing to bet that many here
have done this type of thing. In order to get the
variable file name from filepro processing you need to
do something like the following (my syntax here is
untested but you'll get the idea):
export ascii exp=("/tmp/"{getenv("filename")) r=\n f=,
-x
The reason it works on the command line is because
there you are dealing with unix, not filepro.
Depending on the exact details of what you are trying
to do, you may need to execute a close on the export.
Specifically, if you want the file name to change in
the middle of your processing batch, then you will
need to execute a "close exp", and then re-execute the
export line. In this case you would not use the
getenv statement directly in your export though.
Good Luck.
jeffaharrison at yahoo.com
Author of JHImport and JHExport. The fastest and
easiest ways to create code for filePro Imports and
Exports.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Filepro-list
mailing list