All good questions. How it did not work was that none of my printf
statements were generated, and the S0D6 occurred anyway.

I know the CEEHDLR is registering my routine because I was getting a message
256, meaning it was already registered, and was being re-registered.

I'm thinking an ESTAE might work. I would have to restrict it to returning
to a spot within the assembler code doing the PC instruction, but that's all
I really need.

The code is:

void handler(_FEEDBACK *fc, _INT4 *token,    
             _INT4 *result, _FEEDBACK *newfc)
{                                            
  printf("tok_sev  =%d\n", fc->tok_sev);     
  printf("tok_msgno=%d\n", fc->tok_msgno);   
  printf("tok_case =%d\n", fc->tok_case);    
  printf("tok_sever=%d\n", fc->tok_sever);   
  printf("tok_ctrl =%d\n", fc->tok_ctrl);    
//printf("tok_facid=%3.3s", fc->facid);      
//printf("tok_isi  =%d\n", fc->isi);         
  *result = 10;                              
}                                            

<...unrelated code...>

int server_read(int handle, int block_number, void*dest_buffer)      
{                                                                    
                                                                     
   _FEEDBACK fc;                                                     
   _ENTRY    routine;                                                
   _INT4     token;                                                  
                                                                     
   token = 99;                                                       
                                                                     
   routine.address = (_POINTER)&handler;                             
   routine.nesting = NULL;                                           
   CEEHDLR(&routine, &token, &fc);                                   
   if( _FBCHECK(fc, CEE000 ) != 0 &&                                 
       _FBCHECK(fc, CEE080 ) != 0)                                   
   {                                                                 
     printf("CEEHDLR failed with message number %d\n", fc.tok_msgno);
     exit(2999);                                                     
   };                                                                
                                                                     
   char workareaÝ256¨;                                                  
   long ecb = 0;                                       
   int ascb = *(int*)0x224;                            
   int rc = 0;                                         
   DEBUG2("2/Our ECB=%p ASCB=%p\n", &ecb, (void*)ascb);
   do                                                  
   {                                                   
       rc=CallPC(data.lx_value,                        
                 1, handle, block_number, dest_buffer, 
                 data.data, workarea, &ecb, ascb);     
   }                                                   
   while(rc != 1126);                                  
   return rc;                                          
}                                                      

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Steve Comstock
Sent: Monday, January 07, 2008 8:51 AM
To: [email protected]
Subject: Re: C++ recovery from (an otherwise) system abend

David Logan wrote:
> I have now tried CEEHDLR, and this does not appear to work. On to
> researching USRHDL.
> 
> David Logan

Hmmm. "Does not appear to work" isn't much information.
If you are interested in pursuing the condition handler
train of thought, perhpas you could post more details:

How did you invoke CEEHDLR? What routine did you register?
What does that routine look like? How do you know it didn't
work?

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

   z/OS Application development made easier
     * Our classes include
        + How things work
        + Programming examples with realistic applications
        + Starter / skeleton code
        + Complete working programs
        + Useful utilities and subroutines
        + Tips and techniques

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to