• 2 replies
  • Latest Post - ‏2014-04-22T15:54:29Z by canutri
38 Posts

Pinned topic Dynamically assign windows file name

‏2014-04-22T15:21:41Z |

I am trying to dynamically pass a file name that I want an EGL program to open and use for a comma delmited resource part.  My part name is myCSV and by default I have systemName "c:\users\kenneth\emp.csv".  I would like to pass in another name dynamically.  I thought I found the way to do this but it is not working.  I found an article that says you can issue statement myCSV.resourceAssociations = "c:\emp.csv" and the next I/O statement should use that file.  When I try to use this statement I get an error saying it cannot resolve .resourceAssocaitions.  

Maybe to do this you have to use certain settings on the build descriptor.  

Can someone please point out the error of my ways.  Thanks.

  • markevans
    2921 Posts

    Re: Dynamically assign windows file name


    I think you made a typo...


    it should be myCSV.resourceAssociation  (no "s" at the end).

    See the following link in the helps:


  • canutri
    360 Posts

    Re: Dynamically assign windows file name


    Its been a while since I've used a resource Association, but I believe you would change myCSV.systemName = "c.\emp.csv".  .resourceAssociations would be used if you had multiple Resource Association file defined in you build descriptor.  We use this later method when we need multiple, but fixed names; such as a different name for a limited number of fixed warehouse (just as an example).  The former method to use .systemName would be useful when the client is specifying the file name.

    I hope this is helpful and resolves your issue.