Discussion:
LE Recovery
Add Reply
scott Ford
2017-12-04 22:27:31 UTC
Reply
Permalink
Raw Message
All:

I have a STC in LE Cobol -- and want to be able to take action if an
operator enters
'C stcname' from the console.

I dont think i can use a condition handler to do this, please correct me if
I am wrong.
But I had a thought..

If i had a main line in assembler and set a ESTAE before calling a Cobol
main routine,
could i intercept the 'C stcname' and be able to recovery ? I have data
sitting in a array and its critical, but have a customer who want to be
able to take down a very active SECURITY admin type STC in 5 mins.. I am
exploring what I can do ...


Regards,
Thanks in advance
--
*IDMWORKS *

Scott Ford

z/OS Dev.




“By elevating a friend or Collegue you elevate yourself, by demeaning a
friend or collegue you demean yourself”



www.idmworks.com

***@idmworks.com

Blog: www.idmworks.com/blog





*The information contained in this email message and any attachment may be
privileged, confidential, proprietary or otherwise protected from
disclosure. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution, copying or
use of this message and any attachment is strictly prohibited. If you have
received this message in error, please notify us immediately by replying to
the message and permanently delete it from your computer and destroy any
printout thereof.*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2017-12-04 23:05:30 UTC
Reply
Permalink
Raw Message
Yes you can. You can set your own ESTAE and get control on a CANCEL (or any other ABEND -- set TRAP(NOSPIE) if you want S0Cx ABENDs also). You can percolate if you want LE's handler to get control (no idea how that works in COBOL). CANCEL is "unrecoverable." Whatever cleanup you want to do, you will have to do in your ESTAE exit. There is no "returning" to the COBOL. Several other ABENDs (most of the x22 family?) are unrecoverable. There is a bit in the SDWA that tells you this.

Can you clean up the array from assembler, from the exit?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of scott Ford
Sent: Monday, December 4, 2017 2:29 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: LE Recovery

All:

I have a STC in LE Cobol -- and want to be able to take action if an operator enters 'C stcname' from the console.

I dont think i can use a condition handler to do this, please correct me if I am wrong.
But I had a thought..

If i had a main line in assembler and set a ESTAE before calling a Cobol main routine, could i intercept the 'C stcname' and be able to recovery ? I have data sitting in a array and its critical, but have a customer who want to be able to take down a very active SECURITY admin type STC in 5 mins.. I am exploring what I can do ...


Regards,
Thanks in advance
--
*IDMWORKS *

Scott Ford

z/OS Dev.




“By elevating a friend or Collegue you elevate yourself, by demeaning a friend or collegue you demean yourself”



www.idmworks.com

***@idmworks.com

Blog: www.idmworks.com/blog





*The information contained in this email message and any attachment may be privileged, confidential, proprietary or otherwise protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof.*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
John McKown
2017-12-04 23:19:07 UTC
Reply
Permalink
Raw Message
Post by scott Ford
I have a STC in LE Cobol -- and want to be able to take action if an
operator enters
'C stcname' from the console.
I dont think i can use a condition handler to do this, please correct me if
I am wrong.
But I had a thought..
If i had a main line in assembler and set a ESTAE before calling a Cobol
main routine,
could i intercept the 'C stcname' and be able to recovery ? I have data
sitting in a array and its critical, but have a customer who want to be
able to take down a very active SECURITY admin type STC in 5 mins.. I am
exploring what I can do ...
You can use the TERM=YES parameter on the ESTAEX macro.

[quote from
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieaa700/iea3a7_Description17.htm
]

TERM=YESSpecifies that the recovery routine associated with the ESTAE
request will be scheduled (YES) or will not be scheduled (NO), in addition
to normal ESTAE processing, in the following situations:

- System-initiated logoff
- Job step timer expiration
- Wait time limit for job step exceeded
- DETACH macro without the STAE=YES parameter issued from a higher-level
task (possibly by the system if the higher-level task encountered an error)
- Operator cancel
- Error on a higher level task
- Error in the job step task when a non-job step task issued the ABEND
macro with the STEP parameter.
- z/OS UNIX System Services is canceled and the user's task is in a wait
in the z/OS UNIX System Services kernel.

