Hi Bob,
Sorry I can't help you with your specific problem.
Just a word of caution though... Don't reinvent the wheel.
Parallel jobs already have a lot of builtin functions like Field, Index, Len, etc.
Mike
Problems with simple buildops
Moderators: chulett, rschirm, roy
Look at the documentation for buildops or read the header files ($APT_ORCHHOME/include/apt_util). They are broken out by datatype and have tons of examples. Odds are good that most of what you are looking for already exists. Like Mike said, don't reinvent the wheel - unless you can make a better one!
Brad.
Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
Sorry, didn't mean to ive the wrong impression. Buildops are awesome - we have chosen to use them over transformers in all of our jobs.
What I meant was that I am guessing much of the functionality you are looking for is already available in buildops. For example, I know there is a length function for strings:
If you need to copy strings or do substrings, use the = and substring functions:
I am not familiar with Field and Index, as I have never done any Basic or routines. Hope this provides a good start.
Brad.
What I meant was that I am guessing much of the functionality you are looking for is already available in buildops. For example, I know there is a length function for strings:
Code: Select all
myint = in.myString.length();
Code: Select all
out.newString = in.oldString;
out.newString = in.oldString.substring(0,5);
Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.
There is a string function available for buildops that returns the standard C-type string array for an input datatype APT_String:
You can get the length of buffer using the following:
Hope this helps.
Brad.
Code: Select all
const char buffer[];
buffer = in.myStrField.terminatedContent();
Code: Select all
int len = strlen(buffer);
Brad.
It is not that I am addicted to coffee, it's just that I need it to survive.