Difference between revisions of "CLP Coding Rules"
From MidrangeWiki
m |
|||
Line 8: | Line 8: | ||
** Example [[WRKOUTQ]] QFISCAL* to get at list of all [[OUTQ]] whose name starts with QFISCAL | ** Example [[WRKOUTQ]] QFISCAL* to get at list of all [[OUTQ]] whose name starts with QFISCAL | ||
* Parentheses go around keywords and values | * Parentheses go around keywords and values | ||
− | ** Example [[SAVLIB]] LIB(XFILES | + | ** Example [[SAVLIB]] LIB(XFILES) DEV(TAP01) |
* Slash connects parts of a qualified name or path name | * Slash connects parts of a qualified name or path name | ||
** Example [[WRKOBJ]] XFILES/UFOS | ** Example [[WRKOBJ]] XFILES/UFOS | ||
* Single apostrophe indicates beginning and end of a quoted character string (a constant) | * Single apostrophe indicates beginning and end of a quoted character string (a constant) | ||
− | ** Example [[SNDMSG]] MSG | + | ** Example [[SNDMSG]] MSG('Intruder Alert') TOUSR(QBOSS) |
* *N is a place holder (take the defaults) indicating the absense of a positional parameter | * *N is a place holder (take the defaults) indicating the absense of a positional parameter | ||
** Example RUNQRY *N LOG | ** Example RUNQRY *N LOG | ||
* Predefined values begin with an asterisk and indicate IBM-defined values which are reserved by [[OS/400]] and may be used in programs to have those set functions | * Predefined values begin with an asterisk and indicate IBM-defined values which are reserved by [[OS/400]] and may be used in programs to have those set functions | ||
− | ** Example [[SAVLIB]] LIB(*ALLUSR | + | ** Example [[SAVLIB]] LIB(*ALLUSR) DEV(*SAVF) |
* Generic name contains one or more characters that are those that start some object(s) then end in asterisk to signify wild card list of all that share that prefix | * Generic name contains one or more characters that are those that start some object(s) then end in asterisk to signify wild card list of all that share that prefix | ||
** Example DSPF* | ** Example DSPF* |
Revision as of 20:11, 25 June 2005
Coding rules for CLP Commands
These rules apply both on Command Line and inside a CLP program.
- Blank space separates parts of a command
- Parentheses go around keywords and values
- Example SAVLIB LIB(XFILES) DEV(TAP01)
- Slash connects parts of a qualified name or path name
- Example WRKOBJ XFILES/UFOS
- Single apostrophe indicates beginning and end of a quoted character string (a constant)
- Example SNDMSG MSG('Intruder Alert') TOUSR(QBOSS)
- *N is a place holder (take the defaults) indicating the absense of a positional parameter
- Example RUNQRY *N LOG
- Predefined values begin with an asterisk and indicate IBM-defined values which are reserved by OS/400 and may be used in programs to have those set functions
- Example SAVLIB LIB(*ALLUSR) DEV(*SAVF)
- Generic name contains one or more characters that are those that start some object(s) then end in asterisk to signify wild card list of all that share that prefix
- Example DSPF*