Chapter 9: Commands and System Help


Every operating system provides at least one interface whereby humans may communicate with it. The i5/OS provides two interfaces. The original interface is text-based, consisting of a set of commands and menus that categorize those commands. The newer interface, iSeries Navigator, is a graphical system that runs on attached personal computers. This chapter deals with the command interface. iSeries Navigator is discussed in Chapter 10.

OS/400 Command Name Structure

Many computers have operating systems with control commands that make little sense. You might guess that the cp command copies files on a UNIX system, but would you know that the command to rename a file is mv, or that the cat command can display the contents of a file on a dumb terminal? The i5/OS, on the other hand, uses a standard set of abbreviations that are always followed. The vast majority of commands adhere to the following naming scheme:

  1. First, a three-letter abbreviation for a verb, such as create, remove, print, or send. See Table 9.1.

    Table 9.1: Example Abbreviations

    Verbs

    Modifiers

    CRT

    Create

    F

    File

    CHG

    Change

    PF

    Physical File

    DLT

    Delete

    LF

    Logical File

    ADD

    Add

    SRCF

    Source File

    RMV

    Remove

    CLPGM

    CL Program

    DSP

    Display

    RPGPGM

    RPG Program

    WRK

    Work with

    MSGQ

    Message Queue

    STR

    Start

    OUTQ

    Output Queue

    END

    End

    OBQ

    Job Queue

      

    DTAQ

    Data Queue

      

    DTAARA

    Data Area

      

    SBS

    Subsystem

  2. Last, a series of abbreviations for modifiers, such as file, program, job queue, or user profile. These abbreviations are usually three letters long, but there are many exceptions. This naming scheme makes command names easy to guess. If you know the abbreviations used by IBM, all you need do is put them together, and you are likely to be right.

The i5/OS includes a very few commands that do not follow this convention. These are commands that are widely used in the Internet world, such as PING, FTP, CD, and MD. All these commands have counterparts that do follow the i5/OS convention. See Table 9.2 for some examples.

Table 9.2: Commands that do not conform to i5 conventions

Command

Alternate name

Description

APING

VFYAPPCCNN

Verify APPC Connection

AREXEC

RUNRMTCMD

Run Remote Command

CD

CHGCURDIR

Change Current Directory

CHDIR

CHGCURDIR

Change Current Directory

COPY

CPY

Copy Object

DEL

RMVLNK

Remove Link

ERASE

RMVLNK

Remove Link

FTP

STRTCPFTP

Start TCP/IP File Transfer Protocol

JAVA

RUNJVA

Run Java Program

LPR

SNDTCPSPLF

Send TCP/IP Spooled File

MD

CRTDIR

Create Directory

MKDIR

CRTDIR

Create Directory

MOV

MOVOBJ

Move Object

MOVE

MOVOBJ

Move Object

PING

VFYTCPCNN

Verify TCP/IP Connection

QSH

STRQSH

Start Qshell

RD

RMVDIR

Remove Directory

RMDIR

RMVDIR

Remove Directory

REN

RNM

Rename Object

STATFS

DSPMFSINF

Display Mounted File System Information

TELNET

STRTCPTELN

Start TCP/IP TELNET

Commands are not case-sensitive, except for quoted parameter values. The following are all acceptable versions of the Display User Profile command:

      DSPUSRPRF      dspusrprf      DspUsrPrf      Dspusrprf      dSPusrpRf 

A Few Examples

Suppose you need to create a new message queue. What command would you use? If you look at the list of verbs, you will see that the verb "create" is abbreviated CRT. In the list of modifiers, message queue is abbreviated MSGQ. Put them together and you obtain CRTMSGQ, which is correct. Figure 9.1 illustrates this concept.

image from book
Figure 9.1: Parts of a command name.

Now, suppose you want to display a data area. Display is DSP and data area is DTAARA. The command, then, is DSPDTAARA. Correct again.

Finally, suppose you want to create an RPG program and then you want to delete a CL program. Create is CRT and RPG program is RPGPGM, so the command should be CRTRPGPGM, which is correct. To delete a CL program, however, you do not run the DLTCLPGM. That command does not exist. You run the DLTPGM command. The system doesn't care what language you used to create the program when you are going to delete it. Although you use CRTPF to create a physical file, you use DLTF (delete file) to delete it. It makes no difference to the system what kind of file it is.



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