Page 1 of 1

Simulating restartability

Posted: Wed Dec 27, 2006 8:53 pm
by abc123
I have a job sequence and I am trying to reproduce an error to check my restartability logic. I have a loop at the beginning within which a job is called. There is another loop later in the job sequence where there is another job. I tried stopping the job and restarting but Datastage asks me to reset the job which obviously defeats my purpose. Has anybody done this?

Posted: Wed Dec 27, 2006 9:20 pm
by ray.wurlod
"Stopped by operator" is not a status that is amenable to restart. You need to cause one of the jobs to abort - not the same as being stopped. Feed it some duff data.

Posted: Wed Dec 27, 2006 9:31 pm
by DSguru2B
You can choose ExecSH in the after job subroutine and pass nothing. Set the warning limit to 1. This way the job will create a warning and the job will abort. When your done testing clear the after job subroutine.

Posted: Thu Dec 28, 2006 1:58 am
by abc123
Thanks gentlemen, for your responses. ray, by "duff" data you mean some bad data, right?

Posted: Thu Dec 28, 2006 2:07 am
by I_Server_Whale
abc123 wrote:Thanks gentlemen, for your responses. ray, by "duff" data you mean some bad data, right?
Yes. And also a proper noun always starts with a capital letter.

It should be 'Ray' and not 'ray'.

Whale.

Posted: Thu Dec 28, 2006 6:28 am
by ray.wurlod
abc123 wrote:Thanks gentlemen, for your responses. ray, by "duff" data you mean some bad data, right?
That is correct, this adjectival form is widely understood in the UK and most of its former colonies.

Curiously, the adjective form does not appear in dictionary.com nor does the colloquial usage "up the duff" meaning pregnant.

Posted: Thu Dec 28, 2006 9:24 am
by chulett
Huh... while I knew what Ray meant, I had no idea about the 'pregnancy' link nor the fact that is some kind of pudding. :?

They also fail to mention that it is Homer Simpon's favorite beer. :lol:

Posted: Thu Dec 28, 2006 4:32 pm
by ray.wurlod
No, since that - being a proper noun - would require an upper case "D".

I believe the phrase is "hoist by his own petard". :P

I suspect that abc123's aberration was merely a slip of the Shift key. As Dilbert once put it: shift happens.

Posted: Thu Dec 28, 2006 4:38 pm
by chulett
Oy... and never you mind about my petard, you shiftless wombat. :wink:

Posted: Mon Jan 22, 2007 3:57 pm
by abc123
Just to restart the topic. DSGuru2B, I am trying your technique but I have a problem. I have selected ExecSH in the After-Job subroutine without any "Input Value". This will make the job fail but that's not what I want. I want to simulate restarting the job so I want it to fail on the 2nd or 3rd iteration (I have a loop in the Sequence job) so I pretty much have to do this at runtime. How would I do that or should I follow Ray's instruction and try to send in some bad data?

Posted: Mon Jan 22, 2007 4:01 pm
by DSguru2B
If thats the case then yes, send in bad data and keep your warn limit low. This way within just a few warnings the job will abort.

Posted: Mon Jan 22, 2007 5:03 pm
by abc123
Can you suggest how I would send bad data in my situation? My job sequence has 4 ExecuteCommand stages and 1 Job Activity stage. The job activity stage calls a job which goes through several different files of exact same structure. The first stage in the job is a sequential file stage which has all char input columns.

Posted: Mon Jan 22, 2007 5:17 pm
by kumar_s
Or modify the Script in ExecuteCommand or a script in Afterjob to intake a paremter and create a warning based on the parameter value say if the value is greater thatn 2. You can produce warning by executing some wrong script or referring to a wrong file name or path.
The input parameter can be you loop counter. So that at 2 or 3 count you will get the warning.

Posted: Tue Jan 23, 2007 10:55 am
by abc123
kumar_s, I tried putting in an ExecuteCommand with a non-existing shell script inside. It produces "Reply=1" value but still executes successfully. I tried doing "After-job subroutine" where I did a DSSendMail. It producess an warning in the job log but does not produce a warning in the sequencer. Everything executes successfully.

Thanks for your help.