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
 

 

ASRA ABEND - Protection Exception
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Thu Apr 09, 2009 6:14 pm    Post subject: ASRA ABEND - Protection Exception
Reply with quote

When I am executing the below code, I am getting ASRA abend.

*EXEC CICS ADDRESS
* TWA(ADDRESS OF CARTWA)
* END-EXEC.
Call 'DFHEI1' using by content x'0202800046030000000000000000
- '0000000000000000' by reference ADDRESS OF CARTWA end-call.

* SERVICE RELOAD CARTWA.
*
* USE PASSED TIOABAR TO ADDRESS TIOA.
* (INPUT DATA ALREADY MAPPED BY CAPR00)
*
MOVE CARTWA-TIOA-SAVE TO LCP-WS-ADDR-COMP
SET ADDRESS OF CAXRDCI TO LCP-WS-ADDR-PNTR. -- After executing this line, ASRA -PROTECTION EXCEPTION abend came.
* SERVICE RELOAD CAXRDCI.
MOVE SPACES TO CTLERRO.

Please let me know, how to solve this error?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu Apr 09, 2009 6:26 pm    Post subject:
Reply with quote

Protection exception means you're reading or writing memory that doesn't belong to your transaction. Is this code that's been running in production or new code you're writing? Are you sure there's a TWA defined for your transaction? From the CICS Language Reference manual:
Quote:
TWA(ptr-ref)
returns a pointer reference, set to the address of the transaction work area (TWA). This area is used for passing information between application programs, but only if they are in the same task. If a TWA does not exist, the pointer reference is set to the null value, X'FF000000'.
You need to check that the pointer returned is valid before using it.

Furthermore, if you're giving us code it would be nice if you included the Linkage or Working Storage definitions for the data items referenced in the code as well.
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Thu Apr 09, 2009 7:15 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

In my previous mail, I have mentioned error place wrongly.
please find the below for more details.

*EXEC CICS ADDRESS
* TWA(ADDRESS OF CARTWA)
* END-EXEC.
Call 'DFHEI1' using by content x'0202800046030000000000000000
- '0000000000000000' by reference ADDRESS OF CARTWA end-call.

* SERVICE RELOAD CARTWA.
*
* USE PASSED TIOABAR TO ADDRESS TIOA.
* (INPUT DATA ALREADY MAPPED BY CAPR00)
*
MOVE CARTWA-TIOA-SAVE TO LCP-WS-ADDR-COMP
SET ADDRESS OF CAXRDCI TO LCP-WS-ADDR-PNTR.
* SERVICE RELOAD CAXRDCI.
MOVE SPACES TO CTLERRO. -- After executing this line, ASRA(Protection Exception) abend came

Please help me to resolve this error.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 09, 2009 7:53 pm    Post subject:
Reply with quote

If CARTWA-TIOA-SAVE is in the TWA, then you seem to have a TWA.
If LCP-WS-ADDR-PNTR points to linkage storage that CTLERRO is in, then you have a bad address.
Either look in the TWA CARTWA-TIOA-SAVE or look at LCP-WS-ADDR-COMP and see if it is valid. I'd guess that it is zero.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu Apr 09, 2009 8:15 pm    Post subject:
Reply with quote

What is the definition of CTLERRO and WHERE is it located -- LINKAGE or WORKING-STORAGE?
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Thu Apr 09, 2009 8:25 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

In linkage section
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Thu Apr 09, 2009 8:31 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

