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



There are a limited set of possibilities in the command definition itself.

But for a case like this I would look into a validity checking program that
you can connect to the command. This is a program that stops the CPP from
executing if any parameters (or combinations of parameters) do not make
sense. And as the programmer YOU define what makes sense!

Check this link for some ideas:

https://www.rpgpgm.com/2018/03/creating-your-own-commands-part-2.html

message: 1
date: Tue, 27 Apr 2021 17:32:08 -0700
from: "James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx>
subject: Question about command parameters (PARM statement)

In defining a command's parameters, I see a number of ways to define what
values are specifically >>*allowed* for a parameter.

Is there a way to define several (in this case, ten) distinct values
*prohibited* for a parameter?

In this case, the parameter is a value to be passed to a SBMJOB's "USER"
parameter, and so it should accept either a valid SNAME or "*CURRENT,"
but reject the user profiles that are prohibited for that parameter of
SBMJOB.

And if I can reject it at the command level, rather than the CPP level,
then a wrong value will of >>course keep it from compiling in a CL program,
and make it fail a syntax check in SEU.

--
JHHL



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.