Use a variable in an export path
Josh Reader
josh.reader at mercuryelectronics.com
Mon Apr 20 12:44:52 PDT 2015
I just found a mistake in my nm variable code that had nothing to do with
what you all are helping me with. I am now getting an error when running
the export and my name has either single quotes or double quotes around it
depending on the syntax of the path variable.
Suggestion 1
fn="/appl/user_exports/users/'"{nm{"'/filepro/export.txt"
*** A System Error Has Occurred ***
On File: /appl/user_exports/users/'JOSH READER'/filepro/export.txt
Output Processing
Line Number: 19
export ascii file=(fn) r=\n f=|
No such file or directory
Suggestion 2
fn="/appl/user_exports/users/\""{nm{"\"/filepro/export.txt"
*** A System Error Has Occurred ***
On File: /appl/user_exports/users/"JOSH READER"/filepro/export.txt
Output Processing
Line Number: 19
export ascii file=(fn) r=\n f=|
No such file or directory
-----Original Message-----
From: onlinemgt at gmail.com [mailto:onlinemgt at gmail.com] On Behalf Of daN
baueR
Sent: Monday, April 20, 2015 3:21 PM
To: Josh Reader
Cc: filePro Mail Group
Subject: Re: Use a variable in an export path
Top Post
It appears that filePro is literally passing the single quotes within the
filename to the OS. Instead of translating the the variable nm into the
needed people names. What is the code you're now trying?
daN baueR
dan at onlinemgt.com
On Mon, Apr 20, 2015 at 2:44 PM, Josh Reader
<josh.reader at mercuryelectronics.com> wrote:
> Hi Chris,
>
>
>
> When I save the output processing I get no errors. When I run the
> export via D-Request Output I get an error there is no such file or
> directory when I run it. Here is the error I was getting:
>
>
>
> On File: /appl/user_exports/users/'nm'/filepro/export.txt
>
>
>
> Output Processing
>
> Line Number: 19
>
>
>
> export ascii file=(fn) r=\n f=|
>
>
>
> I changed the fn variable to user the braces like you mentioned and I
> get the same error message only the on file includes the braces:
>
>
>
> On File: /appl/user_exports/users/'{nm{'/filepro/export.txt
>
>
>
>
>
> Thanks for responding,
>
> Josh
>
>
>
>
>
> Josh,
>
>
>
> Please explain, "it's not working"? Are you receiving an error?
>
>
>
> I am not familiar with CentOS, but shouldn't the syntax be as follows?
>
>
>
> fn="/appl/user_exports/users/'{nm{'/filepro/export.txt"
>
>
>
> Notice the brackets around variable NM.
>
>
>
> Chris
>
>
>
>
>
>
>
>
>
>
>
> Hi All,
>
>
>
>
>
> I have an export where I'm setting the export path. Currently I am
>
> hard-coding the path for each user that needs to access the export so
> it
>
> goes to their user folder on our windows server. filePro is installed on
>
> CentOS 6.2. I can get the name of each user using a variable in
> filePro but
>
> I don't know how to insert the variable into the path. Below is a
> sample of
>
> how I've tried it but it's not working. nm is the variable that holds
> the
>
> user's full name and fn is the variable being used for the file name.
>
>
>
>
>
> fn="/appl/user_exports/users/'nm'/filepro/export.txt"
>
>
>
>
>
>
>
> openit subroutine:
>
>
>
> export ascii file=(fn) r=\n f=|
>
>
>
>
>
> Thanks,
>
>
>
>
>
> Josh Reader - Systems Analyst
>
>
>
> Mercury Electronics
>
>
>
> 3846 Green Valley Rd.
>
>
>
> P.O. Box 248
>
>
>
> Seven Valleys, PA 17360
>
>
>
> 717-428-0222 x228
>
>
>
> Josh Reader - Systems Analyst
>
> Mercury Electronics
>
> 3846 Green Valley Rd.
>
> P.O. Box 248
>
> Seven Valleys, PA 17360
>
> 717-428-0222 x228
>
> josh.reader at mercuryelectronics.com
> -------------- next part -------------- An HTML attachment was
> scrubbed...
> URL:
> <http://mailman.celestial.com/pipermail/filepro-list/attachments/20150
> 420/57e67c70/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list