CTRERRO Is in linkage section and it is defined in the copybook CAXRCTL.
The copy book is below.
01 CAXRDCI.
02 FILLER PIC X(12).
02 CTLSCRNL COMP PIC S9(4).
02 CTLSCRNF PICTURE X.
02 CTLSCRNI PIC X(2).
02 CTLHEADL COMP PIC S9(4).
02 CTLHEADF PICTURE X.
02 CTLHEADI PIC X(32).
02 CTLPAGEL COMP PIC S9(4).
02 CTLPAGEF PICTURE X.
02 CTLPAGEI PIC X(2).
02 CTLMSGL COMP PIC S9(4).
02 CTLMSGF PICTURE X.
02 CTLMSGI PIC X(60).
02 CTLCERTL COMP PIC S9(4).
02 CTLCERTF PICTURE X.
02 CTLCERTI PIC X(10).
02 CTLEFFDL COMP PIC S9(4).
02 CTLEFFDF PICTURE X.
02 CTLEFFDI PIC X(8).
02 CTLEXPDL COMP PIC S9(4).
02 CTLEXPDF PICTURE X.
02 CTLEXPDI PIC X(8).
02 CTLGRSPL COMP PIC S9(4).
02 CTLGRSPF PICTURE X.
02 CTLGRSPI PIC X(12).
02 CTLNETPL COMP PIC S9(4).
02 CTLNETPF PICTURE X.
02 CTLNETPI PIC X(12).
02 CTLPOLNL COMP PIC S9(4).
02 CTLPOLNF PICTURE X.
02 CTLPOLNI PIC X(20).
02 CTLNAMEL COMP PIC S9(4).
02 CTLNAMEF PICTURE X.
02 CTLNAMEI PIC X(50).
02 CTLERRL COMP PIC S9(4).
02 CTLERRF PICTURE X.
02 CTLERRI PIC X(78).
02 CTLDATL COMP PIC S9(4).
02 CTLDATF PICTURE X.
02 CTLDATI PIC X(50).
02 CTLKL COMP PIC S9(4).
02 CTLKF PICTURE X.
02 CTLKI PIC X(1).
01 CAXRDCO REDEFINES CAXRDCI.
02 FILLER PIC X(12).
02 FILLER PICTURE X(2).
02 CTLSCRNA PICTURE X.
02 CTLSCRNO PIC X(2).
02 FILLER PICTURE X(2).
02 CTLHEADA PICTURE X.
02 CTLHEADO PIC X(32).
02 FILLER PICTURE X(2).
02 CTLPAGEA PICTURE X.
02 CTLPAGEO PIC X(2).
02 FILLER PICTURE X(2).
02 CTLMSGA PICTURE X.
02 CTLMSGO PIC X(60).
02 FILLER PICTURE X(2).
02 CTLCERTA PICTURE X.
02 CTLCERTO PIC X(10).
02 FILLER PICTURE X(2).
02 CTLEFFDA PICTURE X.
02 CTLEFFDO PIC X(8).
02 FILLER PICTURE X(2).
02 CTLEXPDA PICTURE X.
02 CTLEXPDO PIC X(8).
02 FILLER PICTURE X(2).
02 CTLGRSPA PICTURE X.
02 CTLGRSPO PIC X(12).
02 FILLER PICTURE X(2).
02 CTLNETPA PICTURE X.
02 CTLNETPO PIC X(12).
02 FILLER PICTURE X(2).
02 CTLPOLNA PICTURE X.
02 CTLPOLNO PIC X(20).
02 FILLER PICTURE X(2).
02 CTLNAMEA PICTURE X.
02 CTLNAMEO PIC X(50).
02 FILLER PICTURE X(2).
02 CTLERRA PICTURE X.
02 CTLERRO PIC X(78).
02 FILLER PICTURE X(2).
02 CTLDATA PICTURE X.
02 CTLDATO PIC X(50).
02 FILLER PICTURE X(2).
02 CTLKA PICTURE X.
02 CTLKO PIC X(1).

Please let me know, if you need any details
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Thu Apr 09, 2009 8:52 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

The value for LCP-WS-ADDR-COMP is +00000000 and the value for LCP-WS-ADDR-PNTR is X 00000000.

The above variables are defined in below way in program

WORKING-STORAGE SECTION.
77 LCP-WS-ADDR-COMP PIC S9(8) COMP.
77 LCP-WS-ADDR-PNTR REDEFINES LCP-WS-ADDR-COMP

USAGE POINTER.

Please let me know, how to solve this?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu Apr 09, 2009 8:57 pm    Post subject:
Reply with quote

1. You still haven't provided any proof that you actually have a TWA with this transaction; If the TWA address returned is FF000000 then you would get a protection exception upon any reference to the TWA fields.

2. Is this an existing production program you are changing or are you writing a new program?

3. Can you do a CEDC on the transaction ID and post the results to show how much TWA is defined? You may have to get your CICS support group to issue the transaction if you don't have access.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Apr 09, 2009 11:05 pm    Post subject:
Reply with quote

This looks like old CICS Macro level code.

Robert is correct, could be you don't have TWA properly established.

Check with your CICS Tech support to help resolve this.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 09, 2009 11:30 pm    Post subject: Re: Reply to: ASRA ABEND - Protection Exception
Reply with quote

