Hey, I'm in the same development group as 'devnull'. Here's a few more details.
We have a set of functions that we use in many of our buildops. Right now, we include a header file in our buildops to access those functions. The problem is that if we have to change a function, we have to recompile all buildops that use it. If we use a shared library instead, we do not have to recompile buildops when we update the library.
For the sake of conversation, assume we have a header file with this one function (convertDate6toISO) in it:
Code: Select all
APT_Date convertDate6ToISO(APT_String, APT_Int32);
APT_Date convertDate6ToISO(APT_String inputDtStr, APT_Int32 cutoff=50) {
// Input date string format is 0YYMMDD
APT_String century;
APT_Date outDt;
if (inputDtStr.substring(0,2).asInteger() < cutoff) {
century = "20";
} else {
century = "19";
}
outDt.set(century + inputDtStr, "%yyyy%mm%dd");
return outDt;
}
FYI - this function converts a string containing a 6-digit numeric date, formatted yymmdd, to a valid DataStage date datatype, including century.
Say we want to change the default cutoff from 50 (i.e. 1950) to 49 (bad example, but you get the idea). If we continue to use this header, then all buildops that use this header have to be recompiled. If we instead used a shared library, all we have to do is push the new version out to production and all buildops that reference it will use the new version automatically - no recompiling.
I think the biggest issue is that we don't know how to compile this with the right DataStage headers and libraries.
Sooo, any help would be greatly appreciated!!
Brad.