View previous topic :: View next topic
|
Author |
Message |
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Does the transaction definition have a TWASIZE specified?
Can you show the abend? What is the abend code?
Garry. |
|
Back to top |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Shouldn't TRANSACTION-WORK-AREA be defined in working storage, not LINKAGE section?
Garry. |
|
Back to top |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
Where did you define the FILE-KEYS? In Linkage section or in Working Storage? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
Unfortunately it is still getting the same error
CEE3204S The system detected a protection exception (System Completion Code =0C4) |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
...and, unfortunately, you haven't shown your code - just some individual lines.
Garry. |
|
Back to top |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
ranajit_online
New User
Joined: 08 Jun 2022 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Thanks for letting us know.
Garry. |
|
Back to top |
|
|
|