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

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
mfavero
Premium Member
Premium Member
Posts: 45
Joined: Thu Jan 16, 2003 1:20 pm
Location: Minneapolis

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

Post 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?
Michael Favero

2852 Humboldt Ave So
Minneapolis, MN 55408
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Post Reply