× 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: Command validation program
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Mon, 25 May 98 18:26:40 +1000

Hello Vanya,

Commands are a special form of message.  They are request messages (hence a 
program, such as QCMD, which 
processes commands is a request processor -- these sorts of programs are the 
ones that CNLRQS works on).

You should be able to retrieve the most recent *RQS message from the joblog.  
For example:

RCVMSG PGMQ(*PRV) MSGTYPE(*RQS) MSG(&CMD)
IF (%SST(&CMD 1 5) *EQ 'MYCMD') DO
   /* some stuff */
ENDDO

This will get the first new request message from the previous program queue 
which should be the one you are 
after.  You may need to loop forward, checking for the commands you are after 
but each processed request 
message should be marked old by its request processor.

I cannot test this for you at the moment but I have done this in the past so I 
know it works.  You may have to 
play with the various values for MSGTYPE and MSGKEY, 

Regards,
Simon Coulter.

//----------------------------------------------------------
// FlyByNight Software         AS/400 Technical Specialists
// Phone: +61 3 9419 0175      Mobile: +61 0411 091 400
// Fax:   +61 3 9419 0175      E-mail: shc@flybynight.com.au
// 
// Windoze should not be open at Warp speed.
 

//--- forwarded letter -------------------------------------------------------
> Date: Sun, 24 May 98 00:42:11 -0600
> From: jovic@calcna.ab.ca
> To: midrange-l@midrange.com
> Reply-To: MIDRANGE-L@midrange.com
> Subject: Command validation program

>       Hi folks.
>       
>       Is there any (SIMPLE & ELEGANT) way for command validation program
> to receive a command name. In other words, I'd like to inform validation
> program about name of the command that invoked it. 
> 
>       Passing command name as a parameter is not an option. So far, I
> tried sending messages to various system programs previously on the stack
> (QCMD, QUOCMD ...), but none was "willing" to return that information.
> However, sending ESCAPE message, returns command name to joblog, but than
> it's too late :))). Still, command name must be somewhere around. What am
> I missing?
> 
>       Thanks in advance,
> Vanya

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