Topic
  • 2 replies
  • Latest Post - ‏2013-10-18T13:17:38Z by Sachin.Phatak
Sachin.Phatak
Sachin.Phatak
15 Posts

Pinned topic Read IFS (Stream file) using JAVA in HATS

‏2013-10-08T06:59:36Z |

If the projects .ear file is placed in IFS (Integrated File System) in AS400, we can read the contents of the IFS file (like .ini files) which are present in 'Web Content' folder of the project using JAVA logic. Can we read the IFS (stream) file located at any location (outside of the project) in the machine we are connected to using HATS. Just like the file 'Test' placed at '/home/Test' location.

  • tmparker
    tmparker
    518 Posts

    Re: Read IFS (Stream file) using JAVA in HATS

    ‏2013-10-08T17:43:21Z  

    This isn't really a HATS question as we don't control this behavior. This is really a J2EE and app server question.  I can't say for sure but I think in order for you to do this you would need this path to be in the classloader and then you can use the Classloader.getResourceAsStream() method to get the file.  You can probably search the web and find an example.

    Thanks
    Tim

     

  • Sachin.Phatak
    Sachin.Phatak
    15 Posts

    Re: Read IFS (Stream file) using JAVA in HATS

    ‏2013-10-18T13:17:38Z  
    • tmparker
    • ‏2013-10-08T17:43:21Z

    This isn't really a HATS question as we don't control this behavior. This is really a J2EE and app server question.  I can't say for sure but I think in order for you to do this you would need this path to be in the classloader and then you can use the Classloader.getResourceAsStream() method to get the file.  You can probably search the web and find an example.

    Thanks
    Tim

     

    Hi Tim,

    Thanks for your input. I have tried but with classloader I am able to get contents only from 'Web Content' folder. I will try to load the information from green screen into context variables instead of loading from dynamic IFS location.