View previous topic :: View next topic
|
Author |
Message |
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
Hello,
I need to know, from an application program, if there are any message left in the the input queue of an IMS transaction to issue a End-Process event.
So I wander if it is possible check (in an application pgm) if an input IMS queue is completely empty. I coudn't find any positive response.
Can any of you help me on this issue.
Thanks & Regards.
CasGraci. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Have you tried CMD call in an application program? |
|
Back to top |
|
|
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
No, can you explain a little bit what is a CMD call or refer some documet please?.
Thanks.
CasGarci |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
If I am not wrong, does not status code of QC or QD help us to check if there any messages waiting to be read?
-Ajay |
|
Back to top |
|
|
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
Hi all,
CMD call is not indicate to check if a queue is empty.
Regarding IMS return codes: QC or QD they don't guaranty that the queue is empty. IMS scheduler can return a QC to the application pgm just because priorities reasons and still there are message left in the transaction queue to be processed later.
Thanks for your help.
Any other ideas?
Regards.
CasGarci. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello CasGarci,
I am not quite sure what you are facing.
What are the results of CMD call and which IMS command did you use in order to find your queue?
Please refer below and remember to use GCMD as well, copied from manual:
---------------------------------------------------
CMD call
The Command (CMD) call enables an application program to issue IMS commands.
Usage
Use the CMD call with the GCMD call to send commands to and receive responses from IMS TM. After the CMD call issues the command to IMS TM, IMS TM processes the command and returns the first segment of the response message to the application program's I/O area, but only if a CC status code is returned on the CMD call. Your application program must then issue GCMD calls to retrieve all subsequent message segments one segment at a time. For more information, see GCMD call. The CMD and GCMD command calls are typically used to perform functions that are usually handled by someone at a terminal. These programs are called automated operator (AO) applications.
Related reading: For more information on the automated operator interface (AOI), see IMS Version 10: Exit Routine Reference.
Before you issue a CMD call, the IMS command that you want to execute must be in the I/O area that you refer to in the call. When you issue a CMD call, IMS TM passes the command from the I/O area to the IMS control region for processing. IMS TM places your application program in a wait state until the command is processed. The application program remains in a wait state until IMS TM returns a response. (Response means that IMS TM has received and processed the command.) For asynchronous commands, you receive a response when the command is processing, but not when it is complete.
Restrictions
The AIB must specify the I/O PCB for this call.
Any application program that uses this call must be authorized by the security administrator.
You cannot issue a CMD call from a CPI-C driven application program.
This call is not supported in an IFP or non-message-driven BMP. |
|
Back to top |
|
|
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
Hi dominickim,
I am looking for a way to check from an application program if its associted IMS input queue is empty. That's there isn't any message left in the program input queue waiting to be processed.
IMS is aware when a queue pass from empty to no-empty and when this happend the scheduling start working, in order to dispatch the input messages.
¿Is there a way to 'ask IMS' if an input queue es empty? so no message is left for processign.
I check in the funcionality of 'CMD call' but i didn't find the requested funtion.
Regards.
CasGarci. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Hello CasGarci,
Output of /DIS TRAN your-tran or /DIS Q TRAN command in IMS work for you?
But you have to remember that someone can enter the transaction(s) while are you examining the queue.
Dominic |
|
Back to top |
|
|
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
Thanks for your help dominickim,
Commands /DIS Q, /DIS QCNT looks very good.
Regards.
CasGarci. |
|
Back to top |
|
|
dominickim
New User
Joined: 28 Feb 2007 Posts: 65 Location: NS, CA
|
|
|
|
Why don't you use those commands in your application with CMD call? |
|
Back to top |
|
|
casgarcia
New User
Joined: 06 May 2009 Posts: 21 Location: Madrid
|
|
|
|
Yes, this is what I think to do.
Regards.
CasGraci. |
|
Back to top |
|
|
|