

IBM i General Design Standards › Design Standards for Commands › Naming Conventions
Naming Conventions
The chapter on naming conventions gives a suggested convention for commands—commands are relatively scarce and the end user may possibly see their names. Names should be meaningful and consistent with the conventions used in CL. The following is a summary of the convention:

For example:

Note the following points when naming commands:
- Names should not conflict with any existing OS/400 commands, nor with any commands that IBM may introduce into OS/400 at a future date. For this reason, a prefix letter should be used.
- Use a "verb-object syntax": the command name should consist of VERB+NOUN or VERB+ADJ+NOUN, for instance, CRTOBJ, RTVCLSRC, YCPYMNU. There should always be a verb.
- Use existing CL mnemonics wherever possible, both for verbs (for example, CRT, DSP, CPY) and for objects (for example, PGM, OBJ, DTAARA). A complete list of keywords can be found in the appendix of the Control Language Reference Manual for both machines.
- Follow the distinctions made by OS/400 in its use of pairs of antonymous mnemonics, for example:
|
Antonym — Antonym
|
Description
|
|
CRT — DLT
ADD — RMV
|
To create/delete an entity
To add/remove data within an entity
|
|
STR — END
STR — TRM
|
To start/end a function
To start terminate a process
|
|
SND — RCV
HLD — RLS
|
To send/receive data
To hold/release a function
|
|
SAV — RST
|
To save/restore a function
|
|
OPN — CLO
ALC — DLC
GRT — RVK
CHG — RTV
|
To open/close a function
To allocate/de-allocate
To grant/revoke a function
To set/retrieve an attribute
|
- Preserve the distinction made in OS/400 between verbs that operate on objects and verbs that operate on the contents of objects:
|
Object
|
Internal
|
|
CRT
|
ADD
|
|
DLT
|
RMV
|
|
CHG
|
EDT
|
|
DUP
|
CPY
|
- Preserve the distinction made in OS/400 between working interactively on a list of entities (WRK verb) and working interactively on an individual entity (EDT or STR verb).
- Follow the distinction made in OS/400 between operating on an object and operating on the description of an object; for instance, DSPSBS versus DSPSBSD.
Copyright © 2014 CA.
All rights reserved.
 
|
|