Those pointer indirection hacks don't look right to me. Make sure the LE routines are defined to use OS linkage.

#pragma linkage(CEE3SRP,OS)
int CEE3SRP(...)


On 25/02/2015 3:21 AM, Janet Graff wrote:
thank Charles.  I have various other LE calls working but I was off an 
addressing level of the parameters to CEE3SRP and CEEMRCE and a C example would 
have helped tremendously.

I'm pretty sure I have it with:

/* my structure that I want to pass back and forth between main line and abend 
handler */
  struct tokenStruct
  {
     int    handled;
     _INT4  resumePoint;

  };
void badHandler(_FEEDBACK *cond,
                 _INT4 *input_token,
                 _INT4 *result,
                 _FEEDBACK *new_cond)
{
    _FEEDBACK fc;
    ...
    struct tokenStruct **tokenStructPtr =
        (struct tokenStruct **)input_token;
    struct tokenStruct *tokenStruct = *input_token;
/* logic to decide whether to RESUME or not */
    *result = 10;            /* 10 = RESUME right after CEE3SRP call */
    tokenStruct->handled = tokenStruct->handled + 1;
     CEEMRCE(&(tokenStruct->resumePoint), &fc);
}

int main()
{
    _FEEDBACK feedback;
    struct tokenStruct myTokenStruct;
    struct tokenStruct *tokenPtr = &myTokenStruct;
    tokenPtr = &myTokenStruct;
    _ENTRY pgmptr;

    pgmptr.address = (_POINTER)&badHandler;
    pgmptr.nesting = NULL;

    tokenPtr->handled = 0;
    CEE3SRP(&(tokenPtr->resumePoint), &feedback);
    CEEHDLR(&pgmptr, &tokenPtr, &feedback);
    if (tokenPtr->handled > 0)
    {
        /* code to handle abend and get this program moving on it's way */
    }
    /* execute code that abends here */
    CEEHDLU(&pgmptr, &feedback);
    return 0;
}

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to