Page 1 of 1

Can I write C++ API and call from within BASIC routine?

Posted: Wed Feb 08, 2006 11:51 am
by mfavero
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?

Posted: Wed Feb 08, 2006 12:00 pm
by ArndW
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

Code: Select all

MyEnv = DSExecute('UNIX','env')
and then parsing the returned values in that string. The line-feeds in the UNIX output are represented as the @FM character.