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
 

 

How to check if an input message IMS queue is empty

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IMS DB/DC
View previous topic :: :: View next topic  
Author Message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Fri May 08, 2009 1:57 pm    Post subject: How to check if an input message IMS queue is empty
Reply with quote

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
View user's profile Send private message

dominickim

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Fri May 08, 2009 3:45 pm    Post subject: CMD call
Reply with quote

Have you tried CMD call in an application program?
Back to top
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Fri May 08, 2009 4:36 pm    Post subject:
Reply with quote

No, can you explain a little bit what is a CMD call or refer some documet please?.
Thanks.
CasGarci
Back to top
View user's profile Send private message
dominickim

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Fri May 08, 2009 5:34 pm    Post subject: I hope it could help.
Reply with quote

I used to use this function for stopping and starting DBs from program.
Please refer following:
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims10.doc.apr/p3hwdlitm.htm
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri May 08, 2009 9:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Tue May 12, 2009 1:08 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dominickim

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Wed May 13, 2009 12:04 am    Post subject: Which IMS command did you use to check your queue?
Reply with quote

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
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Wed May 13, 2009 2:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dominickim

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Wed May 13, 2009 3:11 pm    Post subject: Output of /DIS TRAN your-tran or /DIS Q TRAN work for you?
Reply with quote

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
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Wed May 13, 2009 4:58 pm    Post subject:
Reply with quote

Thanks for your help dominickim,
Commands /DIS Q, /DIS QCNT looks very good.

Regards.
CasGarci.
Back to top
View user's profile Send private message
dominickim

New User


Joined: 28 Feb 2007
Posts: 65
Location: NS, CA

PostPosted: Wed May 13, 2009 5:50 pm    Post subject: Why don't you use those commands?
Reply with quote

Why don't you use those commands in your application with CMD call?
Back to top
View user's profile Send private message
casgarcia

New User


Joined: 06 May 2009
Posts: 21
Location: Madrid

PostPosted: Thu May 14, 2009 12:23 pm    Post subject:
Reply with quote

Yes, this is what I think to do.

Regards.
CasGraci.
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 -> IMS DB/DC All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Need input in Scheduling Benchwarmer CA Products 5 Tue Jun 06, 2017 1:44 am
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 2 Tue May 09, 2017 6:31 pm


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