Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1561
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: 2387
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: 1561
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 Send data from a CICS TS program to M... spiThingy CICS 2 Wed Aug 08, 2018 8:58 am
No new posts SDSF - SJ command not working properly mistah kurtz IBM Tools 5 Tue Jun 26, 2018 2:33 pm
No new posts Need help on TDQ load from file using... subratarec CICS 4 Wed Jun 13, 2018 11:32 pm
No new posts Rexx command to open an another text ... Bharath Vikraman PC Guides & IT News 7 Sat May 12, 2018 4:34 pm
No new posts IBM Pcomm macro startmacro command do... JGregoire IBM Tools 0 Wed May 09, 2018 12:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us