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



Steve,

>So how do I "attach" the VCP to the command?  There doesn't appear to be a
>VCP option on either the command parms or the CRTCMD command.

As Vern mentioned, prompt all keywords -- it is the VLDCKR() keyword which names
the VCP name.

>Why couldn't my CPP function as a VCP?  

Because by that time you can't issue messages back to the bottom of the command
prompter, while the command is still prompted.

>Currently, I'm validating the input
>in my CPP and sending back error messages with SNDPGMMSG but when an error
>occurs, I can only send a message and cannot retain the command on-screen.

And that is precisely why you'd use a VCP instead.  As Vern mentioned, the VCP
sends back a *DIAG message(s) CPD0006 with error text to be displayed by the
prompter, followed by *ESCAPE message CPF0002 to throw the exception.

VCP's are always called when a command is run, even if the command is not
prompted.  A command may also optionally have a POP (for Prompt Override
Program), but these *only* run when the command is prompted.  Thus a VCP can
validate input all the time, while a POP is only useful for prompting.

VCP's can be used to validate input even when you don't use a Choice Program.  \

A choice program, VCP, POP, or CPP are all different animals with different
purposes.

Hope this helps

Doug

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.