× 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: show message on line 24
  • From: David & Eileen Keck <bstars@xxxxxxxxxxxxx>
  • Date: Mon, 26 Mar 2001 08:04:35 -0800

Too much work or not, here is a sample program which displays
the message "LOOP COUNT nnnnn" on line 24 as a status message
during program execution, where nnnn is the loop iteration.  Note that
message ID CPF9898 in message file QCPFMSG is a generic
message ... the message data you provide IS the message.  -Dave K

dcl &count   *dec  (5 0)
dcl &CountA  *char 5
dcl &Message *char 512  /* max msg len allowed is 512 */

loop:
     chgvar &count (&count + 1)
     if (&count >= 5) then(goto eoj)
     chgvar &CountA &Count  /* convert numeric to alpha */
     chgvar &Message ('Loop Cycle ' *Cat &CountA) /* construct message */

             SNDPGMMSG  MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA(&Message) +
                          TOPGMQ(*EXT) MSGTYPE(*STATUS)

     dlyjob 1  /* delay 1 second */
goto loop
eoj: /* exit program */
endpgm


----- Original Message -----
From: "Leif Svalgaard" <leif@leif.org>
To: <MIDRANGE-L@midrange.com>
Sent: Sunday, March 25, 2001 7:36 PM
Subject: Re: show message on line 24


> I meant line 24. and SNDPGMMSG complains that
> I didn't give it a MSGID, and THAT is too much work
> for the simple thing I'm trying to do.
>
> ----- Original Message -----
> From: Dennis Lovelady <dennis@lovelady.com>
> To: <MIDRANGE-L@midrange.com>
> Sent: Sunday, March 25, 2001 9:12 PM
> Subject: Re: show message on line 24
>
>
> > > Hi, Leif:
> > >
> > > From: "Leif Svalgaard" <leif@leif.org>
> > > Sent: Sunday, March 25, 2001 9:47 PM
> > >
> > > > Is there really no CL-command or similar that simply
> > > > shows a message on line 24?
> > > > I can easily write a program that does that, but do I have to.
> > >
> > > Ummmm... you want IBM to guess what you'd like to have appear on line
24,
> > > and then make it so, or ... what is it you're asking for?  And, do you
> > mean,
> > > line 25?
> >
> > Oh.  I just figured out what you meant.  You can send a status message
with
> > sndpgmmsg.  *STS messages always appear on line 25.  You cannot run
> > sndpgmmsg from the command line, but that's not something I think you'd
> want
> > anyway.
> >
> > HTH
> > --
> > Dennis Lovelady             Fayetteville, GA
> > mail: dennis@lovelady.com
> > URL:  http://www.lovelady.com
> > ICQ:  5734860
> > --
> > "An autobiography usually reveals nothing bad about its writer except
his
> > memory."
> >         - Franklin P. Jones
> >
> >
> > +---
> > | 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
> +---
>

+---
| 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-Ups:
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.