Page 1 of 1

Basic Routine

Posted: Tue Aug 04, 2009 5:50 am
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.

Posted: Tue Aug 04, 2009 7:58 am
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.

Posted: Tue Aug 04, 2009 11:21 am
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 !!

Posted: Tue Aug 04, 2009 11:37 am
by chulett
This one might help:

viewtopic.php?t=127088

Posted: Wed Aug 05, 2009 12:15 am
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 ??

Posted: Wed Aug 05, 2009 12:30 am
by ray.wurlod
No.

But you can use dsjob -jobinfo project jobname in your script and parse out the information you require.

Posted: Wed Aug 05, 2009 5:29 am
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.

Posted: Thu Aug 06, 2009 3:28 am
by deepak.hsbc
Ok,so it is clear now that I have only dsjob which can be used in shell scripts.
Thanks to everyone !!