z/OS concepts
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


OMVS command shell session

z/OS concepts

The OMVS command is used to invoke the z/OS® UNIX® shell. Users whose primary interactive computing environment is a UNIX system should find the z/OS UNIX shell environment familiar.

You use the OMVS command to invoke the z/OS UNIX shell.

The shell is a command processor that you use to:

  • Invoke shell commands or utilities that request services from the system.
  • Write shell scripts using the shell programming language.
  • Run shell scripts and C-language programs interactively (in the foreground), in the background, or in batch.

Shell commands often have options (also known as flags ) that you can specify, and they usually take an argument, such as the name of a file or directory. The format for specifying the command begins with the command name, then the option or options, and finally the argument, if any.

For example, in Figure 1 the following command is shown:

ls -al /u/rogers

where ls is the command name, and -al are the options.

Figure 1. OMVS shell session display after issuing the OMVS command
ROGERS @ SC43:/>ls -al /u/rogers
total 408
drwx------  3 ADMIN   SYS1           8192 Aug  1 2005  .
dr-xr-xr-x 93 AAAAAAA TTY               0 Feb 13 11:14 ..
-rwxr-xr-x  1 ADMIN   SYS1            979 Feb 29 1996  .profile
-rw-------  1 ADMIN   SYS1             29 Mar  1 1996  .sh_history
-rw-r--r--  1 AAAAAAA SYS1          84543 Apr 28 2007  Sc.pdf
drwxr-xr-x  2 AAAAAAA SYS1           8192 Jun 25 2001  data
-rw-r--r--  1 AAAAAAA SYS1          47848 Jun 26 2004  inventory.export
-rwx------  1 AAAAAAA SYS1             16 Aug  1 2005  myfile
-rw-r--r--  1 AAAAAAA SYS1          43387 Jun 22 2007  print.export

This command lists the files and directories of the user. If the pathname is a file, ls displays information on the file according to the requested options. If it is a directory, ls displays information on the files and subdirectories therein. You can get information on a directory itself by using the -d option.

If you do not specify any options, ls displays only the file names. When ls sends output to a pipe or file, it writes one name per line; when it sends output to the terminal, it uses the -C (multi-column) format.

Terminology note: z/OS users tend to use the terms data set and file synonymously, but not when it comes to z/OS UNIX System Services. With the UNIX support in z/OS, the file system is a data set that contains directories and files. So file has a very specific definition. z/OS UNIX files are different from other z/OS data sets because they are byte-oriented rather than record-oriented.





Copyright IBM Corporation 1990, 2010