Use a variable in an export path
Josh Reader
josh.reader at mercuryelectronics.com
Mon Apr 20 12:35:03 PDT 2015
Hi Bruce,
Yes nm is a filePro dummy field and it will have a space because it will
have a first name, a space, and then a last name. I tried both of your
suggestions below but I cannot save the output processing as I get an error
about the syntax.
Here is what I tried and the error I received when checking the syntax on
save:
Suggestion 1
fn="/appl/user_exports/users/\""{nm{"\"/filepro/export.txt"
Result:
*** A filePro Error Has Occurred ***
Line Number: 36
fn="/appl/user_exports/users/\""{nm{"\"/filepro/export.txt"
^
Process contains a syntax error at position indicated.
Suggestion 2
fn="/appl/user_exports/users/'"{nm{"'/filepro/export.txt"
Result:
*** A filePro Error Has Occurred ***
Line Number: 36
fn="/appl/user_exports/users/'"{nm{"'/filepro/export.txt"
^
Process contains a syntax error at position indicated.
When using the system command in filePro (which passes things off to the
Linux command line) I believe this syntax would work perfectly but since
it's being used with the export command does that require a different
syntax?
Thanks for your assistance,
Josh
I'm assuming that "nm" is a filepro dummy field. Base on that you
simply need:
fn="/appl/user_exports/users/"{nm{"/filepro/export.txt"
However, since you mention "nm" have values representing names, I'll also
assume that your "name" directory names may have spaces in them. If that's
true, then you'll need quotes around what may have spaces, and since it
would be in this string, you would need to backslash those double-quotes
(for filePro interpretation):
fn="/appl/user_exports/users/\""{nm{"\"/filepro/export.txt"
I'm not sure this works across all *nix, but using single quotes (instead
of backslashed doubles) also worked for me on one unix box:
fn="/appl/user_exports/users/'"{nm{"'/filepro/export.txt"
But you definitely need double quotes up against the braces surrounding the
dummy field for filepro to understand how to concatenate the string.
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20150420/bc43bf99/attachment.html>
More information about the Filepro-list
mailing list