ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Help needed in MQ-CICS Triggering !!

Post new topic  Reply to topic
 Help needed in MQ-CICS Triggering !! « View previous topic :: View next topic » 
Author Message
muthukumaran
PostPosted: Sat May 30, 2009 5:47 am    Post subject: Help needed in MQ-CICS Triggering !! Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 22

Hi,

I have a issue on MQ-CICS Triggering. I am trying out CICS-MQ Triggering on System z Mainframes. The outline process of what am currently doing is,

I have defined a Application Queue,Initiation Queue and a Process definition(A CICS Application). I have defined a Bridge Queue named SYSTEM.CICS.BRIDGE.QUEUE. When i put a message in the Application queue through my Cobol Application program, the CICS Transaction which i have associated with my application queue should get triggered.Also i have CKTI and CKBR running in CICS region.

Am not able to trigger a cics transaction which has some BMS Map commands like SEND MAP, RECEIVE MAP etc in the application program. Instead i end up with the following abend.

Transaction SFRT abend ABM3 in program SFRTRIGP term ????. Updates to local recoverable resources will be backed out.

I understand that the abend is due to usage of BMS commands with out terminals,since MQ starts the CICS transaction without terminal. But am not sure how to solve that ?

1.Should i use my normal Initiation Queue or the SYSTEM.CICS.BRIDGE.QUEUE as the initiation queue to my application queue ?

2. Do i need to modify my application program(both the one which puts a value to queue and also the CICS transaction program which gets triggered) to suit for 3270 bridge ?

I already have few parameters in our CICS program as well as the application which puts the value into the queue like MQMD-CORRELID,MQMD-FORMAT,MQCIH-FACILITY,MQCIH-FACILITYKEEPTIME. But it dint work.

Will be great if anyone can help me on this.

Thanks..
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat May 30, 2009 1:29 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You are using triggering and not using the CICS bridge.
You need to define a CICS.INITIATION.QUEUE that is referenced in your trigger program (CKTI). You then need to define the trigger queue and the process to the application queue and define the transaction to the process.

Read up on triggering... Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bob_buxton
PostPosted: Sat May 30, 2009 2:47 pm    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

If you need to invoke a CICS 3270 transaction then you do need to invoke the MQ-CICS bridge. As you have already realized this is non trivial.
It is quite complex to use the 3270 bridge both in filling in the CIH and in interpreting the BMS map data returned.

If you are using MQ triggering you need to invoke a program that uses the MQ API (MQOPEN/MQGET/MQPUT etc) and such program should not attempt to use terminal related CICS verbs - the two interfaces do not easily mix.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat May 30, 2009 3:32 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Two flavors of CICS-MQ work: 1) an application that is not 3270-aware; and 2) an application that is 3270-aware (a transaction) that expects 3270 data streams in and out.

1) With non 3270-aware applications, the CICS app expects input in the form of a COMMAREA. What needs to go into the application queue is (at minimum) the name of the application to launch in CICS, and the commarea contents. Output from the application goes to the commarea.

2) With 3270 transactions, what is supposed to go into the application queue is a 3270 data stream - what would have come from a 3270 facility (device). What goes into the reply-to-queue is output from the transaction - the 3270 data stream that would have otherwise gone to a 3270 facility (device).

