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

Getting TWA in CICS program while connecting via zOS Connect


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Wed Jun 08, 2022 9:33 pm
Reply with quote

Hi,
I am trying to hit a CICS program using via API using IBM zOS connect and to below are the points how I am doing that -
1. One CICS trans ABCD is created and CICS region is configured to map the transaction with the CICS program XXXXXX
2. DFHCOMMAREA has the request and response layout that are configured in zOS connect
3. CICS program is getting abended while trying access TWA inside the program.

How can I get the TWA in the CICS program while hitting the TRANS ID from API (zOS connect).

thanks in advance.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jun 09, 2022 4:04 pm
Reply with quote

Does the transaction definition have a TWASIZE specified?

Can you show the abend? What is the abend code?

Garry.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Tue Jun 14, 2022 9:59 am
Reply with quote

Hi Garry -

Yes TWA size is specified and that is 2004 bytes.

The error I am getting is - CEE3204S The system detected a protection exception (System Completion Code =0C4)

The error is coming in the below statement -

MOVE TRANSACTION-WORK-AREA
TO SAVE-TWA
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jun 14, 2022 12:38 pm
Reply with quote

It's impossible to know what the problem is from the little information you've given.

Can you show your program code? For example, how are you addressing the TWA and how are TRANSACTION-WORK-AREA and SAVE-TWA defined?

Garry.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Tue Jun 14, 2022 5:36 pm
Reply with quote

LINKAGE SECTION.
01 DFHCOMMAREA PIC X(32700).
01 TRANSACTION-WORK-AREA PIC X(2004).

SAVE-TWA is working storage with PIC X(2004).

EXEC CICS ADDRESS TWA(ADDRESS OF TRANSACTION-WORK-AREA) END-EXEC

MOVE TRANSACTION-WORK-AREA
TO SAVE-TWA

The above program name is XXXXXXXX

CICS TRANs ID is - ABCD mapped with above program in the CICS region
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jun 14, 2022 7:07 pm
Reply with quote

Shouldn't TRANSACTION-WORK-AREA be defined in working storage, not LINKAGE section?

Garry.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Tue Jun 14, 2022 8:29 pm
Reply with quote

Hi Garry -

If we define TRANSACTION WORK AREA in working storage, do we need below code, no right ?

EXEC CICS ADDRESS TWA(ADDRESS OF TRANSACTION-WORK-AREA) END-EXEC

MOVE TRANSACTION-WORK-AREA
TO SAVE-TWA
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Jun 14, 2022 8:58 pm
Reply with quote

See the IBM-supplied sample in SDFHSAMP(DFH0W2F1).

It has, in working storage :
Code:

77 NAVIGATION-PTR     USAGE IS POINTER.

then, in code :
Code:
  EXEC CICS ADDRESS TWA(NAVIGATION-PTR) END-EXEC. 
     SET ADDRESS OF FILE-KEYS TO NAVIGATION-PTR.


where FILE-KEYS equates to your TRANSACTION-WORK-AREA .

Whether you need field SAVE-TWA is entirely up to you.

Garry.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Tue Jun 14, 2022 9:58 pm
Reply with quote

Where did you define the FILE-KEYS? In Linkage section or in Working Storage?
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 Jun 15, 2022 12:24 am
Reply with quote

Quote:
Where did you define the FILE-KEYS? In Linkage section or in Working Storage?
If you look at the sample program as suggested, you will see that NAVIGATION-PTR is in WORKING-STORAGE SECTION and FILE-KEYS is in LINKAGE SECTION.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Wed Jun 15, 2022 12:05 pm
Reply with quote

Unfortunately it is still getting the same error icon_sad.gif

CEE3204S The system detected a protection exception (System Completion Code =0C4)
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Jun 15, 2022 12:33 pm
Reply with quote

...and, unfortunately, you haven't shown your code - just some individual lines.

Garry.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Wed Jun 15, 2022 2:22 pm
Reply with quote

WORKING-STORAGE SECTION.

77 NAVIGATION-PTR USAGE IS POINTER.

01 SAVE-TWA PIC X(2004)

LINKAGE-SECTION.

01 DFHCOMMAREA.
COPY COPYREQ
COPY COPYRES
01 TRANSACTION-WORK-AREA. PIC X(2004).

PROCEDURE DIVISION.

EXEC CICS ADDRESS TWA(NAVIGATION-PTR) END-EXEC.
SET ADDRESS OF TRANSACTION-WORK-AREA TO NAVIGATION-PTR.

MOVE TRANSACTION-WORK-AREA
TO SAVE-TWA

The above program name is XXXXXXXX.CICS TRANs ID is - ABCD mapped with above program in the CICS region.
The abend is coming from the MOVE statement above-
CEE3204S The system detected a protection exception (System Completion Code =0C4)

One point I should mention - If I hit the program from CICS region directly by hitting the TRANs id, the code works perfectly but we are getting abend while hitting the same TRANs id from the API that created using zOS connect.
Back to top
View user's profile Send private message
ranajit_online

New User


Joined: 08 Jun 2022
Posts: 8
Location: India

PostPosted: Tue Jul 12, 2022 9:04 pm
Reply with quote

This is resolved.
While zOS connect configuration was made, we had to use "EIB AND MIRROR" option. I was using "EIB ONLY" option and that was causing the issue.

Thank you all.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Jul 13, 2022 12:22 pm
Reply with quote

Thanks for letting us know.

Garry.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Connect Direct 6.3 for Z/OS All Other Mainframe Topics 20
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
Search our Forums:

Back to Top