Basic Transformer in Parallel job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes. You are correct. Its just a function. You can have a main and do the testing from command line, but once all the testing is done, you need to remove the main() function. Also make sure that no input arguments of the C function are defined as const. It does not work with datastage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I have made the changes in C program without main() funtion. Still I am getting the below error during compilation in transformer:DSguru2B wrote:Yes. You are correct. Its just a function. You can have a main and do the testing from command line, but once all the testing is done, you need to remove the main() function. Also make sure that no input arguments of the C function are defined as const. It does not work with datastage.
ld: Can't find library or mismatched ABI for -lorchhpia64
The server is HP-UX.
Suman
I am now able to compile and link the job with the following options:Suman wrote:I have made the changes in C program without main() funtion. Still I am getting the below error during compilation in transformer:DSguru2B wrote:Yes. You are correct. Its just a function. You can have a main and do the testing from command line, but once all the testing is done, you need to remove the main() function. Also make sure that no input arguments of the C function are defined as const. It does not work with datastage.
ld: Can't find library or mismatched ABI for -lorchhpia64
The server is HP-UX.
Suman
aCC +DD64 -O -c -ext -z +Z test.c
aCC +DD64 -b -Wl,+s -Wl,+vnocompatwarnings test.o
But in the C program I am using file funtions of C like fgets(),fopen() etc. In the C function I am passing char* as an argument. In unix side the program is working fine and giving a correct return value but in datastage it is always giving -1 as return value.
Are the file funtions not recognized by datastage or I need to change something.Please help me with this.
Suman
WHile setting up the parallel routine via DataStage, what 'Type' did you provide as the input variables? It should be defined as char*.
But now that i re-read your question, you are saying that its 'return' value is getting messed up, the return value will depend upon your input. Maybe your not handling that input, it could be null. fget(), fopen() are standard commands for the stdio library which you include in your program. That should/will not make a difference.
But now that i re-read your question, you are saying that its 'return' value is getting messed up, the return value will depend upon your input. Maybe your not handling that input, it could be null. fget(), fopen() are standard commands for the stdio library which you include in your program. That should/will not make a difference.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.