One of the (optional) outputs from a BMS map assembly is ADS (Application Data Structure. The ADS identifies fields in the bms map. The ADS is exportable, and can be used by applications needing to invoke and programatically interact with 3270 transactions.

A good place to start reading http://www-01.ibm.com/software/htp/cics/library/connectors.html
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
muthukumaran
PostPosted: Sat May 30, 2009 9:37 pm    Post subject: Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 22

Hi,

Thanks for your quick response. But can you all be a bit more clearer for the 2 questions please..

To Add to the info's which i have given,

*I saw in a site that we need to compile the BMS Map with the option DSECT=ADSL wich i have done.

*And whats that "reply-to-queue"(mentioned by "bruce2359").I have no idea about that

*@ bob_buxton, "If you are using MQ triggering you need to invoke a program that uses the MQ API (MQOPEN/MQGET/MQPUT etc) and such program should not attempt to use terminal related CICS verbs - the two interfaces do not easily mix."

Do i need to have a intermediate program for using the bridge part? I have 2 programs now.One is a cobol pgm with MQ calls which puts a msg to queue. Another Cobol pgm with a single Send Map command which is called.

And by addressing evry field in MQCIH and MQMD helps in my problem ?

Your thoughts on these !!!

Thanks..
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sun May 31, 2009 5:36 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

I gather from your reply/comments/questions that you have little or no experience with either MQ or CICS. Yes?

Read about the MQ-CICS bridge and adapter here:
IBM WebSphere MQ for z/OS Concepts and Planning Guide
IBM WebSphere MQ for z/OS System Setup Guide

Quote:
I understand that the abend is due to usage of BMS commands with out terminals, since MQ starts the CICS transaction without terminal. But am not sure how to solve that ?


A questions for you:
Are you trying to execute an existing cics transaction (with no imbedded MQ calls in it)?

If so, the usual method is to implement the MQ request-reply model. In this model, a requesting application uses MQ calls to create a CIH and the 3270 data stream (made easier with the ADS) that simulates what a 3270-terminal would type to execute the transaction. The CIH and 3270 data stream is MQPUT to the triggered application queue. The requesting app then waits for the transaction to execute, and watches for the output BMS data stream to arrive in the reply-to-queue.

Technically, the bridge task executing in CICS starts the CICS transaction, takes the input BMS map (from the triggered application queue) and passes it to the transaction; then takes the BMS map output from the transaction, and passes it to the reply-to-queue. The requesting application then MQGETs the BMS output and parses it (again, with the aid of the ADS).
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
muthukumaran
PostPosted: Tue Jun 02, 2009 4:57 am    Post subject: Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 22

@bruce2359

Are you trying to execute an existing cics transaction (with no imbedded MQ calls in it)?

Yes. there are no MQ calls in it. for testing purpose am using a single BMS MAP API, send map in the cobol cics program.

i have display statements both before the send map and after the send map. when my transaction gets triggered am able to get the first message and it abends at BMS commands.

When i went thru some manuals, it was said like if we try to allocate a bridge facility we can overcome this. The bridge facility creates a virtual terminal for this purpose and destroys it once the facilitykeeptime gets over.

Its the same logic which happens with cics service flow also. But there it simulates it with some installed runtime environment.

My question is,

Is it possible to allocate a bridge facility using any CICS API in application program ? How about the following command ?

EXEC CICS START
TRANSID('SFRT')
BREXIT('DFH0CBRE')
BRDATA(WS-DATA)
BRDATALENGTH(4)
END-EXEC

the below given link gives an idea on BREXIT.

http://publib.boulder.ibm.com/infocenter/cicsts/v3r2/index.jsp?topic=/com.ibm.cics.ts.applicationprogramming.doc/commands/dfhp4_startbrexit.html

And this is the send map command am using.

Display 'A'
EXEC CICS
SEND MAP('SFRTRIG')
END-EXEC
Display 'B'

Am getting A in the o/p.. and ABM3 abend.

Can anyone clarify me on the same.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 02, 2009 5:12 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
Is it possible to allocate a bridge facility using any CICS API in application program ? How about the following command ?

Have you tried it? What happened?

What's wrong with setting up the bridge as defined in the system admin manual? It works.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Tue Jun 02, 2009 6:57 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

What is it that you are Really trying to achieve?

Are you?

  1. Trying to write a new CICS application that will use the MQ API
  2. Modify an exiting CICS 3270 application to use MQ for input/output
  3. Invoke an existing CICS 370 application without changing it any way.
  4. Something else.

It will be easier to give you advice once we know what you are trying to do rather than answering a series of unrelated questions.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
muthukumaran
PostPosted: Tue Jun 02, 2009 7:48 am    Post subject: Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 22

@ Bob

Am trying out option no 3.

Invoke an existing CICS 370 application without changing it any way.

In the course of the process to achieve it, am trying out various possible ways. but unsuccessful.. Would be great if u can address that ABM3 Abend. Just curious,did u ever faced it ?If so, wat are the options you tried ?

@ bruce2359

Tried that API, ended up with ABXE Abend.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 02, 2009 7:53 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

A quick lookup of ABM3 yields this:
ABM3
Explanation:

A BMS input or output request has been issued from a task that is not terminal-oriented.
System action:

The task is abnormally terminated with a CICS dump.
User response:

The task issuing a BMS input or output request must be attached to a terminal.
Modules:

DFHMCP

This should not be a surprise, since CICS expects a terminal at one end.

The bridge facility is the solution to this. The bridge is responsible for presenting the 3270 input (that would have come from a terminal; but now comes from a requesting application) to the transaction; and to trap the 3270 output and pass it to the requesting application.

The MQ request-reply model presumes that:
1. The requesting app has placed the 3270 data stream (plus CIH) in the triggered queue;
2. The bridge task takes the 3270 input and passes it to the transaction
3. The bridge task takes the 3270 output from the transaction; and
4. MQPUTs it in the reply-to-queue

I suppose you could write a bridge of your own, as it is a URM (user replaceable module.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
muthukumaran
PostPosted: Tue Jun 02, 2009 8:08 am    Post subject: Reply with quote

Novice

Joined: 12 Feb 2009
Posts: 22

To add some more info, am just trying to invoke the transaction successfully and nothing else.

My BMS map doesnt expect any input. it has two fields which are just hardcoded and during the execution of send map command from terminal, it just throws a map.

Hence in my case there is no input to map and is so simple. I just need to have both the display messages (before and after the BMS commands) in my cics region.

**************************************************************

Some questions for future use..

I understand that the input here goes as a 3270 data stream. but how to build that data stream.. I have already included and used some MQCIH fields in my CICS application program.

Do i need to put those field's along with usual values in the queue which triggers the transaction ?
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Tue Jun 02, 2009 8:14 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

muthukumaran wrote:
@ Bob

Am trying out option no 3.

Invoke an existing CICS 370 application without changing it any way.

In the course of the process to achieve it, am trying out various possible ways. but unsuccessful.. Would be great if u can address that ABM3 Abend. Just curious,did u ever faced it ?If so, wat are the options you tried ?

@ bruce2359

Tried that API, ended up with ABXE Abend.


So for option 3 you want to use the MQ CICS bridge which will do most of the work for you including getting of the message from the MQ input queue, allocate the bridge facility, invoke the contact admin and put the ouptut into an mQ message.

You are responsible for reading the documentation in the MQ application program guide.
Filling in the appropriate MQMD and MQCHIH header fields plus any input map data in the request message.
Getting the reply messages and interpreting the CICS map data returned.

You should not need to write any code that runs in the CICS when using the bridge.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 02, 2009 8:38 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Quote:
My BMS map doesnt expect any input. it has two fields which are just hardcoded and during the execution of send map command from terminal, it just throws a map.

Hence in my case there is no input to map and is so simple. I just need to have both the display messages (before and after the BMS commands) in my cics region.

Some CICS fundamentals for you:

If the cics transaction receives a map as its input, you have an input map. If the cics transaction sends a map as its output, you have an output map.
A map is a BMS map. A map is a 3270 data stream.

If you want to simulate a cics bms map conversation (which is what you say you want to do), you will need the ADS (mentioned in a prior post).

The ADS is a mapping of BMS map fields that allows a non-cics application to create 3270 data streams. In mainframe-speak, the ADS is something like a dsect - an overlay of data fields.

With the ADS, a non-cics app can compose an input bms map that becomes part of the message (plus CIH) that is put to the triggered request queue.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jun 02, 2009 8:44 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

As Mr. Buxton says: You should not need to write any code that runs in the CICS when using the bridge.

You will, however, need to write the requesting application that drives the conversation with the same BMS maps that would have taken place had a real user sat at a 3270 device and executed the transaction.

As advised, read the APG and APR manuals.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Help needed in MQ-CICS Triggering !!
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.