Simulating restartability

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
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Simulating restartability

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

Thanks gentlemen, for your responses. ray, by "duff" data you mean some bad data, right?
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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 »

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:
-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 »

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.
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 »

Oy... and never you mind about my petard, you shiftless wombat. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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?
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post 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.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post 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.
Post Reply