On Mon, Dec 4, 2017 at 4:28 PM, scott Ford <[email protected]> wrote:
> 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 ... > 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. > > 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 > > [email protected] > > 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 [email protected] with the message: INFO IBM-MAIN > -- 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 [email protected] with the message: INFO IBM-MAIN
