Hello,
I've just started a new job and this is the first time I've worked with code that queries AS/400 libraries and files. In some of the existing applications, the sql statements hardcode the library name: ie:
In others, the library name (UTLIB in the above example) have been extracted to a properties file, which is more flexible but makes for ugly code:
From a
testing standpoint, the former is a nightmare. There are actually two code bases of an entire app here: one that hardcodes the test library everywhere and then there's the "production" code base. Scary!
So, my question is this: is there a way to set up a DataSource that already knows the library? This way the above code simply becomes:
I could have a TEST DataSource and a PROD DataSource and flip the switch as needed. Elegant, yeah?
Any help would be appreciated, from a verbose answer to simply a nudge in the right direction.
Cheers,
Ted