Importing a file

Scott Brown lordblue at msn.com
Tue May 23 14:38:08 PDT 2006


Hi,

I need to do a import on a comma delimited file into filepro 4.8. The file 
will be ftp'd every day and the name will be different each day. Example: 
20060523xact.csv one day and 20060224eact.csv the next day. I can't use a 
static file name because of the small chance of data loss. Is there a way to 
code filepro to import a file that has a different name every day without 
having to manually change it?
Below is a portion of what I had before I found out I can't use a static 
file name.

1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
loop   . If:                                                                 
   .
       Then: import ascii pay=usedtobestatic.file  \r=\n f=,                 
             .
  2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       . If: not pay                                                         
   .
       Then: end                                                             
   .
  3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       . If:                                                                 
   .
       Then: 
a=pay(1);b=pay(2);c=pay(3);d=pay(4);e=pay(5);f=pay(6);g=pay(7);h=p>
  4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       . If:                                                                 
   .
       Then: n=pay(14);o=pay(15);p=pay(16);q=pay(17)                         
   .
  5  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       . If:                                                                 
   .
       Then: lookup new = temppay  r=free  -e                               
..
  6  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       . If:                                                                 
   .
       Then: 
new(1)=a;new(2)=b;new(3)=c;new(4)=d;new(5)=e;new(6)=f;new(7)=g;new>

Any help would be most appriciated!

Thanks,

Scott Brown




More information about the Filepro-list mailing list