× 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.


  • Subject: Re: object lock on user message queue
  • From: Rob Berendt <rob@xxxxxxxxx>
  • Date: Fri, 17 Sep 1999 13:42:22 -0500

/* Group Dekko Services, LLC                                        */
/* ALL RIGHTS RESERVED.                                             */
/*                                                                  */
/* This program will reroute messages to someone email account.     */
/*                                                                  */
/*                                                                  */
/* Modification log:                                                */
/* 05/07/98 by R.Berendt, CDP   GDS,LLC                             */
/*          Created                                                 */
/* 06/22/98 by R.Berendt, CDP   GDS,LLC                             */
/*          Chris Edwards' doesn't want SNADSCHK messages.          */
/*                                                                  */
/*                                                                  */
PGM (                                                                +
      &MSGQ            /* Name of message queue to monitor        */ +
      &EMAILADR        /* SMTP EMail address.                     */ +
      &DOMAIN          /* Must be in WRKDIRE                      */ +
    )

    DCL  &DESC        *CHAR  44  /* Description of message           */
    DCL  &DOMAIN      *CHAR  30  /* Must be in WRKDIRE               */
    DCL  &EMAILADR    *CHAR  30  /* SMTP EMail address.              */
    DCL  &MSGID       *CHAR   7  /* Message number                   */
    DCL  &MSGLEN      *DEC    5  /* Length of message text           */
    DCL  &MSGQ        *CHAR  20  /* Message queue and lib to monitor */
    DCL  &MSGQLIB     *CHAR  10  /* Library of message queue to mon  */
    DCL  &MSGQNAME    *CHAR  10  /* Name of message queue to monitor */
    DCL  &MSGSEV      *DEC    2  /*                                  */
    DCL  &MSGTXT      *CHAR 256  /* Message text                     */
    DCL  &SCANSTRING  *CHAR   8  /* Scan for SNADSCHK                */
    DCL  &SYSNAME     *CHAR   8  /* Name of this system              */
    DCL  &USRPRF      *CHAR  10  /* User profile running job         */
    DCL  &X           *DEC    3  /* Counting variable                */

    /*                                                                         +
     | Retrive user profile of who is running this job.                        +
    */
             RTVJOBA    USER(&USRPRF)

    /*                                                                         +
     | Parse message queue to monitor into object and library.                 +
    */
             CHGVAR     VAR(&MSGQNAME) VALUE(%SST(&MSGQ 1 10))
             CHGVAR     VAR(&MSGQLIB)  VALUE(%SST(&MSGQ 11 10))

    /*                                                                         +
     | If the &MSGQNAME is *USRPRF then retrieve the user profile of the job   +
    */
             IF         COND(&MSGQNAME = '*USRPRF') THEN(CHGVAR +
                          VAR(&MSGQNAME) VALUE(&USRPRF))

    /*                                                                         +
     | If the &EMAILADR is *MSGQ then use the name of the message queue for    +
     | the email address.                                                      +
    */
             IF         COND(&EMAILADR = '*MSGQ') THEN(CHGVAR +
                          VAR(&EMAILADR) VALUE(&MSGQNAME))

    /*                                                                         +
     | Check validity of domain.                                               +
    */
             DLTF       FILE(QTEMP/XYZTEMP)
             MONMSG     MSGID(CPF0000)
             DSPDIRE    USRID(*ANY &DOMAIN) OUTPUT(*OUTFILE) +
                          OUTFILE(QTEMP/XYZTEMP)
             MONMSG     MSGID(CPF9006) CMPDTA(*NONE) EXEC(DO)
             CHGVAR     VAR(&MSGTXT) VALUE(&DOMAIN *BCAT 'is an +
                          invalid domain.  It is not in the WRKDIRE +
                          with a *ANY entry.')
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGTXT) +
                          MSGTYPE(*ESCAPE)
             GOTO       CMDLBL(END)
             ENDDO

    /*                                                                         +
     | Create generic message description.                                     +
    */
             RTVNETA    SYSNAME(&SYSNAME)
             CHGVAR     VAR(&DESC) VALUE(&SYSNAME *TCAT ':  ' *CAT +
                          &MSGQNAME *BCAT 'in' *BCAT &MSGQLIB)

 LOOP:
    /*                                                                         +
     | Receive the first new message that comes into message queue             +
     | Wait as long as necessary to receive the message.                       +
    */
             RCVMSG     MSGQ(&MSGQLIB/&MSGQNAME) WAIT(*MAX) RMV(*NO) +
                          MSG(&MSGTXT) MSGLEN(&MSGLEN) +
                          MSGID(&MSGID) SEV(&MSGSEV)
             MONMSG     MSGID(CPF0000) EXEC(DO)
             CHGVAR     VAR(&MSGTXT) VALUE('Unable to monitor' *BCAT +
                          &MSGQLIB *TCAT '/' *TCAT &MSGQNAME *BCAT +
                          'on' *BCAT &SYSNAME)
             SNDPGMMSG  MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&MSGTXT) +
                          MSGTYPE(*ESCAPE)
             GOTO       CMDLBL(END)
             ENDDO

    /*                                                                         +
     | If the message is greater than the maximum SNDDST supports, 256,        +
     | then put '...' at the end of the message.                               +
    */
             IF         COND(&MSGLEN > 256) THEN(DO)
             CHGVAR     VAR(%SST(&MSGTXT 254 3)) VALUE('...')
             ENDDO

    /*                                                                         +
     | Chris Edwards doesn't want SNADSCHK messages.                           +
    */
             IF         COND(&USRPRF = 'CHRIS') THEN(DO)
             CHGVAR     VAR(&X) VALUE(1)
 SCAN:       IF         COND(%SST(&MSGTXT &X 8) *EQ 'SNADSCHK') +
                          THEN(GOTO CMDLBL(LOOP))
             CHGVAR     VAR(&X) VALUE(&X + 1)
             IF         COND(&X < 100) THEN(GOTO CMDLBL(SCAN))
             ENDDO      /* CHRIS */

    /*                                                                         +
     | Send the message.                                                       +
    */
             SNDDST     TYPE(*MSG) TOUSRID((&EMAILADR &DOMAIN)) +
                          DSTD(&DESC) MSG(&MSGTXT)

   GOTO  LOOP

