Question

  Asked: Nov 27 2007   9:07 AM GMT
  Asked by: Iordache


Need to make a parameter required !


CL, parameter, CMD, required

I want to code a *cmd with four parameters.
1. I want all of them to be required ( i.e. pressing enter without typing anything should issue a error message "Parameter BLABLA required")
2. I want to check at a *cmd level , not at the *pgm level behind the command if the entered parameter contains a string.
(i.e. if the parameter is a mail, and it is , i want to be sure that it is like %@myworkspace.com or other )
I repeat i want to do this at the *cmd level not at the *pgm level because i've already done that! i can write a verification program also , but is there a way to do this from the *cmd source ?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



1. MIN(1) will force an error if nothing is entered
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400, Microsoft Windows and Security.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Joederoche  |   Nov 27 2007  1:35PM GMT

Lordache,
According to the IBM Information center, if you want to do any validity checking on any of the parameters that are entered on a command, and they can not be entered as a value list, you would need to create a validity checking program and then attach that program to the command on the VLDCKR parameter on the CRTCMD command when the command is created/compiled.

Here is the link:
<a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp" rel="nofollow">http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp</a>