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

Getting offset from PSW instruction address


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

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Mon Sep 19, 2011 5:46 pm
Reply with quote

I am trying to get ASRAPSW in a CICS program and translate it to offset of the instruction. How can a real storage address be translated into offset which can be referred in compile listing of the program?

This I require because in my shop the abend dump is supressed and some logs are generated programatically which are not very helpful in solving the abend. So I am thinking to add the ASRAPSW (translated to offset) in that log. Please suggest.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Sep 20, 2011 6:43 am
Reply with quote

If using Cobol, check whether PROCEDURE-POINTER is any use to you. If you know the abending program name, or all the program names.

This would enable you to obtain the entry-point address of the module (or all the modules). That would give you the thing to subtract from your PSW to get the offset.

If you need to display/print in HEX, look at the Junk Buster in the Cobol forum :-)
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Sep 20, 2011 6:48 pm
Reply with quote

This should help.
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Thu Sep 29, 2011 5:01 pm
Reply with quote

I tried using procedure pointer to get the entry point but it is not working. Instead I am getting some wiered behaviour by the CICS program.

Can I invoke CECI INQ via COBOL program? If so, I can get the entry-point with this command.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Thu Sep 29, 2011 5:14 pm
Reply with quote

I Googled exact phrase "debugging an asra in cics cobol" and got many hits.

Here's one of them -

cics.ufl.edu/trandump.html

Mr. Bill
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Sep 30, 2011 5:23 am
Reply with quote

mlp,

Have a look at this. The comments by Mr Bill are most pertinent.

I did say "check" :-)

When I checked, it didn't take long to get to the above.

I don't know if Bill's suggestion there is useful to you. Check :-)

Just to refresh:

Due to the dictates of the management you are not allowed to produce a dump of an abend in CICS (maybe they thought they could stop program failures if they prevented the dump being produced? :-) )

To assist in the debugging-a-CICS-abend-without-a-dump, there is already some information on a "log".

You would like to enhance this meagre information by including the "offset" in the abending program by making a calculation with the PSW.

Thus you need the address of the entry-point of the abending program.

You have the PSW already, or not?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Sep 30, 2011 6:55 am
Reply with quote

mlp,

Check with your System's personnel and determine whether you (or they) can set the max-threshold at a particular TRANDUMPCODE (TRD) level, such as ASRA, via CEMT.

Also, discuss the possibility with them to issue a series of CEMT SET TRANDUMPCODE commands (amongst others) via a Sequential Terminal Table (STT) as part of the Startup deck after CICS has been successfully brought up ('Control given to CICS').

Another method is to create and implement a 3rd-Stage PLT-PI program, which issues the SET TRANDUMPCODE 'System Programmer' API's. This can be written in a HLL, such as COBOL or PL/I.

There is also a SIT parm which needs to be reviewed, named TRDUMAX.

The IBM default (which is astonishing) is 999, which means unlimited.

Mr. Bill
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 30, 2011 10:12 am
Reply with quote

Hello,

Quote:
maybe they thought they could stop program failures if they prevented the dump being produced?
Or the code is of such poor quality that there many, many things that would cause a dump.

Rather than fix the code, just turn off the dumps to keep from using so much extra resource. . .

I've been several places where rather than change code, they get rid of or change data that causes problems rather than changing the code so that it will not fail due data content.
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 Routing command Address SDSF to other... TSO/ISPF 2
No new posts PL/1 Callback address logic in z/OS C... PL/I & Assembler 1
No new posts Access an specific memory address exp... COBOL Programming 1
No new posts Printing a dataset in DUMP format wit... ABENDS & Debugging 2
This topic is locked: you cannot edit posts or make replies. Assembler - Packed Decimals - PACK in... PL/I & Assembler 3
Search our Forums:

Back to Top