Sangeetha Chelliah wrote:
MOVE CARTWA-TIOA-SAVE TO LCP-WS-ADDR-COMP
SET ADDRESS OF CAXRDCI TO LCP-WS-ADDR-PNTR.
* SERVICE RELOAD CAXRDCI.
MOVE SPACES TO CTLERRO. -- After executing this line, ASRA(Protection Exception) abend came
If the OP is correct, the TWA does have valid addressability.
Quote:
* USE PASSED TIOABAR TO ADDRESS TIOA.
* (INPUT DATA ALREADY MAPPED BY CAPR00)
This seems odd, expecting a passed TIOA to still be available during the next transaction?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Thu Apr 09, 2009 11:51 pm    Post subject:
Reply with quote

Quote:
The value for LCP-WS-ADDR-COMP is +00000000 and the value for LCP-WS-ADDR-PNTR is X 00000000.
seems to conflict with
Quote:
If the OP is correct, the TWA does have valid addressability.
Although if the address is all zeroes, that does explain the protection exception rather nicely.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 10, 2009 12:05 am    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

Using CECI, issue -

Code:

INQUIRE TRANSACTION ('XXXX')

Please substitute XXXX with the target transaction-id. icon_wink.gif

One of the parameters returned will be TWASIZE (as a binary fullword), so please post this value. If the value is all zeros, then the PCT entry for this transaction needs to be updated to reflect that a TWA exists. But also, if the TWASIZE value is less than the length of the LINKAGE SECTION 01 area and you're attempting to address beyond the the TWA length/size, then a S0C4 will be raised, due to non-addressability.

Regards,
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Apr 10, 2009 12:16 am    Post subject:
Reply with quote

Robert Sample wrote:
seems to conflict with
Not when you notice that the MOVE CARTWA-TIOA-SAVE TO LCP-WS-ADDR-COMP was moving from the TWA to working storage.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Fri Apr 10, 2009 2:04 am    Post subject:
Reply with quote

I'm with Earl; definitely looks like a Macro level program. Yuck! Everyone I know of, including me, had trouble establishing addressability in those days. I'd suggest rewriting that dude in Command Level COBOL if at all possible.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Apr 10, 2009 3:18 am    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

Earl/Terry,

In his code example, he's using the ADDRESS OF syntax, which was first introduced with COBOL2.

COBOL2 did not support CICS Macro level and the last version/release to support Macro for HLL's was CICS/MVS 2.1.2. As far as COBOL, OS/VS COBOL was the last version to support CICS Macro level.

CICS/ESA 3.1.1 was the last version/release to support CICS Macro for Assembler.

When CICS/ESA 3.2.1 was introduced, Macro support in any previously supported language had gone bye-bye.

Regards,
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Fri Apr 10, 2009 5:37 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

Hai,

My tech support changed the compiler for osvs program from CICSCMCB to CICSCLE. So they did some code changes using some tool in this program.

While i am testing the new code, i am getting ASRA Abend. Here i gave the old code and new code.

Old code:

Code:
WORKING-STORAGE SECTION.                                     
                                                             
77  DATE-SWITCH                     PIC 9           VALUE 0. 
    88  INVALID-DATE                    VALUE 1.             
 LINKAGE SECTION.                                         
                                                         
 01  BLLCELLS.                                           
     05  FILLER                      PIC S9(8)       COMP.
     05  CARTWA-PTR                  PIC S9(8)       COMP.
     05  TIOA-PTR                    PIC S9(8)       COMP.
     05  CARTSIOA-PTR                PIC S9(8)       COMP.
     05  NCMULTNM-PTR                PIC S9(8)       COMP.
     05  PRINT-PTR                   PIC S9(8)       COMP.
 01  CARTWA      COPY CARTWA. 
                               
 01  CAXRDCI     COPY CAXRCTL.
                               
 01  CARTSIOA    COPY CARTSIOA.
                               
 01  NCMULTNM    COPY NCMULTNM.

 PROCEDURE DIVISION.
 010-START.                                       
     SERVICE RELOAD BLLCELLS.                     
*                                                 
*        ADDRESS PREMIUM REG SYSTEM COMMON TWA   
*        AND TWA DATA PASSED BY CAPR00.           
*                                                 
     EXEC CICS ADDRESS                           
         TWA(CARTWA-PTR)                         
         END-EXEC.                               
     SERVICE RELOAD CARTWA.                       
