MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cancelling a DB2 thread in Batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Fri Aug 17, 2007 2:22 am    Post subject: Cancelling a DB2 thread in Batch Reply with quote

Hi,
I would like to request you all to help me in cancelling the threads.
I searched for the tips and got few tips given by KOLUSU.
I want to automate this cancellation process in rexx or jcl.
Could please anyone of you help me in this regard?
Thanks in advance..
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Aug 17, 2007 7:33 am    Post subject: Reply with quote

Quote:

I would like to request you all to help me in cancelling the threads.

satyenderd,

cancel threads? What exactly do you mean? Please Post detailed information on what you're trying to accomplish. Do not make people guess what you mean. This will give you a much better chance of getting a good answer to your question.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Mon Aug 20, 2007 1:02 am    Post subject: CANCELLING THREAD Reply with quote

Kolusu.. thanks for u r response.
The situation is: I have to cancel specific application DB2 threads everyday in the evening. For this i am using everday
Code:

 -CANCEL THREAD(XX) 

I want to automate this process by writing the job which will cancel the threads automatically at specified time. For this i want to write a job or a tool. I have seen u r tip in one of the posting.
Code:

//STEP0100  EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=3072K       
//SYSUDUMP DD  SYSOUT=*                                     
//SYSTSPRT DD  SYSOUT=*                                     
//SYSPRINT DD  SYSOUT=*                                     
//SYSTSIN  DD  *
-DIS THD(*) TYPE(ACTIVE)
/* 

when i used this one i am getting one error:
INVALID COMMAND SYNTAX NAME

Please help in how to write a job in cancelling the specific thread?

Hope u got it.

Thanks in Advance.
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Aug 20, 2007 8:01 am    Post subject: Reply with quote

satyenderd,

The error you are getting is because you did not specify the DSN command. ie. change your SYSTSIN to the following

Code:

/SYSTSIN  DD  *               
DSN SYSTEM(XXXX)   
-DIS THD(*) TYPE(ACTIVE)
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Aug 21, 2007 3:21 am    Post subject: CANCELLING THREAD Reply with quote

Thanks Kolusu for u r quick response..

Its been resolved.

Thanks for u r help.

have a great day.
_________________
Satya
Back to top
View user's profile Send private message
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Tue Aug 21, 2007 3:28 am    Post subject: CANCELLING THREAD Reply with quote

Kolusu,
Could you pls help me how to cancel a thread.
In the same manner, but need to cancel a specific thread.

for eg: If display thread displays 100 threads i need to cancel specific thread, identifying with AUTHID, PLAN NAME and TOKEN.
Is it possible to write a cancel thread job?
I have gone thru DB2 THREAD EXPERT but my system does not support that.

Pls help me in this regard. so that i can schedule that job to cancel that specific thread everyday.
Thanks in advance.
_________________
Satya
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Aug 21, 2007 6:56 am    Post subject: Reply with quote

Quote:

If display thread displays 100 threads i need to cancel specific thread, identifying with AUTHID, PLAN NAME and TOKEN.
Is it possible to write a cancel thread job?


satyenderd,

Generate the cancel thread commands from the output of display thread command using an utitlity or sort .

Quote:

so that i can schedule that job to cancel that specific thread everyday


If your shop has scheduler software then schedule the job

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
satyenderd
Beginner


Joined: 26 Aug 2005
Posts: 144
Topics: 73

PostPosted: Wed Aug 22, 2007 1:36 am    Post subject: Reply with quote

Kolusu,

Thanks once again.

I will try it today. I will let you know if i face any problems in this process.

Thanks a lot.

Have a great day.
_________________
Satya
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group