When the recovery routine is entered because of one of the preceding
reasons, retry will not be permitted. If a dump is requested at the time
the ABEND macro is issued, it is taken prior to entry into the recovery
routines.
Note: If DETACH was issued with the STAE parameter, the following will
occur for the task to be detached:

- All ESTAE recovery routines will be entered.
- The most recently activated STAE recovery routine will be entered.
- All STAI/ESTAI recovery routines will be entered unless return code 16
is returned from one of the STAI recovery routines.

In these cases, entry to the recovery routine is prior to dumping and retry
will not be permitted.

[quote]​


​However, I don't know if you can do I/O while in the ESTAEX exit code.
Then there is the problem of how to access the data in the "array" in your
HLASM code in order to write it out. In addition, I am not sure how this
would interact with the normal LE ESTAEX processing. It might be necessary
to run your COBOL program via an ATTACHX instead of a LINKX. I'm really
unsure.​ For a CANCEL, I don't think that the LE ESTAEX routine will get
control so the "array" should still be around, but finding it ... . But
there does not seem any way to get back into your COBOL code to write out
any data and CLOSE your FDs.
Post by scott Ford
Regards,
Thanks in advance
--
*IDMWORKS *
Scott Ford
z/OS Dev.
“By elevating a friend or Collegue you elevate yourself, by demeaning a
friend or collegue you demean yourself”
www.idmworks.com
Blog: www.idmworks.com/blog
*The information contained in this email message and any attachment may be
privileged, confidential, proprietary or otherwise protected from
disclosure. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution, copying or
use of this message and any attachment is strictly prohibited. If you have
received this message in error, please notify us immediately by replying to
the message and permanently delete it from your computer and destroy any
printout thereof.*
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2017-12-04 23:58:46 UTC
Reply
Permalink
Raw Message
Post by John McKown
However, I don't know if you can do I/O while in the ESTAEX exit code.
I do. <g> You can and I do.

