Buildop stage .....

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Buildop stage .....

Post by sivatallapaneni »

Hi Every one,
I'm trying to build a BuildOp stage to be used in paralle jobs. i have incoming data that is 150 character long i have to parse the record and send it to many fileds. i'm trying to use the macros to get the string length and substring. so far i'm not sucessful in doing that. I tried to include the apt_util/string.h macro in the logic. i tried every way to do that. can any body help me, i looked at the whole documentation no where it says, this is the way to include the macro.

really appreciate if any one has an answer.

Regards,
Siva.
vzoubov
Participant
Posts: 28
Joined: Tue Feb 05, 2002 12:30 pm
Location: Boston, MA

Re: Buildop stage .....

Post by vzoubov »

sivatallapaneni wrote:Hi Every one,
I'm trying to build a BuildOp stage to be used in paralle jobs. i have incoming data that is 150 character long i have to parse the record and send it to many fileds. i'm trying to use the macros to get the string length and substring. so far i'm not sucessful in doing that. I tried to include the apt_util/string.h macro in the logic. i tried every way to do that. can any body help me, i looked at the whole documentation no where it says, this is the way to include the macro.

really appreciate if any one has an answer.

Regards,
Siva.
Have you tried these:

APT_Int32 length () const
Returns the length of this string.

APT_String substring (APT_Int32 offset, APT_Int32 len) const
Returns the indicated substring of this string. ?

Vitali.
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

Thanx Vitali for the reply,

I'm getting these error messages

Code: Select all

Error: The function "Len" must have a prototype.
Error: The function "Left" must have a prototype.
Error: The function "Left" must have a prototype.
Error: The function "Left" must have a prototype.
4 Error(s) detected.
i dont know how to include the macros in the code so that i can use the functions supported by them. Do i have to include like C style #include or use the apt_util/string.h .

i tried every thing, every permutation, and documentation doesnot talk about that any where. and i dont have orchestrate documentation, i guess I'm going nowhere.

Any thought would be really appreciated.
Thank you,
Siva.
sivatallapaneni
Participant
Posts: 53
Joined: Wed Nov 05, 2003 8:36 am

Post by sivatallapaneni »

Ok, so i have to write my own string functions to do all the manipulations. like in a regular c compiler i cannot use any of the library functions?

Code: Select all

It looks like you are trying to call the Transformer functions from a buildop code
i thought they are functions that i can use. ok u mean to say i have to write my own functions and do that, right? i like programming in C, but i still need to figure out how to use macros in the my stage.

Thanx for the help,
Siva.
vzoubov
Participant
Posts: 28
Joined: Tue Feb 05, 2002 12:30 pm
Location: Boston, MA

Post by vzoubov »

sivatallapaneni wrote:Ok, so i have to write my own string functions to do all the manipulations.
No, you don't have to. You just have to spend some time learning how to use the existing ones.
sivatallapaneni wrote: like in a regular c compiler i cannot use any of the library functions? i thought they are functions that i can use.
The functions that you are trying to call ARE NOT C functions.
sivatallapaneni wrote: ok u mean to say i have to write my own functions and do that, right?
Again, the answer is no. The Orchestrate APT_String class has plenty of methods that could be used for string manipulation, like lenght() and substring() for instance, which I mentioned earlier.


Vitali.
Post Reply