IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to trigger a Transaction from a Batch program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sravindra_s

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Wed Jul 02, 2014 6:12 pm
Reply with quote

How to trigger a Transaction say (ABCD) from a Batch program.

where ABCD is Mapped to a program HROO50.

Can we add a step in JCL or any other means. Please suggest on this !!!!!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jul 02, 2014 8:41 pm
Reply with quote

The CICS External Interfaces Guide manual discusses the EXCI API which is designed to allow batch programs to invoke CICS programs. I suggest starting with this manual.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Wed Jul 02, 2014 11:29 pm
Reply with quote

Below links would help you to know how to do it, but you need to through manual and understand the process.

ibmmainframes.com/about18942.html
ibmmainframes.com/about16133.html
Back to top
View user's profile Send private message
sravindra_s

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Thu Jul 03, 2014 2:39 pm
Reply with quote

Hi Thanks for the information. Based on that I have coded as below

EXEC CICS LINK PROGRAM(WS-CARD-PROGRAM)
TRANSID('STU1')
APPLID(WS-CARD-REGION)
COMMAREA(DFHCOMMAREA)
LENGTH(LENGTH OF DFHCOMMAREA)
DATALENGTH(LENGTH OF DFHCOMMAREA)
RETCODE(EXCI-EXEC-RETURN-CODE)
SYNCONRETURN
END-EXEC.

But program failed with as below in sysout.

"
OPEN02 - RC1=000000088 RESP2=000000414 ABCODE= LINK TO ACOCHILD UNSUCCESSFUL

OPEN02 - RESP=00000088,RESP2=00000414,ABCODE= ,MSG=DFHAC2206 10:07:26 CICSTRAB Transaction STU1 faile".

when refered the manual it has "The target transid passed in the external CICS interface call is not defined on the target CICS system. Note the message received from the target CICS system. "

But Both STU1 and Program are defined in the cics region

I TRAN(STU1)
STATUS: RESULTS - OVERTYPE TO MODIFY
Tra(STU1) Pri( 001 ) Pro(ACOCHILD) Tcl( TRCLSTU1 ) Ena Sta
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Jul 03, 2014 9:48 pm
Reply with quote

Verify below check list as, also it Sounds like you are not getting to intended region.

1.ensure SYSIN SIT OPTIONS,for,target CICS region contains
ISC=YES,
IRCSTRT=YES,
2.verify you have a mirror transaction defined (default is CSMI)
3.verify you have an IRC CONNECTION and SESSION defined properly
You can perform a CEMT I CONN to view if you IRC connection is properly opened.

Finally, I would consider reviewing BatchCICS-Connect software to see if that fits your needs. Provides internal DPL pipe connections rather than EXEC CICS LINK.

Also, please refer to below link
ibmmainframes.com/about53154.html
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Fri Jul 04, 2014 2:03 pm
Reply with quote

Do you have Synchro at your shop? I've always found that makes the process very straightforward.
Back to top
View user's profile Send private message
sravindra_s

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Fri Jul 04, 2014 2:41 pm
Reply with quote

Verified

ISC=YES,
IRCSTRT=YES, are present

Verified

CEMT I CONN

I CONN
STATUS: RESULTS - OVERTYPE TO MODIFY
Con(XXXX) Ins Irc Exci

More over compiled with
IN SYSLIB
DD DSN=DFH4.&CICSVER..CICS.SDFHMAC(DFHEXLI),DISP=SHR

In SYSLIN
DD DSN=DFH4.&CICSVER..CICS.SDFHEXCI,DISP=SHR

which were not present earlier in Compile JCl.

But the program is still failing with

OPEN02 - RC1=000000088 RESP2=000000414 ABCODE= LINK TO ACOCHILD UNSUCCESSFUL
OPEN02 - RESP=00000088,RESP2=00000414,ABCODE= ,MSG=DFHAC2206 11:02:30 CICSTRAB Transaction STU1 faile

Let me know if still any verifications and inclusions to be made for successful run of the program
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 04, 2014 6:21 pm
Reply with quote

A batch program does NOT and CANNOT use EXEC CICS -- hence the EXCI API that I referenced earlier.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Jul 07, 2014 6:15 pm
Reply with quote

This one is a classic.

TS: How do I do this?
A: Here are two links that show how.
TS: Thanks, I didn't read those, but I'm going to say I did and post my code which looks like the original problem in those links that was corrected, then say that I read the links and modeled my code on the answers.
A: Dude, seriously...you can't do that.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top