import command with filename containing a variable

Bruce Easton bruce at stn.com
Tue Aug 15 09:00:44 PDT 2017


James - try using the debugger to show us what field 40 contains when on 
the line just before the import.  Also, not sure if it will make a 
difference, but what platform and version of filepro.

On 8/15/17 11:48 AM, Chris Rendall via Filepro-list wrote:
> How is field 40 defined?
>
> How about this: fn="/tmp/addv/"{40{""
>
> I'm wondering if there are extra blanks in field 40 that are being included in the filename and causing the no such file or directory error.
>
> -- Chris
>
>
> From: James Flanagan [mailto:James at Flantec.com]
> Sent: Tuesday, August 15, 2017 10:43 AM
> To: Chris Rendall <crendall at teamind.com>
> Cc: filePro (filepro-list at lists.celestial.com) <filepro-list at lists.celestial.com>
> Subject: Re: import command with filename containing a variable
>
> Chris,
>
> I tried that, and i get the same error regarding no such file or directory.  Thank you.
>
> James Flanagan
> http://Flantec.com/
>
> email:	mailto:James at Flantec.com
> mobile:	760-458-8498
> home: 	219-221-6219
> text:		mailto:7604588498 at txt.att.net
>
> aim:		Flantec
> oovoo:	Flantec
> Skype:	Flantec
> ichat:	mailto:Flantec at mac.com
>
> home:	1901 Cidermill Road
> 		Michigan City, IN 46360
>
> On Aug 15, 2017, at 11:37 AM, Chris Rendall via Filepro-list <mailto:filepro-list at lists.celestial.com> wrote:
>
> Try setting to a variable such as: fn="/tmp/addv/"{40
>
> Then for you import command use: import ascii data=(fn) r=\n f=^A o=" c="
>
> -- Chris
>
> -----Original Message-----
> From: James Flanagan via Filepro-list [mailto:filepro-list at lists.celestial.com]
> Sent: Tuesday, August 15, 2017 10:31 AM
> To: Filepro_List <mailto:filepro-list at lists.celestial.com>
> Subject: import command with filename containing a variable
>
> I am trying to build a routine import command where the file name of the import would contain a respective variable of the record in am standing in.  Because quotes are not used when defining the filename, i realize that i cannot just throw a variable in there.  however, when i use parenthesis and quotes to attempt to achieve what i intend, it comes back with “NO SUCH FILE OR DIRECTORY”.  Using the EXISTS command, and identical syntax as below, it returns that the file does indeed exist.
>
> Is there a way to inject a variable successfully into the filename of the import command?  thank you very much,
>
> ::import ascii data=("/tmp/addv/"{40) r=\n f=^A o=" c=":
>
>
> James Flanagan
> http://Flantec.com <http://flantec.com/>
>
> email:	mailto:James at Flantec.com <mailto:James at Flantec.com>
> mobile:	760-458-8498
> home: 	219-221-6219
> text:		mailto:7604588498 at txt.att.net <mailto:7604588498 at txt.att.net>
>
> aim:		Flantec
> oovoo:	Flantec
> Skype:	Flantec
> ichat:	mailto:Flantec at mac.com <mailto:Flantec at mac.com>
>
> home:	1901 Cidermill Road
> 		Michigan City, IN 46360
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20170815/1afb4f5f/attachment.html>
> _______________________________________________
> Filepro-list mailing list
> mailto:Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes http://mailman.celestial.com/mailman/listinfo/filepro-list
> _______________________________________________
> Filepro-list mailing list
> mailto:Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list




---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Filepro-list mailing list