Commands and Programs
Parameters (command-line arguments) defined in the main procedures of all traditional AS/400 programs are hard coded lists that are made up of parameters that can be numeric, alphanumeric, boolean, etc. and the order in which parameters are passed is important. This is a stark difference from the Unix and DOS worlds where the parameter list in Unix shell scripts and C programs is a set or array of character pointers and more often than not the parameters are not positionally dependent.
The AS/400 developer's solution to this problem was the command object (*CMD). While the parameters on the command can be specified in any order, each parameter is defined to be passed in a specific order to the program. The programmer can also define, among other things, the parameter's data type, unique parameter name, descriptive text (for prompting), default value (used only if the parameter isn't specified during execution), if the values are restricted to a certain set or range, if the data entered should be changed to another value before calling the program, etc.
At its most basic a command names a single program to call when the user types or prompts the command and presses the Enter key. The command takes all of the parameters typed by the user, and those not typed by the user, and builds a parameter list that it passes to the program when it's called.
Read more about this topic: AS/400 Control Language
Famous quotes containing the words commands and/or programs:
“If writers were too wise, perhaps no books would get written at all. It might be better to ask yourself Why? afterwards than before. Anyway, the force from somewhere in Space which commands you to write in the first place, gives you no choice. You take up the pen when you are told, and write what is commanded. There is no agony like bearing an untold story inside you.”
—Zora Neale Hurston (18911960)
“Short of a wholesale reform of college athleticsa complete breakdown of the whole system that is now focused on money and powerthe womens programs are just as doomed as the mens are to move further and further away from the academic mission of their colleges.... We have to decide if thats the kind of success for womens sports that we want.”
—Christine H. B. Grant, U.S. university athletic director. As quoted in the Chronicle of Higher Education, p. A42 (May 12, 1993)