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
 

 

Call non-CICS programs from CICS environment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Sayan Bhattacharyya

New User


Joined: 27 Jul 2014
Posts: 7
Location: India

PostPosted: Sat Oct 31, 2015 2:45 am    Post subject: Call non-CICS programs from CICS environment
Reply with quote

Hello,
We are trying to dynamically call a subroutine belonging to a different system from a cobol program that is ultimately getting executed in CICS environment in our native application.

The called subprogram has no CICS statements in it.It connects to a UDB and runs a stored proc to retrieve data from a remote database.it is compiled with no-dynam option.It has NOT been translated.
The CICS job is currently failing with a protection exception;S0C4, and an ASRA abend is displayed on the CICS screen.

Upon further investigation,it was found that the call chain fails while calling DSNHLI.

Could any one please suggest if this is because the called subroutine is using default addressing parameters( 24-bit addressing) and the passed parameters are above the 16MB line;or there might be some other issue.

To test out the above theory i removed the Amode,Rmode parms from the calling program but the CICS job is still abending with the protection exception.

Please let me know your thoughts on this.
Much obliged.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Sat Oct 31, 2015 3:30 am    Post subject:
Reply with quote

Check if DSNHLI is present in both CICS and DB2 libs and try flip flop this in steplibs as such types of errors are tough to guess. If it is brand new program then suggest you to look for all possible basic causes of S0C4.

Also as said, A 31-bit program calls a 24-bit program and passes data that the subroutine cannot access could possibly also be the cause so you may try removing AMODE(31), RMODE(ANY).
Back to top
View user's profile Send private message
Sayan Bhattacharyya

New User


Joined: 27 Jul 2014
Posts: 7
Location: India

PostPosted: Sat Oct 31, 2015 3:55 am    Post subject: Reply to: Call non-CICS programs from CICS environment
Reply with quote

Hi Rohit,
Thanks for looking into it.As i had already mentioned that i have removed the addressing and residency parms from the calling program and still receiving the same error; i am guessing its not one of the issues.

Also the CICS DFHRPL concatenation has the CICS version of DSNHLI stub, DSNCLI from within CICS library SDFHLOAD.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Sat Oct 31, 2015 4:30 am    Post subject:
Reply with quote

SB, In CICS make sure SDFHLOAD appears above SDSNLOAD in your DFHRPL. if anything else is the casue then you got to check other basic reasons for S0C4 abend as suggested.

Check the Rules
https://www-01.ibm.com/support/knowledgecenter/#!/SSGMCP_5.1.0/com.ibm.cics.ts.applicationprogramming.doc/topics/dfhp3_cobol_subprog_rules.html
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sat Oct 31, 2015 5:06 pm    Post subject:
Reply with quote

Hi Sayan.. Years back i faced similar issues when calling a non cics pgm from cics.
Could you have a look into tis one.
http://ibmmainframes.com/about5154.html
I tried using DFHEIBLK along with other parameters passed in the linkage section in both the called and calling program respectively and it helped me.
Just a try once.
Back to top
View user's profile Send private message
Sayan Bhattacharyya

New User


Joined: 27 Jul 2014
Posts: 7
Location: India

PostPosted: Sat Oct 31, 2015 10:24 pm    Post subject:
Reply with quote

Hi Rick,
Thank you for looking into this.Since the called program is not cics translated,
i donot think there is a necessity to use DFHEIBLK DFHCOMMAREA in the linkage.
If the called program was CICS translated,then these would be inserted automatically in the PD by the CICS translator and similar dummy linkages could have been used to compensate for them in the calling program.

Just tell me this,was inserting those sufficient to solve your problem?Also did you call the subroutine statically or dynamically?And was it a cobol call or a CICS link.
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sat Oct 31, 2015 10:39 pm    Post subject:
Reply with quote

Hi Sayan..i agree to what u told. As far as i remeber in my scenerio, it was a static call. Yes, explicitly writing the DFHEIBLK along with commarea solved my problem.
Back to top
View user's profile Send private message
Sayan Bhattacharyya

New User


Joined: 27 Jul 2014
Posts: 7
Location: India

PostPosted: Sat Oct 31, 2015 10:53 pm    Post subject:
Reply with quote

Thanks Wrick(apologies for the misspelling it the first time around).
In your particular case,were you suing a tool like an Endeavor or Change-man,where the called subroutine was an online specific Source library type,due to which it was expecting the extra linkages ?
Also ,just to be clear,the called subrotine had no CICS statements in it right?
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 59
Location: hyderabad

PostPosted: Sat Oct 31, 2015 11:37 pm    Post subject:
Reply with quote

Hi..yes, the called sub program had no CICS statements in it. We used Panvalet that time..and there was nothing online specific as far as i remember. We faced this issue while LE conversion of the existing modules..the sub module being called statically was getting compiled/linked using the same compiler(the proc that was used for cics pgms)..
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Tue Nov 03, 2015 3:23 am    Post subject:
Reply with quote

SB, Are you compliant with the calling Rules as given above? if there is no CICS in the called module then DFHEIBLK DFHCOMMAREA isn't must.
Back to top
View user's profile Send private message
Sayan Bhattacharyya

New User


Joined: 27 Jul 2014
Posts: 7
Location: India

PostPosted: Fri Nov 06, 2015 11:39 pm    Post subject:
Reply with quote

Hi,
Finally we were successful in calling the module.We passed the subroutine through the CICS translator which inserted the DFHEIBLK DFHCOMMAREA into the PD of the called subroutine.To compensate for the extra linkages,we created a couple of dummy linkages in the calling module which is working fine and the call was successful.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Nov 06, 2015 11:48 pm    Post subject:
Reply with quote

Great!. Thanks for posting back the solution. However these calling rules are listed out already but Wrick did point out.
https://www-01.ibm.com/support/knowledgecenter/#!/SSGMCP_5.3.0/com.ibm.cics.ts.applicationprogramming.doc/topics/dfhp3_cobol_nested.html?cp=SSGMCP_5.3.0%2F12-2-7
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


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