I would like to access all the ENVIRONMENT VARIABLES and their values within a DataStage BASIC Routine. There is an API function called "DSListEnvVars" which can give me what I need. There is no corresponding DS basic function (closest one is "DSGetProjectInfo"). I am not afraid to try and write in C++ but I do not understand how to link in the module or call it from the BASIC Routine.
Is this possible?
Can I write C++ API and call from within BASIC routine?
Moderators: chulett, rschirm, roy
Can I write C++ API and call from within BASIC routine?
Michael Favero
2852 Humboldt Ave So
Minneapolis, MN 55408
2852 Humboldt Ave So
Minneapolis, MN 55408
Although the option of writing an external call is open to you (I think that you can use the IBM documents for the UCI for that), I think you'll be much happier of integrating a call to and then parsing the returned values in that string. The line-feeds in the UNIX output are represented as the @FM character.
Code: Select all
MyEnv = DSExecute('UNIX','env')