DSGetJobInfo to execute in a shell script

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

DSGetJobInfo to execute in a shell script

Post by Amit_111 »

Hi All,

I want to execute the commands "DSGetJobInfo", "DSGetLinkInfo" through Unix shell script to get information like "StartTime" "EndTime" and records passed throuh the links of a particular job.
I further want to get the output of these functions in a variable in shell script and directly insert the output in an Oracle table through the same shell script

I tried executing these commands but was not successfull.
Please let me know if it is possible and if their is any alternate command to be executed in Unix which will give me the same output as that of "DSGetJobInfo", "DSGetLinkInfo"?

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Check the various options for 'dsjob', there are equivalents there for all of the functions you can use in jobs. Server Job Developer's Guide, Command Line Interface chapter or the usage help in dsjob itself.

For example: dsjob -jobinfo
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSGetJobInfo() and its ilk are not commands - they are DataStage BASIC subroutines. They are not directly invokable from the operating system.

The dsjob command provides some, but not all, of the functionality.

There is a C-callable DataStage API that you can use (in your own C code).

You can also do the whole thing within DataStage, including insertion into the Oracle table.

Even better, that particular wheel has already been invented. Download ETLstats from Kim Duke's website
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Amit_111
Participant
Posts: 134
Joined: Sat Mar 24, 2007 11:37 am

Post by Amit_111 »

Thanks Craig and Ray for your valuable pointers.
I could get the link Information through dsjob in the Unix Shell script.
Post Reply