*                                                 
*        USE PASSED TIOABAR TO ADDRESS TIOA.     
*        (INPUT DATA ALREADY MAPPED BY CAPR00)   
*                                                 
     MOVE CARTWA-TIOA-SAVE TO TIOA-PTR.           
     SERVICE RELOAD CAXRDCI.                     
     MOVE SPACES TO CTLERRO.       


Newcode
Code:
 WORKING-STORAGE SECTION.                                     
 77  LCP-WS-ADDR-COMP              PIC S9(8) COMP.             
 77  LCP-WS-ADDR-PNTR              REDEFINES LCP-WS-ADDR-COMP 
                                   USAGE POINTER.             
 LINKAGE SECTION.                                         
                                                         
*01  BLLCELLS.                                           
*    05  FILLER                      PIC S9(8)       COMP.
*    05  CARTWA-PTR                  PIC S9(8)       COMP.
*    05  TIOA-PTR                    PIC S9(8)       COMP.
*    05  CARTSIOA-PTR                PIC S9(8)       COMP.
*    05  NCMULTNM-PTR                PIC S9(8)       COMP.
*    05  PRINT-PTR                   PIC S9(8)       COMP.

     COPY CARTWA.           
*01  CARTWA-I    PIC X(168).
*          COPY CARTWA.     
                             
     COPY CAXRCTL.           
*01  CAXRDCI-I   PIC X(248).
*          COPY CAXRCTL.     

     COPY CARTSIOA.           
*01  CARTSIOA-I  PIC X(1184).
*          COPY CARTSIOA.     
                             
     COPY NCMULTNM.           
*01  NCMULTNM-I  PIC X(89).   
*          COPY NCMULTNM.     

 PROCEDURE DIVISION.                             
                                                 
 010-START.                                     
*                                               
*        ADDRESS PREMIUM REG SYSTEM COMMON TWA   
*        AND TWA DATA PASSED BY CAPR00.         
*                                               
     EXEC CICS ADDRESS                           
         TWA(ADDRESS OF CARTWA)                 
         END-EXEC.                               
*    SERVICE RELOAD CARTWA.                     
*                                               
*        USE PASSED TIOABAR TO ADDRESS TIOA.     
*        (INPUT DATA ALREADY MAPPED BY CAPR00)   
*                                               
     MOVE CARTWA-TIOA-SAVE TO LCP-WS-ADDR-COMP   
     SET ADDRESS OF CAXRDCO TO LCP-WS-ADDR-PNTR.
*    SERVICE RELOAD CAXRDCI.                     
     MOVE SPACES TO CTLERRO.   -- here I am getting error

I have checked the TWASIZE value using CECI command. The TWASIZE value is +0000003632.
I guess, this program is not receiving the address properly.

CEDC command has Display, Expand and View option. I dont know which option i have to use.

Please let me know your suggestions on this.

Thanks
Sangeetha Chelliah



[/u][/b]
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Fri Apr 10, 2009 6:12 pm    Post subject:
Reply with quote

The CEDC command would be View -- V GR(*) TRANS(????) for example; If more than one come up put a V on the line to look at (where the cursor is).

As far as the code goes, oy vey. Addressing the TWA is fine, but where did the data get into the TWA from? How do you know that the CARTWA-TIOA-SAVE field actually contains an address? If it contained an address (and the fact that an earlier post has zeroes for the field points to the likelihood that it does not), the code would be okay. Since you're getting a protection exception, I would either (a) GETMAIN storage for the CAXRDCI-I data structure, or (b) move the 01 level to WORKING-STORAGE instead of LINKAGE section.

The thing about LINKAGE SECTION data fields is that they are defined by other programs and passed to this program; there is no storage allocated in this program for these structures. It's real easy to get a protection exception when referencing memory that doesn't exist, and you're relying upon other programs to ensure the memory does exist.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Apr 11, 2009 12:25 am    Post subject:
Reply with quote

Sangeetha,

Have you discussed this with your CICS Tech. Support people ?
Back to top
View user's profile Send private message
Sangeetha Chelliah

New User


Joined: 03 Oct 2008
Posts: 9
Location: chennai

PostPosted: Mon Apr 13, 2009 7:01 pm    Post subject: Reply to: ASRA ABEND - Protection Exception
Reply with quote

Hai,

The address is passing correctly in the calling program of this program.

I am not sure how to solve this error? Please help me to solve this error.

Thanks,
Sangeetha chelliah.
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm


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