Topic
2 replies Latest Post - ‏2014-04-22T15:54:29Z by canutri
kennetheld
kennetheld
38 Posts
ACCEPTED ANSWER

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
    markevans
    2742 Posts
    ACCEPTED ANSWER

    Re: Dynamically assign windows file name

    ‏2014-04-22T15:49:26Z  in response to kennetheld

    I think you made a typo...

     

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

    See the following link in the helps:

    http://pic.dhe.ibm.com/infocenter/rbdhelp/v9r0m0/topic/com.ibm.egl.pg.doc/topics/pegl_cics_resource_association.html

    Mark

  • canutri
    canutri
    342 Posts
    ACCEPTED ANSWER

    Re: Dynamically assign windows file name

    ‏2014-04-22T15:54:29Z  in response to kennetheld

    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.

    -Daron