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



On 11-Jun-2018 08:50 -0500, Brian Garland wrote:
I have a CMD with a validity checking program that does its own
prompting to override the value of a parameter. I'm doing it this
way because I do not like the way CHOICE(*PGM) works.

If I type the command and press ENTER things work correctly. If I
type the command and press F4 the value is not actually replaced.

I've stepped through the flow in debug and can see the value being
set in the validity checking program, but then when the processing
program is called the parameter was reset to the default.

I've been able to reproduce it on both 7.1 and 7.3. Is this a known
issue OS issue?

Maybe I'm just lucky it works with ENTER.


Take note of the 2nd "consideration"; found in the docs since, before v5r4:

[IBM i 7.3->Defining CL commands->Validity checking program for a CL command](https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/rbam6/wvchk.htm)
"To detect syntax errors and send diagnostic messages for your command, write a validity checking program.

The following are two considerations for validity checking programs:

• The validity checking program is called only if the command syntax is correct. All parameters are passed to the program the same as they are passed to a command processing program.

• You should *not use* the validity checking program to change parameter values because the changed values are not always passed to the command processing program.
…"


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.