Basic Routine

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
deepak.hsbc
Participant
Posts: 39
Joined: Sun Apr 15, 2007 11:30 pm

Basic Routine

Post by deepak.hsbc »

:idea:

Is there any possiblities so that I can embade datastage Basic functions like DSAttachJob,DSGetProjectInfo etc into a Unix script OR can I call this functions from Universe shell ??

I know ther are other ways of doing this from datastage CLI but I want to explore the combination of Unix shell and Basic functions.
"Books are as useful to a stupid person as a mirror is useful to a Blind person."
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, you can do this in a script via the "Universe shell", search here for dssh or uvsh for examples where people have done similar things.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepak.hsbc
Participant
Posts: 39
Joined: Sun Apr 15, 2007 11:30 pm

Post by deepak.hsbc »

Thanks Craig,
but search did not really help.There are only basic routines which call the function but none of the post tells how to run it from uvsh.

Any example will be a great pathfinder !!
"Books are as useful to a stupid person as a mirror is useful to a Blind person."
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This one might help:

viewtopic.php?t=127088
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepak.hsbc
Participant
Posts: 39
Joined: Sun Apr 15, 2007 11:30 pm

Post by deepak.hsbc »

Certainly the post u mentioned is very informative but still it is all about Universe call in a unix script whereas I want is to run following Basic functions in a Unix script and store the output in a file -

hDsJob = DSAttachJob(JobName, DSJ.ERRFATAL)
Start_TS = DSGetJobInfo (hDsJob, DSJ.JOBSTARTTIMESTAMP)
End_TS = DSGetJobInfo (hDsJob,DSJ.JOBLASTTIMESTAMP)
Elapsed_Sec = DSGetJobInfo (hDsJob,DSJ.JOBELAPSED)
Job_Status = DSGetJobInfo (hDsJob,DSJ.JOBINTERIMSTATUS)
User_Status = DSGetJobInfo (hDsJob,DSJ.USERSTATUS)

Is this possible ??
"Books are as useful to a stupid person as a mirror is useful to a Blind person."
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No.

But you can use dsjob -jobinfo project jobname in your script and parse out the information you require.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, no - you could use those from a routine and call that after job. For a script you need to stick with either dsjob options or things you can query from the repository.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepak.hsbc
Participant
Posts: 39
Joined: Sun Apr 15, 2007 11:30 pm

Post by deepak.hsbc »

Ok,so it is clear now that I have only dsjob which can be used in shell scripts.
Thanks to everyone !!
"Books are as useful to a stupid person as a mirror is useful to a Blind person."
Post Reply