Join this group to access featured content and participate in discussions related to DMX.

140 Members
Join Us!

I am reading a file, passing some values from the file to an external function written in C.

I take the value returned from the C function and I am writing it to another file using reformat option.

If I use GetExternalFunctionValue consecutively for different data from input file, the return value contains only the value returned by the most recent function call.I have defined separate values for each GetExternalFunctionValue methods.

Hence if I have 3 different fields in my output file, all the 3 fields have the same value returned by the last function call when I perform a re-format.

Is there a way to add data to the outputfile as soon as I return from the external function call ?

It appears to me that the heap area used to return the values remains the same across multiple external function calls.

You need to be a member of Syncsort Community to add comments!

Join Syncsort Community

Email me when people reply –

Replies

  • Hi,

    I reviewed my external function again. Apparently I forgot the fact that DMExpress allocates the buffer for the return values and all I need to do is to just copy the value to that previously assigned buffer. But I overlaid the value_ptr address with a new address that I created in my program.

    I changed my code to use the buffer created by DMExpress and now it works like a champ :)

    Thanks anyways for offering help...

  • Dear Ramprasad,

    please send me the task with the function you created, that I can have a look.

    whuerter@syncsort.com

    Greetings

    Wolfgang

This reply was deleted.

To access Syncsort Knowledge Base, visit:

My Support