Each shell command appears in alphabetic order. The description for each command is divided into several topics, which are explained in the following paragraphs. Some of these topics apply only to a few command descriptions. Also, some command descriptions include special topics that are not explained here.
ls [–AabCcdFfgiLlmnopqRrstuWx1] [pathname …]
The format takes the form of a command line as you might type it into the system; it shows what you can type in and the order in which you should do it. The parts enclosed in square brackets are optional; you can omit them if you choose. Parts outside the square brackets must be present for the command to be correct.
The format begins with the name of the command itself. Command names always appear in bold font.
ls -Aa
ls -a -A
ls -aA
-x value
sort [–cmu]
[–o outfile]
[–t char]
[–yn]
[–zn]
[–bdfiMnr]
[-k startpos[,endpos]] …
[file …]
sort [–cmu]
[–o outfile]
[–tchar]
[–yn]
[–zn]
[–bdfiMnr]
[+startposition[–endposition]] …
[file …]
–o outfile
sort -o sorted.dat
(followed by the rest of the command).–tchar
sort -t:
In this case, we use a colon (:) in the position of the placeholder char.
[file …]
This means a list of one or more file names; the ellipsis (….) stands for repetitions of whatever immediately precedes it. Since there are square brackets around the previous list, you can omit the list if you like.
[pathname …]
As you might guess, this means that an ls command can end with an optional list of one or more path names. What's the difference between this and our sort example? A path name (specified with pathname) can be the name of either a file or a directory; a file name (specified with file) is always the name of a file.
ls -l -t myfiles
ls -t -l myfiles
but you will not get correct results
if you specify: ls myfiles -l -t ***incorrect***
ls -l myfiles -t ***incorrect***
and so on. If you enter the last example, for instance, ls interprets –t as the path name of a file or directory, and the command will try to list the characteristics of that item.
ls –– –t
to list the contents of that directory.The Description topic describes what the command does. For a particularly complex command, this topic may be divided into a large number of subtopics, each dealing with a particular aspect of the command.
The Description topic often mentions the standard input (stdin) and the standard output (stdout). The standard input is typically the workstation keyboard; the standard output is typically the display screen. The process of redirection can change this. Redirection is explained in z/OS UNIX System Services User's Guide.
The Options topic describes each of the options used by the command.
The Examples topic is present in many command descriptions, giving examples of how the z/OS shell can be used.
Before you try to run any of the provided examples, you need to know that the z/OS shell uses the EBCDIC code page 01047 (Latin-1). Characters entered on a workstation keyboard and passed to the shell by z/OS do not have the same hexadecimal encoding as the code page used by the shell. You may need to customize your keyboard so that those characters have the encoding that the shell uses. See z/OS UNIX System Services User's Guide for more information about code page conversion.
The Environment Variables topic lists the environment variables that affect the command, if any, and describes the purposes that those variables serve. For example, the ls command description lists two environment variables (COLUMNS and TZ). It also explains that COLUMNS is the terminal width and that TZ contains information about the local time zone.
z/OS® UNIX supports the IBM-supplied locales listed in Table 1. User-generated locales using IBM® code page 1047 are also supported.
Country or region | Language | Locale name |
---|---|---|
Bulgaria | Bulgarian | Bg_BG.IBM-1025 |
Czech Republic | Czech | Cs_CZ.IBM-870 |
Denmark | Danish | Da_DK.IBM-277 |
Denmark | Danish | Da_DK.IBM-1047 |
Switzerland | German | De_CH.IBM-500 |
Switzerland | German | De_CH.IBM-1047 |
Germany | German | De_DE.IBM-273 |
Germany | German | De_DE.IBM-1047 |
Greece | Ellinika | El_GR.IBM-875 |
United Kingdom | English | En_GB.IBM-285 |
United Kingdom | English | En_GB.IBM-1047 |
Japan | English | En_JP.IBM-1027 |
United States | English | En_US.IBM-037 |
United States | English | En_US.IBM-1047 |
Spain | Spanish | Es_ES.IBM-284 |
Spain | Spanish | Es_ES.IBM-1047 |
Finland | Finnish | Fi_FI.IBM-278 |
Finland | Finnish | Fi_FI.IBM-1047 |
Belgium | French | Fr_BE.IBM-500 |
Belgium | French | Fr_BE.IBM-1047 |
Canada | French | Fr_CA.IBM-037 |
Canada | French | Fr_CA.IBM-1047 |
Switzerland | French | Fr_CH.IBM-500 |
Switzerland | French | Fr_CH.IBM-1047 |
France | French | Fr_FR.IBM-297 |
France | French | Fr_FR.IBM-1047 |
Croatia | Croatian | Hr_HR.IBM-870 |
Hungary | Hungarian | Hu_HU.IBM-870 |
Iceland | Icelandic | Is_IS.IBM-871 |
Iceland | Icelandic | Is_IS.IBM-1047 |
Italy | Italian | It_IT.IBM-280 |
Italy | Italian | It_IT.IBM-1047 |
Israel | Hebrew | Iw_IL.IBM-424 |
Japan | Japanese | Ja_JP.IBM-939 |
Japan | Japanese | Ja_JP.IBM-1027 |
Korea | Korean | Ko_KR.IBM-933 |
Belgium | Dutch | Nl_BE.IBM-500 |
Belgium | Dutch | Nl_BE.IBM-1047 |
Netherlands | Dutch | Nl_NL.IBM-037 |
Netherlands | Dutch | Nl_NL.IBM-1047 |
Norway | Norwegian | No_NO.IBM-277 |
Norway | Norwegian | No_NO.IBM-1047 |
Poland | Polish | Pl_PL.IBM-870 |
Brazil | Brazilian | Pt_BR.IBM-037 |
Brazil | Brazilian | Pt_BR.IBM-1047 |
Portugal | Portugese | Pt_PT.IBM-037 |
Portugal | Portugese | Pt_PT.IBM-1047 |
Romania | Romanian | Ro_RO.IBM-870 |
Russia | Russian | Ru_RU.IBM-1025 |
Serbia | Serbian(Latin) | Sh_SP.IBM-870 |
Slovakia | Slovak | Sk_SK.IBM-870 |
Slovenia | Slovenian | Sl_SI.IBM-870 |
Serbia | Serbian(Cyrillic) | Sr_SP.IBM-1025 |
Sweden | Swedish | Sv_SE.IBM-278 |
Sweden | Swedish | Sv_SE.IBM-1047 |
Turkey | Turkish | Tr_TR.IBM-1026 |
People's Republic of China | Simplified Chinese | Zh_CN.IBM-935 |
Taiwan | Traditional Chinese | Zh_TW.IBM-937 |
For more information about locales, see Localization.
The Files topic lists any supplementary files (files not specified on the command line) that the command refers to. Such files typically provide information the command needs; the command accesses these files during its operation. If the files cannot be found, the command issues a message to this effect.
Files documented in this topic may be temporary files, output files, databases, configuration files, and so on.
The z/OS XL C/C++ run-time library supports a file naming convention of // (the file name can begin with exactly two slashes). However, z/OS UNIX System Services does not support this convention. Do not use this convention (//) unless it is specifically indicated (as in the description for the c89 command). z/OS UNIX System Services does support the POSIXfile naming convention, where the file name can be selected from the set of character values excluding the slash and the null character.
The usage notes section gives additional notes for those using the shell. Its purpose is similar to that of the Caution topic (see Caution). That is, it provides important information that the reader should not overlook. However, it typically deals with issues that are more benign than what the Caution topic deals with.
The Exit Values topic presents the error messages that the shell may display, along with a description of what caused the message and a possible action you can take to avoid getting that message. Occasionally, this topic refers you to another command description for more information about an error message.
This topic also contains information about the exit status returned by the command. You can test this status to determine the result of the operation that the command was asked to perform.
The Limits topic lists any limits on the operation of the shell. Some limits are implicit rather than explicit and may be lower than the explicitly stated limit.
The Caution topic contains important advice for users. In z/OS shell documentation, the Caution topic is often aimed at those who are familiar with UNIX systems. Since the z/OS shell primarily conforms to the emerging POSIX standards, its behavior may not precisely match the corresponding UNIX commands. The Caution topic may point out discrepancies in behavior that may catch experienced POSIX or UNIX users by surprise.
The Related Information topic refers to other command descriptions that may contain information relevant to the command description you have just read. For example, consider the head command; by default, head displays the first 10 lines of each file given on the command line. Its Related Information topic refers you to tail, the command that displays the last 10 lines of a file.