Before we do that, do you understand C/C++ syntax at all? And have you read the chapter on programming within parallel jobs?
Please post the pre-loop code (where, for example, the variable called holdkey is initialized).
Please ask more specific questions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod wrote:Before we do that, do you understand C/C++ syntax at all? And have you read the chapter on programming within parallel jobs?
Please post the pre-loop code (where, for example, the variable called holdkey is initialized).
Please ask more specific questions.
Basically this is what we wanted to achieve with this build-op: Get the unique 2-byte values from the string field with the same key.
Example
Input:
rec# key string (20 byte value)
1 KEY1 aa
2 KEY1 abaa
.
.
10000 KEY1 xxaaab
10001 KEY2 yy
Expected Output:
KEY1 aaabxx
KEY2 yy
Output that we are getting from the above buildop:
KEY1 xx
KEY2 yy
Can someone pls. tell us how to get the expected output?
Instead of getting the concatenation, the latest 2 byte value is overlaying the previous ones in the first two bytes...
I'll post the pre-loop code tomorrow..
Thanks for any help
DSGuru a much more diverse example
InPut
rec# key string (20 byte value)
1 KEY1 aa
2 KEY1 abaa
3 KEY1 acabbbaa
4 KEY1 aa
5 KEY1 ss
6 KEY1 ab
7 KEY1 aa
8 KEY1 aa
9 KEY1 bb
10KEY1 cc
In the above example. The String is a 20 digit value and every 2 digits has some business value to them.so this string can contain 10 value pairs.
From the above example i want to get all unique 2 digit values from my string field. i will take aa from the first record and when i go to the next record i have 2 value pairs ab and aa. As i have already considered aa i will pick ab. similarly when i go to the third i have 4 value pairs ac,ab,bb,aa. in these i will pick ac and bb as i have already considered ab and aa.......
The expected out put in the above example is
KEY1 aaabacbbsscc.
The build op which i have now gives me the following output
KEY1 cc..
There might be other ways of doing this but a build op was coded as there can be millions of entries in the input and there can be 1000's of enteries with the same matching key...
Unfortunetly This buildop is not coded my me and i don't have expertise on c++.
Any help in tweaking it to get what i am expecting will be really great...
Pavan_Yelugula wrote:Unfortunetly This buildop is not coded my me and i don't have expertise on c++.
Then - in my humble opinion - you shouldn't be the one posting the issue. Either the original coder or someone who's taken over for them with the C++ experience needed to work with it. Would that be 'UPS'?
-craig
"You can never have too many knives" -- Logan Nine Fingers
Chulett
It was coded by some IBM Professional and passed on. we came up with a new requirement and wanted to leverage what he has done.
If i can find someone who knows c++ around me They would have been the first person i would have shown this right...
But i am really wondering if this is a really bad idea of posting this on this forum. I was jus looking for someone to point me in the right direction where i can do some research to solve my issue.
I was just taking this as a chance to learn more about c++ and Buildops with this issue.
No Hardfeelings I am neither the original coder nor someone with c++ exp but i don't think i should just give up without trying....
but either you help me in getting me near my goal or u don't respond...what do we achieve with stray comments...
And these same 'IBM Professionals' not only didn't comment the code but also did not leave you any documentation for it? That's... unfortunate.
No worries, it's a public forum and everyone is entitled to an opinion - however, there's really no place for "put up or shut up" comments. We're not really here to teach someone C++ nor is it something you pick up from a forum post or two - but I would think some of those who do this on a regular basis - DSGuru2B or tinsmith off the top of my head as two recent C++ posters - could be popping in here and helping out should they so desire. Me, that's not something I profess any expertise in so can't help other than to provide 'stray comments'.
I was serious about the 'UPS' question. They posted in this thread, stated that "Basically this is what we wanted to achieve with this build-op" so I was legitimately wondering if they were the resource you / we should be working with since they seemed to have been involved in writing it.
Anyway, good luck. I'll leave you to your own devices.
-craig
"You can never have too many knives" -- Logan Nine Fingers