× 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 is correct - a VCP is always called first, so you can send back an optional diagnostic (model of the message ID is CPD0006) and the specific escape message (CPF0002) for this use.

John, you are right, when you prompt a command and then press enter after setting parameters, it will call the VCP and stay in the prompt - with the CPF0002 showing at the bottom of the prompt. It may be you didn't sent the right messages - has to be done just right - see chapter 9 of CL Programming for details.

To Phil - if you check stuff in the VCP, you would normally not put the same checks in the CPP.

One thing I just learned - you don't want the VCP called when you are programming in SEU or whatever - the way to prevent it is to use variables, not literals, in the parameters. If you use literals, the VCP will test those values and may fail - one case I ran into long ago was checking existence of an object - guess what, it wasn't there - and the compile and everything broke. Now I know how to prevent that.

HTH
Vern

On 2/9/2012 12:29 PM, Gary Thompson wrote:
I think a>valid< validity checking program will find errors when the user
presses Enter after parameter entry and prior to the command processing
program being called....

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of phil.seay@xxxxxxx
Sent: Thursday, February 09, 2012 11:27 AM
To: midrange-l@xxxxxxxxxxxx
Subject: RE: Can a Command Validity Check program be an RPG ILE program

Hi John,

I think a validity checking program will find the error at compile time. A command processing program will find the error at run time.

--
Regards,
Phil

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Thursday, February 09, 2012 10:04 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: Can a Command Validity Check program be an RPG ILE program

OK, I put the QMHSNDPM API in and now the command stops.

But I may have made in invalid assumption

I thought that if I had pressed F4 on the command and the validity program found an error that the command would stay prompted and display the error msg.
Mine returns back to a command line and displays the error message.

I wanted a way to reverse image the field where the error was found and keep the command up on the screen.
Sort of like when Restricted values are defined in the Command and they enter an invalid value.

Was I expecting too much?
The way it works now, I am just moving my validity checking from the Command Processing program to a Validity checking program.
What do I gain by using the validity checking program??


Thanks

John




-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mark Walter
Sent: Thursday, February 09, 2012 10:55 AM
To: Midrange Systems Technical Discussion
Subject: RE: Can a Command Validity Check program be an RPG ILE program

Use the QMHSNDPM API.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John Allen
Sent: Thursday, February 09, 2012 10:26 AM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: Can a Command Validity Check program be an RPG ILE program



Can a Command Validity Check program be an RPG ILE program



If yes, how is the SNDPGMMSG supposed to be handled in the RPG?



In my test I use QCMDEXEC to execute a SNDPGMMSG *ESCAPE parms and it runs right through and continues on processing the command



I am just now trying to learn this process so bear with me if this is a stupid question J.





Thanks



John



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.




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.