× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This works fine for me:

        char error_module[64];
        char error_text[512];
        Qus_EC_t   err_code;
        char       msg_key [4];
        char       *msg_dta;
...
...
        msg_dta = (char*) malloc((strlen(error_module) +
                                      strlen(error_text) + 1)
                                      *sizeof(char));
        strcpy(msg_dta, error_module);
        strcat(msg_dta, error_text);

        /* Send escape message */
        err_code.Bytes_Provided = 32;
        QMHSNDPM (
           "CPF9898",                /* message id                  */
           "QCPFMSG   *LIBL     ",   /* Qualified message file name */
           msg_dta,                  /* Message data                */
           strlen(msg_dta),          /* Length of message data      */
           "*ESCAPE   ",             /* Message type                */
           "*PGMBDY   ",             /* Call stack entry            */
           1,                        /* Call stack counter          */
           msg_key,                  /* Message key                 */
           &err_code                 /* Error code                  */
 
----- Original Message ----- 
From: "Chris Wolcott" <CWolcott@xxxxxxxxxxxxxxxxxxxxxx>
To: <c400-l@xxxxxxxxxxxx>
Sent: Wednesday, October 06, 2004 11:49 PM
Subject: [C400-L] Sending an *ESCAPE msg via QMHSNDPM


> 
> I have a C program that needs to send an *ESCAPE msg.  In QMHSNDPM I
> coded the stack to '*' and '*prv' and stack counter to various values,
> but the program keeps getting the unhandled exception message on the
> *ESCAPE it just sent.  Our group's working hypothesis is the C program
> is getting notified because QMHSNDPM is called from it, and it is the
> next up the stack.  
> 
> Does this sound correct?  If so, what values do I need to get the
> *ESCAPE msg back to the program's caller?
> 
> Thanks! 
> 
> _______________________________________________
> This is the C programming iSeries / AS400 (C400-L) mailing list
> To post a message email: C400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/c400-l
> or email: C400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/c400-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.