conditional command execution

Roy Reynolds

conditional command execution

I have a series of BINDs to complete in one step.  Is there a way to halt successive command executions on unsuccessful completion of one bind?

Roy Boxwell

conditional command execution
(in response to Roy Reynolds)
On z just use JCL COND to stop processing when a RC > 04 happens. Means you need one job step for every bind of course...

Roy Boxwell
SOFTWARE ENGINEERING GmbH and SEGUS Inc.
-Product Development-
Heinrichstrasse 83-85
40239 Düsseldorf/Germany
Tel. +49 (0)211 96149-675
Fax +49 (0)211 96149-32
Email: [login to unmask email]<mailto:[login to unmask email]>
http://www.seg.de

Software Engineering GmbH
Amtsgericht Düsseldorf, HRB 37894
Geschäftsführung: Gerhard Schubert, Bettina Schubert

On 10 Aug 2017, at 21:28, Roy Reynolds <[login to unmask email]<mailto:[login to unmask email]>> wrote:


I have a series of BINDs to complete in one step. Is there a way to halt successive command executions on unsuccessful completion of one bind?

-----End Original Message-----

J&#248;rn Thyssen

RE: conditional command execution
(in response to Roy Reynolds)

Hi Roy,

Do you have any Db2 vendor tools?

 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

Views are personal. 

Raymond Bell

conditional command execution
(in response to Jørn Thyssen)
A word of caution with at least one vendor (and I include IBM in this). I put together a set of jobs to do 30K binds from one DSG to another and thought I’d use our current admin tool to build the jobs so I could make use of its restartability. I didn’t care if they failed, but if for some reason I had to cancel the jobs I wanted to be able to restart them from where it ended.

Trouble is, failed DB2 commands like Bind get saved away and if you restart the job after your specified number of failures the Binds get reattempted. Sorry, but that’s not a ‘restart’ and I don’t want them reattempted; I want it to restart from point of failure. With one tool at least you can tell it how many failures to tolerate (maybe 1 in your case?) but if you restart the job, it will attempt to rerun the failed bind – which, presumably, will fail again.

I got around it by updating the table that holds the failed statements to be a blank – worked, if a little clumsy and I don’t recommend lifting the lid on any vendor product – but in the end I just tolerated no restart and went with IKJEFT01 and raw DSN commands. Although to be fair this vendor is working on an additional switch to optionally not include bind failures in their error table/count. Would be ideal for me, but maybe less useful for you.

Cheers,


Raymond

Raymond Bell
DB2 Database Administrator | IT Operations | Technology | RBS

From: Jørn Thyssen [mailto:[login to unmask email]
Sent: 10 August 2017 22:17
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: conditional command execution


*********************************************
" This message originates from outside our organisation. Consider carefully whether you should click on any links, open any attachments or reply. If in doubt, forward to ~ Phishing"
*********************************************


Hi Roy,

Do you have any Db2 vendor tools?



Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email]<mailto:[login to unmask email]> • W: www.rocketsoftware.com http://www.rocketsoftware.com

Views are personal.

-----End Original Message-----
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. The Royal Bank of Scotland is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and Prudential Regulation Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions.

National Westminster Bank Plc. Registered in England No. 929027. Registered Office: 135 Bishopsgate, London EC2M 3UR. National Westminster Bank Plc is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.

The Royal Bank of Scotland plc and National Westminster Bank Plc are authorised to act as agent for each other.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc, The Royal Bank of Scotland N.V., National Westminster Bank Plc or any affiliated entity (“RBS” or “us”) does not accept responsibility for changes made to this message after it was sent. RBS may monitor e-mails for business and operational purposes. By replying to this message you give your consent to the monitoring of your e-mail communications with us.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by RBS in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Visit our website at www.rbs.com http://www.rbs.com

J&#248;rn Thyssen

RE: conditional command execution
(in response to Raymond Bell)

Hi Raymond,

You did not expose the vendor, but IBM Db2 Administration Tool's batch processor ADBTEP2 has an option BINDERROR='IGNORE' that could be helpful in that scenario.

 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

Views are personal. 

Raymond Bell

conditional command execution
(in response to Jørn Thyssen)
:o)

Rumbled.

Trust me, I played with it – but if you want n number of errors before stopping, you can’t have IGNORE. And if you have any other value, the failed commands are tucked away and reattempted first, before the rest of the statements are attempted from point of original failure. I think… Vijaya? suggested a new keyword, something like MAXENOHOLD, which from her description sounds like what I wanted.

In the end, I don’t care if the binds fail. In my case I expect most of them to – legitimately. So was never going to restart it anyway. But it would still be a useful feature to have.

Hmmm… I wonder if Change Manger does it differently. If only I knew someone who knew that product… ;o)

Cheers,


Raymond

Raymond Bell
DB2 Database Administrator | IT Operations | Technology | RBS

From: Jørn Thyssen [mailto:[login to unmask email]
Sent: 11 August 2017 16:22
To: [login to unmask email]
Subject: [DB2-L] - RE: conditional command execution


*********************************************
" This message originates from outside our organisation. Consider carefully whether you should click on any links, open any attachments or reply. If in doubt, forward to ~ Phishing"
*********************************************


Hi Raymond,

You did not expose the vendor, but IBM Db2 Administration Tool's batch processor ADBTEP2 has an option BINDERROR='IGNORE' that could be helpful in that scenario.



Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email]<mailto:[login to unmask email]> • W: www.rocketsoftware.com http://www.rocketsoftware.com

Views are personal.

-----End Original Message-----
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. The Royal Bank of Scotland is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and Prudential Regulation Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions.

National Westminster Bank Plc. Registered in England No. 929027. Registered Office: 135 Bishopsgate, London EC2M 3UR. National Westminster Bank Plc is authorised by the Prudential Regulation Authority, and regulated by the Financial Conduct Authority and the Prudential Regulation Authority.

The Royal Bank of Scotland plc and National Westminster Bank Plc are authorised to act as agent for each other.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc, The Royal Bank of Scotland N.V., National Westminster Bank Plc or any affiliated entity (“RBS” or “us”) does not accept responsibility for changes made to this message after it was sent. RBS may monitor e-mails for business and operational purposes. By replying to this message you give your consent to the monitoring of your e-mail communications with us.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by RBS in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Visit our website at www.rbs.com http://www.rbs.com