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.
Friday, April 29, 2005
Subscribe to:
Post Comments (Atom)
Is this resolved?
ReplyDeleteYes, there's a PTF for the Apache problem. See the comments below the post.
ReplyDeleteAmen to iSeries command prompting. I'm working on an article about command usage for System i News. I just finished Redhat classes and the commands usage is primitive compared to the S/38, no less the iSeries.
ReplyDeleteThank you very much for the info on command prompting. Much of it I knew, but the "GO CMDCRT" menus was new to me. While the output of the above example is almost identical to "CRT*" (which is what I would have used), from "GO CMDCRT" there is key I'd never seen before: F16: Major Menu.
ReplyDeleteThe Major Menu gives you a menu of Major Command Groups, which you can get to by typing "GO MAJOR" at a command line (or, even by pressing F4 at a blank command line: who would have thought?). This menu gives you a number of different ways of listing commands by groups, including a list of verbs, if you don't even know what the verbs are!
In short, from that menu you should be able to find literally every command possible on the iSeries, nicely cross-indexed. Nice!
Now, a request: this blog entry was entitled "Why the iSeries is Awesome, part 1:". So where's part 2? My suggestion is that for part 2, you write up a few tips on how to navigate within menus and the command line: things like F9 for retrieving previous commands, and how to sort columns. Bonus points for detailing things you can do with the SysRq key (or make that part 3!)