Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

EMPTY QUEUE command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
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    Post subject: EMPTY QUEUE command
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

Moderator


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

PostPosted: Tue Jun 18, 2013 12:58 pm    Post subject:
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: 2180
Location: @my desk

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

Pandora,

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

Moderator


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

PostPosted: Tue Jun 18, 2013 1:51 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us