Pages

Friday, April 29, 2005

Why the iSeries is Awesome, part 1: Command Prompting

Command prompting blew my mind when I first encountered it. Up until that point one had to have the manual by one's side (or the MAN pages up on another session) looking up parameters and their allowable options. However on the iSeries you don't need any of that stuff (unless of course you intend to do something hairy) because command prompting puts it all on the screen for you. All you have to do is find a command line, type the command you want, press the prompt key (F4) and presto, a screen appears with the parameters the command accepts.

Now this would be awesome enough, but our lord Ib'm didn't leave it at that. Down the middle of the screen are fields to enter the parameter values. On the left is a description and on the right is a list of the possible values that could be entered in each field. If you press function key 11 it will hide the allowable values and display the name for each parameter. Many of the fields will have default values already entered and the ones that are required will be highlighted. If any mistakes are made the command prompter will reverse image the field and display messages explaining the errors. (The messages have a feature that allows you to get help on what they mean and how to recover from them, but that's a subject for another posting.)

If the list of probable values doesn't fit and you want to know what else can be entered then move the cursor to that field, press the prompt key (F4) again, and a full list of allowable values for that parameter will appear. Don't know what the parameter does? Then instead press the help key (F1) and a detailed description of the parameter and all of its special values will appear. Need an explanation of what the command does? No sweat; from the first help screen press the extended help key (F2) and a full explanation of the command comes up.

You won't believe how incredibly easy it is to traverse the a command's help to find out what you need to enter where.

Finding Commands to Prompt

"But" I hear you saying, "how will I know what commands to enter", which is a valid concern, but our lord Ib'm has thought of that as well because they have provided the hapless user with many paths to the command you need. Standardized TLA's, command grouping menus, and generic command selection are just some of the ways in which you, the hapless user, can find your way to CL Command enlightenment.

Every command starts with a verb, like Change (CHG), or Delete (DLT), or Power-down (PWRDWN--and yes, "power-down" is a verb) and is followed by a subject (or noun), like program (PGM), module (MOD), device (DEV), job description (JOBD), etc. So the command to delete a program is "DLTPGM" or power-down the system is "PWRDWNSYS".

Another way to find a command is via the command grouping menus. To display a menu you execute the "GO" command with a menu name. To see a list of every verb and subject on the iSeries go to the VERB and SUBJECT menus. You can also go to individual command gouping menus by adding the prefix "CMD" to the TLA in question that you're curious about. (ie. GO CMDCHG, or GO CMDDLT, etc.)

Generic command selection is another good way to find commands. Say you want to compile a C++ program. To put it into iSeries lingo what you actually want to do is "create" a C++ program and on the iSeries the verb "create" is always spelled "CRT". So find a command line, type "CRT*", press enter, and you'll be presented with every command that starts with "CRT" (along with a one line description of what each one of them creates). There are of course way too many CRT commands to page through, so to make the list shorter we need to add letters between the "CRT" and the asterisk(*). Since it's a C++ program add a "C" (making it "CRTC*") and you'll find a much smaller and more manageable list to page through.

Sociable