View previous topic :: View next topic
|
Author |
Message |
KhareD
New User
Joined: 03 Sep 2009 Posts: 3 Location: Bangalore
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Pandora,
Looks like the SYSIN data is dynamic here. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
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 |
|
|
KhareD
New User
Joined: 03 Sep 2009 Posts: 3 Location: Bangalore
|
|
|
|
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.
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.
Thanks - D |
|
Back to top |
|
|
|