hi
i want to invoke a unix script in a C program or datastage routine and also return some value from the script to the C program to use that value further.
Basically i am doing a Lookup operation in this unix script and returning the looked up data from a oracle database table..
please help me invoke as well as return data from the script to C program.
Invoke unix script using c program
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 23
- Joined: Wed Apr 08, 2009 5:28 am
- Location: Bangalore
Invoke unix script using c program
somesh2dsx
-
- Premium Member
- Posts: 238
- Joined: Fri Jul 25, 2008 8:55 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 23
- Joined: Wed Apr 08, 2009 5:28 am
- Location: Bangalore
thats a good idea to call routine but i want to call routine from transformer itself.myukassign wrote:how about an Exec command squncer stage to call the C program, which inturn call the your scrip tin it.
yes through System function hope i can run a unix command but result of this will be either exit numbers like 0 & -1 etc, but i want to get the value which is there in a script variable to the C program.Sainath.Srinivasan wrote:how about an Exec command squncer stage to call the C program, which inturn call the your scrip tin it.
somesh2dsx
-
- Participant
- Posts: 23
- Joined: Wed Apr 08, 2009 5:28 am
- Location: Bangalore
Now due to performance issue with the oracle connectivity for each and every record, i am planning to keep all my lookup table contents into normal unix file seperated by comma.
with this the performance will be atleast improved. On whole now my requirement is to :
1. call a c routine in datastage transformer
2. call a unix script for lookup in the unix file.
3. return the looked up data to c function or datastage directly.
please let me know for initial steps and commands used... and will research on this further.
with this the performance will be atleast improved. On whole now my requirement is to :
1. call a c routine in datastage transformer
2. call a unix script for lookup in the unix file.
3. return the looked up data to c function or datastage directly.
please let me know for initial steps and commands used... and will research on this further.
somesh2dsx
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Your proof?somesh2suma wrote:with this the performance will be atleast improved.
How are you moving the records from Oracle to the text file(s)?
Why not just effect the lookup directly against the virtual Data Set created by using the text file as the source for the reference input to a Lookup stage? There is no need for a C routine (not least because DataStage does not use C routines), and definitely no need for a UNIX command, which tends to create a new shell for each one invoked. Performance of that would suck.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 23
- Joined: Wed Apr 08, 2009 5:28 am
- Location: Bangalore
Ray,ray.wurlod wrote:Your proof?somesh2suma wrote:with this the performance will be atleast improved.
How are you moving the records from Oracle to the text file(s)?
Why not just effect the lookup direc ...
i mean to say i am using a normal unix file instead of an oracle table. so instead of creating insert statements for the given data, i will store the given data in file seperated by comma.....
somesh2dsx