ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » DOS command to "sleep" for xxx seconds

Post new topic  Reply to topic
 DOS command to "sleep" for xxx seconds « View previous topic :: View next topic » 
Author Message
RatherBeGolfing
PostPosted: Wed Nov 27, 2002 7:24 am    Post subject: DOS command to "sleep" for xxx seconds Reply with quote

Centurion

Joined: 12 Nov 2002
Posts: 118
Location: Syracuse, NY, USA

We wrote a s simple CMD script which runs daily to:
STOP CHANNEL(channel.one)
RESET CHANNEL(channel.one) SEQNUM(1)
START CHANNEL(channel.one)

Someone pointed out that the STOP command is asynchronous and that using the above script, I may not have a stopped channel when the RESET and START commands are issued.

I wanted to avoid using MODE(FORCE) because of possible in-flight messages and the risk of causing an INDOUBT situation.

Note: by the time this sender channel needs to wake up, the receiver end has been gone for about 14 hours and the channel is in a 20 minute long retry. So, if I just issue the RESET command, I have to wait for the 20 minute interval to elapse before handshaking occurs - I have seen messages build up on my XMIT queue waiting this 20 minutes. So, the STOP and START commands were my attempt to force the RESET to occur immediately. I won't go into the reasons why I need the reset - please believe me when I say I do....

So, does anyone know of a way to run the equivalent of a SLEEP command in a .CMD or .BAT file?

TIA,
Larry LaChanse
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Nov 27, 2002 4:52 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722



Well Larry, I don't know how to do what you are asking. So in the meantime, if no has given you the answer you are looking for, and before someone else asks, let me.

Why are your channels not coming up and down automatically? I would think fixing the root cause would be the way to go, rather then coding this band-aid solution.

Are you triggering the SNDR?
What is the DISCINT value on this channel pair?
Are you using Heartbeats to ID network outages?
Are you using AdoptMCA to handle the SNDR attempting a reconnect before the heartbeat expires?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
RatherBeGolfing
PostPosted: Mon Dec 02, 2002 10:40 am    Post subject: Reply with quote

Centurion

Joined: 12 Nov 2002
Posts: 118
Location: Syracuse, NY, USA

Peter,
Well, it's kind of a long story, but here' the Reader's Digest version. Basically, we have a W2K box which has channels connected to each of 2 unique LPARs on our z/OS box. One LPAR goes to sleep for 14 hours each day (6 am to 8 pm). At 8 pm, when LPAR2 wakes up (is IPLed), I need the SDRs from my W2K box to wake up also. Now, the LPAR2 dasd has been completely overlaid with a fresh copy of whatever was on LPAR3, which is always different than what MQ knew about at 6 am when he first went to sleep. So, I need reset the sequence numbers on the SDRs every day at 8 pm. I knew going into this that my channels would not behave "normally" because of the DASD overlay everyday - we do this to make a complete copy of our production LPAR available to applications which run in the evening, when our legacy app batch cycle is running.

Regarding your questions:
Are you triggering the SNDR? YES, ON FIRST
What is the DISCINT value on this channel pair? 15 MINUTES
Are you using Heartbeats to ID network outages? YES, EVERY 2 MINUTES
Are you using AdoptMCA to handle the SNDR attempting a reconnect before the heartbeat expires? YES

I know this is kind of a funky situation for MQ and we have had our share of evening support because of our choice of solutions, but we also haven't been able to come up with a better way to deal with the LPAR2 situation.

Thanks for your help!
Larry
Back to top
View user's profile Send private message
mq_developer
PostPosted: Mon Dec 02, 2002 4:54 pm    Post subject: Reply with quote

Voyager

Joined: 18 Feb 2002
Posts: 82

Larry ,

I used to have a small C code which does the sleep for 'n' seconds. You have to pass the number of seconds to sleep as the input parameter to this program .

If you think this could solve your problem , let me know your mail id i can send you the 'C' code as well as the executable.

Thanks
Ram.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Dec 02, 2002 6:49 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

I found an old bat file I had that would would wait X seconds after starting an app before doing some more stuff.

Code:

do some stuff
start C:\MyLittleProgram.cmd
PING localhost -n 30 -w 1000 >NUL
do some more stuff


Don't know if there is a more elegant way of doing this, but it works. The 30 after the -n parameter is the 30 seconds.



So the WIN box has a SNDR channel to LPAR one and another SNDR channel to LPAR two? If an LPAR goes down at 8 PM, does the SNDR to that LPAR not go Inactive when after your HBInterval expires the SNDR sees that the corresponding RCVR is no longer heartbeating back? At this point both the SNDR and RCVR should be Inactive and the SEQ #s are no longer an issue?
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » DOS command to "sleep" for xxx seconds
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.