And looking, yes I use TERM=YES.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of John McKown
Sent: Monday, December 4, 2017 3:20 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: LE Recovery
Post by John McKown
I have a STC in LE Cobol -- and want to be able to take action if an
operator enters 'C stcname' from the console.
I dont think i can use a condition handler to do this, please correct
me if I am wrong.
But I had a thought..
If i had a main line in assembler and set a ESTAE before calling a
Cobol main routine, could i intercept the 'C stcname' and be able to
recovery ? I have data sitting in a array and its critical, but have a
customer who want to be able to take down a very active SECURITY admin
type STC in 5 mins.. I am exploring what I can do ...
You can use the TERM=YES parameter on the ESTAEX macro.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Tom Marchant
2017-12-05 12:46:13 UTC
Reply
Permalink
Raw Message
Post by scott Ford
If i had a main line in assembler and set a ESTAE before calling a Cobol
main routine,
could i intercept the 'C stcname' and be able to recovery ?
I'm not sure. Having set your ESTAE(X), then calling your Cobol main
routine, I'm pretty sure LE would establish its own ESTAE(X), which
would receive control first. Will it percolate to you in all the cases
you are interested in? If I wanted to do something like this, I would
establish the LE environment before setting your ESTAE(X).
--
Tom Marchant

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
John McKown
2017-12-05 13:56:13 UTC
Reply
Permalink
Raw Message
On Tue, Dec 5, 2017 at 6:47 AM, Tom Marchant <
Post by Tom Marchant
Post by scott Ford
If i had a main line in assembler and set a ESTAE before calling a Cobol
main routine,
could i intercept the 'C stcname' and be able to recovery ?
I'm not sure. Having set your ESTAE(X), then calling your Cobol main
routine, I'm pretty sure LE would establish its own ESTAE(X), which
would receive control first. Will it percolate to you in all the cases
you are interested in? If I wanted to do something like this, I would
establish the LE environment before setting your ESTAE(X).
​I was wondering about that. But then I thought that if I have an ESTAEX
with a TERM=YES specified. And I then LINK to an LE main program, which
issues an ESTAE(X) with TERM=NO, will the second ESTAEX exit be invoked for
a CANCEL command (shouldn't because TERM=NO) or will my ESTAEX exit be
invoked because it does have TERM=YES. I suppose that if I were really
interested, I could test that myself. And I may later.​
Post by Tom Marchant
--
Tom Marchant
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2017-12-05 17:01:36 UTC
Reply
Permalink
Raw Message
I call out to assembler and establish the ESTAE after LE initialization -- in my application code, in other words.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of Tom Marchant
Sent: Tuesday, December 5, 2017 4:47 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: LE Recovery
Post by scott Ford
If i had a main line in assembler and set a ESTAE before calling a
Cobol main routine, could i intercept the 'C stcname' and be able to
recovery ?
I'm not sure. Having set your ESTAE(X), then calling your Cobol main routine, I'm pretty sure LE would establish its own ESTAE(X), which would receive control first. Will it percolate to you in all the cases you are interested in? If I wanted to do something like this, I would establish the LE environment before setting your ESTAE(X).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
scott Ford
2017-12-05 17:05:41 UTC
Reply
Permalink
Raw Message
Charles:

You have a LE Assembler driver who establishes the ESTAE and then comes
back to the main code ??

Scott
Post by Charles Mills
I call out to assembler and establish the ESTAE after LE initialization --
in my application code, in other words.
Charles
-----Original Message-----
Behalf Of Tom Marchant
Sent: Tuesday, December 5, 2017 4:47 AM
Subject: Re: LE Recovery
Post by scott Ford
If i had a main line in assembler and set a ESTAE before calling a
Cobol main routine, could i intercept the 'C stcname' and be able to
recovery ?
I'm not sure. Having set your ESTAE(X), then calling your Cobol main
routine, I'm pretty sure LE would establish its own ESTAE(X), which would
receive control first. Will it percolate to you in all the cases you are
interested in? If I wanted to do something like this, I would establish the
LE environment before setting your ESTAE(X).
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
*IDMWORKS *

Scott Ford

z/OS Dev.




“By elevating a friend or Collegue you elevate yourself, by demeaning a
friend or collegue you demean yourself”



www.idmworks.com

***@idmworks.com

Blog: www.idmworks.com/blog





*The information contained in this email message and any attachment may be
privileged, confidential, proprietary or otherwise protected from
disclosure. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, distribution, copying or
use of this message and any attachment is strictly prohibited. If you have
received this message in error, please notify us immediately by replying to
the message and permanently delete it from your computer and destroy any
printout thereof.*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2017-12-05 17:15:42 UTC
Reply
Permalink
Raw Message
Yep. Exactly.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On Behalf Of scott Ford
Sent: Tuesday, December 5, 2017 9:07 AM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: LE Recovery

Charles:

You have a LE Assembler driver who establishes the ESTAE and then comes back to the main code ??

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Peter Hunkeler
2017-12-06 07:05:32 UTC
Reply
Permalink
Raw Message
Post by Charles Mills
I call out to assembler and establish the ESTAE after LE initialization -- in my application code, in other words.
From the LE Programming Guide, topic "System Services available to assembler routines":
"The system-provided service should not be used. If you use this service, itdirectly interferes with the Language Environment environment. For example, any ESTAE or ESPIE that you issue interferes with Language Environment condition handling."


The interference may result in LE unregistering — what it considers to be its own — current ESTAE routine as result of some error handling invoked via LE's ESPIE routine. But the current ESTAE routine is in fact the one you established after LE's initialization. So your ESTAE routine may not get control in certain (program check) cases.


You may think that you then better establish your own ESPIE routine as well, thereby disabling LE's ESPIE routine, so the case describe above cannot occur. That is true, however, modern COBOL compilers (i.e. V5 and up) may generate code that may raise 00A program checks when you would not expect them. LE's ESPIE routine handles them efficiently. Without LE's ESPIE routine, this may become a performance nightmare.


I've learned all this from the analyzing and finally solving problem we've been facing with RAI's Smart/Restart earlier this year. Search the archive for "Smart/Reestart", or "00A program check", or "S0CA", if you're interested in the whole story.
--
Peter Hunkeler

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Loading...