IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

EMPTY QUEUE command


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
KhareD

New User


Joined: 03 Sep 2009
Posts: 3
Location: Bangalore

PostPosted: Tue Jun 18, 2013 11:55 am
Reply with quote

For Dev Environment, I am trying to run EMPTY QUEUE(csqutil_local_queues) via JCL. Below JCL works fine.
Code:
//EMPTY    EXEC  PGM=CSQUTIL,PARM='XXXX'       
//SYSPRINT DD    SYSOUT=*                       
//SYSIN    DD    *                             
EMPTY QUEUE(local_queue_1) 
EMPTY QUEUE(local_queue_2)
EMPTY QUEUE(local_queue_3) 
//

Now, I have a situation where the 'EMPTY QUEUE' commands(same as present in SYSIN DD of above JCL) are written into a PS file by a monitoring job and now I have to use this PS file in my JCL. Below JCL doesn't work...and gives the error 'CSQ9019E MQXX 'EMPTY' command is invalid'..!!!!

Code:
//CSQSTEP  EXEC PGM=CSQUTIL,PARM='MQXX'                   
//SYSPRINT DD SYSOUT=*                                   
//SYSIN    DD   *                                         
COMMAND DDNAME(CSQUCMD) TGTQMGR(MQXX)                     
/*                                                       
//CSQUCMD  DD DSN=file1,DISP=SHR <-- file1 has same 'EMPTY QUEUE' commands as in the previous JCL.

The same JCL works for other commands e.g. 'DISPLAY QUEUE', 'ALTER QUEUE' etc but doesn't work for 'EMPTY QUEUE'.
Can someone help me understand if there is a restriction on using the 'EMPTY QUEUE' command via PS file in JCL...and is there a way to overcome this..?

PS: I do have other alternative approach but all of them are somewhat tideous as comared to above and hence the question.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 18, 2013 12:58 pm
Reply with quote

But now what is stopping you from using

Code:
//EMPTY    EXEC  PGM=CSQUTIL,PARM='XXXX'       
//SYSPRINT DD    SYSOUT=*                       
//SYSIN    DD    *                             
EMPTY QUEUE(local_queue_1) 
EMPTY QUEUE(local_queue_2)
EMPTY QUEUE(local_queue_3)
//


Also in future kindly post this in MQ forum
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Jun 18, 2013 1:25 pm
Reply with quote

Pandora,

Looks like the SYSIN data is dynamic here.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jun 18, 2013 1:51 pm
Reply with quote

If it is dynamic TS could generate it and use it in SYSIN

I tried to replicate with command and got the same issue I believe COMMAND & EMPTY doesnt go well together
Back to top
View user's profile Send private message
KhareD

New User


Joined: 03 Sep 2009
Posts: 3
Location: Bangalore

PostPosted: Fri Jun 21, 2013 6:45 am
Reply with quote

Apologies for posting it in wrong forum earlier.

As I stated earlier, I designed my MQ monitoring job to have
STEP01 - write these 'EMPTY QUEUE' commands into PS based on some monitoring logic (via a REXX program)
STEP02 - User the PS file to execute the commands to clear the queues.

Before designing my rexx program (executing in STEP01), i was hoping that COMMAND & EMPTY will work together well but it seems that my assumption has gone wrong. icon_cry.gif
Thank you for your responses which confirms that COMMAND & EMPTY doesn't work together and there is no simple way to make them work together.

So now, I will have to tailor my Rexx program to create ane execute another JCL instead of creating a PS file with commands. This JCL, created from within RExx, will have the 'EMPTY QUEUE' command in SYSIN DD* (similar to the working example).

Suggestions to make this further simpler are encouraged. icon_smile.gif

Thanks - D
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top