Finding a Command


Sometimes, you need to execute a command but you cannot remember what it is, and the naming system doesn't really help if you do not know what you are looking for. The i5/OS provides two ways to look up unknown commands: the Select Command (SLTCMD) command and the menus.

The SLTCMD Command

The SLTCMD command presents a list of commands as they are found in a particular library. You need to specify *ALL, a generic name, or a specific name, and the name of the library where you want to search for the command.

For example, suppose you want to delete an RPG program. You try DLTRPGPGM (which seems logical), but no such command exists. To find the command, do the following:

      SLTCMD CMD(QSYS/DLT*) 

This command shows you a list of all the QSYS commands that begin in the letters DLT. There may be a lot of them, so you must go through the list, rolling forward if necessary, until you find the command that seems likely. It turns out that the command you needed is DLTPGM.

You should be aware of one danger: If you accidentally type a D instead of an S, you will run the Delete Command (DLTCMD) command instead. Depending on the authority settings of the user profile you're using, you could delete system commands.

SLTCMD has a shortcut form that is not only quicker to type but avoids the danger of accidental deletion. To use the shortcut form, type part of the command followed by an asterisk and press Enter.

      DLT* 

Like the full-size version, the shortcut version shows you a list of deletion commands.

Command Menus

Another feature of i5/OS is its hundreds of menus. The main menu is called MAIN. You can display this menu by entering the command GO MAIN. Figure 9.2 shows the results of that command.

image from book
Figure 9.2: Main menu.

The GO command is used to display a particular menu. From the MAIN menu, you select options by keying in the appropriate number and pressing Enter to take you to another menu. Or, you can execute a command or program. If you key GO MAJOR, you will see the resulting panel in Figure 9.3.

image from book
Figure 9.3: Major Command Groups menu.

From here, you can go to other menus:

VERB, which lists all the verbs (such as create, print, submit, and receive). Each option in the VERB menu (shown in Figure 9.4) takes you to another menu, called CMDXXX (where xxx is the verb's abbreviation). From this menu, you can find a command. For example, the CMDDSP menu shows all CL commands that perform some kind of displaying action.

image from book
Figure 9.4: Verb Commands menu.

SUBJECT lists all the modifiers, such as output queue and file. Again, each option in the SUBJECT menu (shown in Figure 9.5) takes you to another menu, called CMD XXX (where xxx is the modifier's abbreviation), from which you can find a command. For example, the CMDOUTQ menu lists all commands that relate to output queues such as: create, delete, and work with. Remember that the GO command can be used with any menu. For example, you know that a menu exists named CMDOUTQ (shown in Figure 9.6). You can go there directly by executing GO CMDOUTQ.

image from book
Figure 9.5: Subject Commands menu.

image from book
Figure 9.6: Output Queue Commands menu.



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net