Page 1 of 1

Compiling a C++ Buildop Manually

Posted: Wed Oct 11, 2006 2:23 pm
by devnull
Hello all.

I'm trying to create a dynamic custom buildop which will require that make changes to the describeOperator method and constructor method of my buildop code. I can see the code I need to change in the buildop C++ implementation file. However, I'm not sure how I'm supposed to build it manually. Has anyone ever done this?

Note, I don't think I'm supposed to use the opd file for that. The C++ file I want to change has all the pre-loop, per-record code, etc. that a user would normally be responsible when editing in the build tab of the buildop in DataStage.

Posted: Wed Oct 11, 2006 2:46 pm
by ray.wurlod
Don't attempt it. Compile within DataStage.

When you compile a BuildOp with DataStage a number of other entries are created, including records in a Repository table recording the call sequence and various other stuff. This needs to happen.

Posted: Wed Oct 11, 2006 2:55 pm
by devnull
ray.wurlod wrote:Don't attempt it. Compile within DataStage.

When you compile a BuildOp with DataStage a number of other entries are created, including records in a Repository table recording the call sequence and various other stuff. This needs to happen.
Unacceptable answer. All kinds of C++ API information is provided to allow us to extend DataStage right?

Why give us heavy tools and then advise us against using them?

Unless something like this is possible to do within DataStage as is:

I want to create a buildop to apply a string function to any field in the schema that is of type APT_String. It would be able to use the schema information available through the viewAdaptedSchema method to extract that information and then traverse the fields of each dataset's interface.

Posted: Thu Oct 12, 2006 6:07 am
by trojancjs
devnull wrote:All kinds of C++ API information is provided to allow us to extend DataStage right?

Why give us heavy tools and then advise us against using them?
I couldn't agree more devnull. I'll be right there looking with you - I'll let you know what I find out.

Posted: Thu Oct 12, 2006 2:17 pm
by ray.wurlod
The API is there so you can CODE lots of extra stuff.

You still need to compile within the DataStage tool, so it can record the information it needs about what you've done.

And, if you find my answers unacceptable, please don't let me delay your search for someone who cares about that particular fact.

Posted: Fri Oct 13, 2006 10:19 am
by devnull
ray.wurlod wrote:The API is there so you can CODE lots of extra stuff.

You still need to compile within the DataStage tool, so it can record the information it needs about what you've done.

And, if you find my answers unacceptable, please don't let me delay your search for someone who cares about that particular fact.
The changes I need to make are in code that is not accessible from within the buildop tool in datastage. I need to add code to the describeOperator method which is outside of the runLocally method (where the pre-loop, per-loop and post-loop code goes.) The buildop subdirectory contains expanded C++ code that shows everything in context, where the buildop custom code is inserted in addition to how the whole operator is put together. There are also comments in this expanded code that instruct the programmer to change certain #include preprocessor commands if we wish to compile the code manually.

I find your answer unacceptable because 'Don't attempt it' seemed terse and arrogant to me and didn't offer any useful help. :x If phpBB's search facility didn't suck so bad, I might have better luck finding better answers using the search facility.

When I attend the IOD conference next week, one of my wish list items will be to ask IBM to beef up their support of coding with C++ API.