This is my first post, so it could be a dumb question :). But Google doesn't help me out of this, then here I am.
I am trying to run every step in the process and control them in a job sequence. Data load, data validation and issue report. Due to some mystery reason (I will bring this up in another thread), if the data validation failed once, I want to delete the data loaded then rerun the data load job one more time. If twice data load can't get data validation successful, I will report the data issue to administrator and start the mannually investigation. Based on the requirement, I need an approach to customize the data validation job's status so I could using the trigger in job sequence to point the job flow into different directions(rerun data load, report data issue or success).
What I have right now:
I found some post talking about we could use Server Job. Within BASIC Transformer(I think this suggestion based on 7.5.X version), using UtilSetUserStatus routine(Should be under Routines/sdk/Utility) to set the job status. But I can't find this routine in DataStage 8.5 anywhere. If someone have some suggestions, I really appreaciate them.
Right now I am using the standard job status Failed/Success. The problem is, once the data validation job Failed. The process can't be run again( this standard process will run 100+ times to load data) until data validation job is compiled again. So if someone knows how to compile an Failed job during runtime(feels like impossible ^_^), that works too.
Thanks a lot. English is my second language, please forgive me about any wrong expressions.
Pinned topic Can we set job status in DataStage 8.5
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-08T12:41:32Z at 2013-01-08T12:41:32Z by LenGreenwood
LenGreenwood 2700006KN136 Posts
Re: Can we set job status in DataStage 8.52013-01-08T12:41:32ZThis is the accepted answer. This is the accepted answer.The underlying BASIC API call you need is DSSetUserStatus.
It is described in the 8.5 InfoCenter here:
I don't know what UtilSetUserStatus was at 7.5, but sounds like someone wrote a DS transform to call the above, so it could be used in a transformer stage. If you can find an entry called UtilSetUserStatus in the Routines part of the 7.5 project tree, you could always look at its source code in the DataStage routine editor. Then copy the code over to an 8.5 instance, if it is indeed just calling DSSetUserStatus, as I suspect. This will only work for Sever jobs btw. For Parallel jobs, the DSSetUserStatus API can only be called as part of an after-job routine, not from a Transformer stage.
You could investigate the API to write a custom routine (http://publib.boulder.ibm.com/infocenter/iisinfsv/v8r5/topic/com.ibm.swg.im.iis.ds.serverjob.dev.doc/topics/c_dsvjbref_Programming_in_WebSphere_DataStage.html) to see if that helps you set up the statuses you want. The job sequence triggers then have ways of testing user status values, as you have probably found out.
Don't understand your comment about having to recompile the job before it can be run again. Normally if a job fails, you just reset it; then it's good to go again. Compilation happens also to perform a reset, but it not essential just to get a job restarted after a failure. You will find the the "Run job" stages in a job sequence offer you options such as "Reset if required, then run", specifically to cope with failed jobs - check out:
Hope that helps.