× 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: submit job message
  • From: "Dennis Lovelady" <dennis@xxxxxxxxxxxx>
  • Date: Tue, 27 Mar 2001 22:06:58 -0500

Hi, Ray:

From: "Ray, Adam" <aray@fhp.org>
Sent: Tuesday, March 27, 2001 5:23 PM

> When I submit a job from the command line, I get a message like this...
> Job 402318/USER/USERJOBD submitted to job queue QBATCH
>     in library QGPL.
>
> How do I get that same message to display on the screen if I submit
> the job from a CL program?

Right after your SBMJOB command, go into a RTVMSG loop, picking up the
messages that have been issued from the SBMJOB command, and forward them to
PGMQ(*).  Something like this:
   RMVMSG PGMQ(*SAME) CLEAR(*ALL)
   SBMJOB (stuff)
 LOOP:
   CHGVAR &msg (' ')
   RCVMSG PGMQ(*SAME *)
          MSGTYPE(*ANY)
          MSG(&msg)
          MSGDTA(&msgdta)
          MSGID(&msgid)
          RTNTYPE(&rtntyp)
          MSGF(&msgf)
          MSGFLIB(&msgflib)
   IF (&msg ¬= ' ')  DO
      IF (&msgid = ' ')  DO
         CHGVAR &msgid CPF9898
         CHGVAR &msgf QCPFMSG
         CHGVAR &msgflib *LIBL
         CHGVAR &msgflib *LIBL
         CHGVAR &msgdta &msg
         ENDDO
      IF (&rtntyp='01') CHGVAR &msgtype *COMP
      IF (&rtntyp='02') CHGVAR &msgtype *DIAG
      IF (&rtntyp='04') CHGVAR &msgtype *INFO
      IF (&rtntyp='05') CHGVAR &msgtype *INQ
      IF (&rtntyp='08') CHGVAR &msgtype *RQS
      IF (&rtntyp='10') CHGVAR &msgtype *RQS
      IF (&rtntyp='14') CHGVAR &msgtype *NOTIFY
      IF (&rtntyp='15') CHGVAR &msgtype *ESCAPE
      IF ((&msgtype=*ESCAPE) & (¬ &excp)) DO
         CHGVAR &msgtype *COMP
         ENDDO
      SNDPGMMSG MSGID(&msgid)
                MSGF(&msgflib/&msgf)
                MSGDTA(&msgdta)
                TOPGMQ(*PRV *)
                MSGTYPE(&msgtype)
      GOTO LOOP

... doesn't have to be that fancy, but the above will do what you want.  Of
course, you have a few variables to define, but otherwise, this should do
it.  This is an extract of an old CLP I wrote, called FWDMSG.  I do it now
with MI and APIs.

HTH
--
Dennis Lovelady             Fayetteville, GA
mail: dennis@lovelady.com
URL:  http://www.lovelady.com
ICQ:  5734860
--
"Some people can stay longer in an hour than others can in a week."
        - William Dean Howells


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

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.