Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Control Language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Syntax== The [[Backus-Naur form|BNF]] for a much simplified CL command syntax would be defined as follows: <syntaxhighlight lang="bnf"> <CL-command> ::= command-name [<positional-parameter-list>] [<named-parameter-list>] <positional-parameter-list> ::= <parameter-value> [<positional-parameter-list>] <named-parameter-list> ::= parameter-name "(" <parameter-element-list> ")" [<named-parameter-list>] <parameter-element-list> ::= <parameter-value> [<parameter-element-list>] <parameter-value> ::= CL-name | qualified-CL-name | "*"special-value | generic-CL-name"*" | "'"alphanumeric-value"'" | numeric-value | "X'"hexadecimal-value"'" </syntaxhighlight> The items above that end in ''-name'' follow [[Object (IBM i)|object]] naming conventions which, generally speaking, means the name starts with a letter and can be up to ten characters in length. (CL commands are also case-insensitive.) A good example of a typical CL command is the '''Change Program''' (CHGPGM) command below: CHGPGM MYPGM OPTIMIZE(*FULL) RMVOBS(*BLKORD *PRCORD) TEXT('My program.') The above command is passing four parameters to the program that does ''Change Program'' processing and they are: * MYPGM: A positional parameter (PGM), and the only required parameter. In this case it's the name of the program being changed. Positional parameters are always first. Once a named parameter appears all parameters that follow must be named parameters. * OPTIMIZE(*FULL): A named parameter specifying a single element which is a special value. In this case it will change the program to be fully optimized. * RMVOBS(*BLKORD *PRCORD): A named parameter (Remove Observability) specifying multiple special values. In this case telling it to remove two kinds of profiling data from the program. * TEXT('My program.'): Another named parameter specifying a single alphanumeric value. In this case it's changing the descriptive text of the program. In reality the system will pass many more parameters than the four specified above. This is because the rest of the CHGPGM command's parameters were not specified, so default values will be passed instead. For every parameter on this, aside from the PGM parameter, that default is ''*SAME'', meaning don't change it.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)