END:

             ENDPGM






dbale@genfast.com on 09/17/99 01:30:53 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:     MIDRANGE-L@midrange.com@Internet
cc:      
Fax to: 
Subject:        Re: object lock on user message queue



Rob,

Wow.  Would be interested in seeing that!  Would you be willing to post the
relevant code for that?  Or send privately if it's too long for posting?

<On Thu, 16 Sep 1999 13:54:04, Rob Berendt wrote:>

We have a couple of people who have their message queues
locked by a special program doing a RCVMSG.  This program
then forwards all of their messages on to their email.
Now, I suppose other things could be done.  Like forward
it on to any active jobs they have in QINTER.  There it
arrive at their workstation message queue.


dbale@genfast.com on 09/16/99 01:49:09 PM
Please respond to MIDRANGE-L@midrange.com@Internet
To:  MIDRANGE-L@midrange.com@Internet
cc:
Fax to:
Subject:  object lock on user message queue


I'm using Client Access V3R1M3.  I usually run three display sessions.  When
messages are sent to my user message queue, the message indicator at the bottom
of the screen only appears for the display station that has the lock on the
message queue, typcially the first session signed on to.  So, if I'm working on
the third session and a message gets sent to me, I'll never see it until I
happen to go back to the first session.

I thought I remembered (from a few years ago at a different location) seeing a
flashing message indicator in the Windows task bar when a message was sent to my
user message queue.  This might not have been Client Access; maybe Netsoft.
Anybody know what I'm talking about?  Or how to set it up for Client Access?

The other possibility is to have _each_ display session flash the message
indicator at the bottom of the screen.  I think I saw a solution for this
several years ago.  It involved changing the lock on the message queue object.
Anybody know?

Thanks,
Dan Bale





+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.