|
To do some parameter checking on the command itself, you can specify a range or the allowed values to be entered. Look at the keywords RSTD, VALUES, RANGE, SPCVAL, etc on the PARM statement. I think they will be working even with a Choice PGM. Regards, Carel Teijgeler *********** REPLY SEPARATOR *********** On 4-3-03 at 13:35 Vern Hamberg wrote: >To see the validity check program parameter you need to F9 or F10 on >CRTCMD >or CHGCMD. > >What I've done is have a module that sets up the string that's returned by >the choice program. Then I can use that same module in the validity >checking program. > >CHCPGM module CALLPRC to choice creation module > returns the value or prompt string to command >VCP module CALLPRC to choice creation module with 'P' in position 21 - may >not need 1st 20 characters > checks if entered parameter is in list of valid values > >Get to Chapter 9 (IIRC) of the CL Programming manual - VCP is a lot better >than validating in the CPP. You end up sending 2 messages, a CPD0006 >diagnostic with the error text (or one of your own defined as described in >that chapter), and a CPF0002 exception. > >There is no visual cue as to which parameter is in error, so put something >in the message text. > >BTW, a prompt override program can alter the values entered - I assume it >could have a subfile or whatever for entry. >
As an Amazon Associate we earn from qualifying purchases.
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.