z/OS UNIX System Services User's Guide
Previous topic |
Next topic
|
Contents
|
Contact z/OS
|
Library
|
PDF
Contents (exploded view)
z/OS UNIX System Services User's Guide
SA23-2279-00
Abstract for UNIX System Service User's Guide
z/OS Version 2 Release 1 summary of changes
The z/OS shells
An introduction to the z/OS shells
About shells
Shell commands and utilities
The locale in the shells
Daemon support
Running an X-Window application
The shell user
Security
Accessing the shells — the choices
Terminal emulators
Interoperability between the shells and MVS
Parallels between the MVS environment and the shell environment
Programming for everyday tasks
Editing
Job control
Background jobs
Programming
Debugging
Data management
OMVS, a 3270 terminal interface to the z/OS shell
Differences from a UNIX or AIX environment
Invoking the shell
Changing options on the OMVS command
Understanding the shell screen
Working in line mode
Why isn't your output displayed on the screen?
Determining function key settings and the escape character
The function key functions
The escape character
Entering a shell command
Customizing the variant characters on your keyboard
Entering a long shell command
Entering a shell command from TSO/E
Interrupting a shell command
Typing escape sequences in the shell
Suppressing the newline character
Keyboard remapping
Determining your session status
Scrolling through output
Using function keys or subcommands
Using cursor scrolling
Running a subcommand
Switching to subcommand mode
Using multiple sessions
Starting sessions
Switching between sessions
Customizing the OMVS interface
An example of customizing the OMVS command
The alarm setting (ALARM | NOALARM)
Autoscrolling (AUTOSCROLL | NOAUTOSCROLL)
The character conversion table (CONVERT)
Double-byte character set support (DBCS | NODBCS)
Debugging for the OMVS command (DEBUG)
Giving an application control of the command line (ECHO | NOECHO)
Ending 3270 pass-through mode (ENDPASSTHROUGH)
The escape character (ESCAPE)
Controlling the size of the output scroll buffer (LINES)
Function key settings (PFn)
Displaying the function key settings (PFSHOW | NOPFSHOW)
Specifying Language Environment runtime options (RUNOPTS)
Multiple sessions (SESSIONS)
The shared TSO/E address space (SHAREAS | NOSHAREAS)
Controlling data recorded in the debug data set (WRAPDEBUG)
Performing TSO/E work or ISPF work after invoking the shell
Entering a TSO/E command from the z/OS shell
Switching to TSO/E command mode
ftp or telnet from TSO
Exiting the shell
Getting rid of a hung application
Using a double-byte character set (DBCS)
Single-byte restrictions
The asynchronous terminal interface to the shells
ASCII-EBCDIC translation
Using rlogin to access the shell
Using telnet to access the shell
Using Communications Server login to access the shell
The shell session
Entering a shell command
Interrupting a shell command
Using multiple sessions
Using a double-byte character set (DBCS)
Standard shell escape characters
Customizing the z/OS shell
Customizing your .profile
Quoting variable values
Changing variable values dynamically
Understanding shell variables
Customizing your shell environment: The ENV variable
Customizing the search path for commands: The PATH variable
Adding your working directory to the search path
Checking the search path used for a command
Customizing the FPATH search path: The FPATH variable
Customizing the DLL search path: The LIBPATH variable
Improving the performance of shell scripts
Changing the locale in the shell
Advantages of a locale compatible with the MVS code page
Customizing for a locale not based on code page IBM-1047
Advantages of a locale generated with code page IBM-1047
Changing the locale setting in your profile
Examples: Changing locale
The LC_SYNTAX environment variable
Limitations
The LOCPATH environment variable
Customizing the language of your messages
Setting your local time zone
Building a STEPLIB environment: The STEPLIB environment variable
Restrictions on STEPLIB data sets
Setting options for a shell session
Exporting variables
Controlling redirection
Preventing wildcard character expansion
Displaying input from a file
Running a command in the current environment
Displaying current option settings
Customizing the tcsh shell
Understanding the startup files
Quoting variable values
Changing variable values dynamically
Understanding shell variables
Customizing your shell environment: The .tcshrc file
Customizing the search path for commands: The PATH variable
Adding your working directory to the search path
Checking the search path used for a command
Customizing the DLL search path: The LIBPATH variable
Changing the locale in the shell
Advantages of a locale compatible with the MVS code page
Customizing for a locale not based on code page IBM-1047
Advantages of a locale generated with code page IBM-1047
Changing the locale setting in your profile
Examples: Changing locale
The LC_SYNTAX environment variable
Limitations
The LOCPATH environment variable
Customizing the language of your messages
Setting your local time zone
Building a STEPLIB environment: The STEPLIB environment variable
Restrictions on STEPLIB data sets
Setting variables for a shell session
Displaying current option settings
Controlling redirection
Preventing wildcard character expansion
Displaying input from a file
Displaying deletion verification
Files accessed at termination
Working with z/OS shell commands
Specifying shell command options
Specifying options with accompanying arguments
Help for shell command usage
Understanding standard input, standard output, and standard error
Redirecting command output to a file
Redirecting input from a file
Redirecting error output to a file
Closing a file
Dumping nontext files to standard output
Setting up an alias for a command
Defining an alias
Redefining an alias for a session
Setting up an alias for a particular version of a command
Using alias tracking
Turning off an alias
Combining commands
Using a semicolon (;)
Using && and ||
Using a pipe
Using substitution in commands
Using the find command in command substitution constructs
Characters that have special meaning to the shell
Characters used with commands
Characters used in file names
Redirecting input and output
Using a special character without its special meaning
The backslash
A pair of single quotation marks (' ')
A pair of double quotation marks (" ")
Using a wildcard character to specify file names
The * character
The ? character
The square brackets [ ]
Retrieving previously entered commands
Retrieving commands from the history file
Editing commands from the history file
Using the retrieve function keys
Command-line editing
Using the vi command editor
Using the emacs command editor
Using record-keeping commands
Finding elements in a file and presenting them in a specific format
Timing programs
Using the passwd command
Switching to superuser or another ID
Using the whoami command
Running a TSO/E command
Using the tso command
Using the tsocmd command
Using the man command to get online help
Shell messages
Working with tcsh shell commands
Specifying shell command options
Specifying options with accompanying arguments
Help for shell command usage
Understanding standard input, standard output, and standard error
Redirecting command output to a file
Redirecting input from a file
Redirecting error output to a file
Dumping nontext files to standard output
Setting up an alias for a command
Defining an alias
Arguments in aliases
Redefining an alias for a session
Setting up an alias for a particular version of a command
Turning off an alias
Combining commands
Using a semicolon (;)
Using && and ||
Using a pipe
Using substitution in commands
Using the find command in command substitution constructs
Characters that have special meaning to the shell
Characters used with commands
Characters used in file names
Redirecting input and output
Using a special character without its special meaning
The backslash
A pair of single quotation marks (' ')
A pair of double quotation marks (" ")
Using a wildcard character to specify file names
The * character
The ? character
The square brackets [ ]
Retrieving previously entered commands
Retrieving commands from the history file
Editing commands from the history file
Using the retrieve function keys
Command-line editing
Using the vi command editor
Using the emacs command editor
Using file name completion
Using record-keeping commands
Finding elements in a file and presenting them in a specific format
Timing programs
Using the passwd command
Switching to superuser or another ID
Using the whoami command
Running a TSO/E command
Using the tso command
Using the tsocmd command
Online help
Using the man command
Shell messages
Writing z/OS shell scripts
Running a shell script
Using the magic number
Using TSO/E commands in shell scripts
Using variables
Creating a variable
Calculating with variables
Exporting variables
Associating attributes with variables
Displaying currently defined variables
Using positional parameters — the $N construct
Using quotation marks to enclose a construct in a shell script
Using parameter and variable expansion
Using special parameters in commands and shell scripts
Using control structures
Using test to test conditions
The if conditional
The while loop
The for loop
Combining control structures
Using functions
Autoloading functions
Writing tcsh shell scripts
Running a shell script
Using the magic number
Using TSO/E commands in shell scripts
Using variables
Creating a shell variable
Calculating with variables
Setting environment variables
Using positional parameters — the $N construct
Using quotes to enclose a construct in a shell script
Using parameter and variable expansion
Using special parameters in commands and shell scripts
Using control structures
The if conditional
The while loop
The foreach loop
Combining control structures
Using job control in the shells
Running several jobs at once (foreground and background)
Starting a job in the background with an ampersand (&)
Moving a job to the background
Moving a job to the foreground
Setting up job tracing
Checking the status of jobs
Using the jobs command
Using the ps command
Canceling a job
Canceling a foreground job
Canceling a background job
Stopping and resuming a job
Stopping a foreground job
Stopping a background job
Resuming a stopped job
Delaying a command
Exiting the shell with background jobs running
Changing the default in the z/OS shell
Comparison of shell background jobs and MVS batch jobs
Using z/OS UNIX from batch, TSO/E, and ISPF
JCL support for z/OS UNIX
The PATH keyword
The DSNTYPE keyword
Using the ddname in an application
The fopen() function
The OPEN macro
Specifying a ddname in the JCL
Using the submit command
The BPXBATCH utility
Aliases for BPXBATCH
BPXBATSL
BPXBATA2 and BPXBATA8
Defining standard input, output, and error streams for BPXBATCH
Guidelines for defining stdin, stdout, and stderr
Ways to define stdin, stdout, and stderr
Passing environment variables to BPXBATCH
Guidelines for defining STDENV
Ways to define STDENV
Example: Setting up code page support in a STDENV file
_BPX_BATCH_SPAWN and _BPX_BATCH_UMASK environment variables
Passing parameter data to BPXBATCH
Guidelines for defining STDPARM
Ways to define STDPARM
Invoking BPXBATCH in a batch job
Example: Running a shell script in batch
Example: Running a shell command in batch
Example: Running a z/OS UNIX executable file or REXX exec in batch
Invoking BPXBATCH from the TSO/E environment
OSHELL: Running a shell command from the TSO/E READY prompt
Using TSO/E REXX for z/OS UNIX processing
Using the ISPF shell
Invoking the ISPF shell
Working in the ISPF shell
Using the online help facility
Performance: Running executable files
Improving shell script performance
Communicating with other users
Using mailx to send and receive mail
Steps for sending mail to another user
Sending mail to a distribution list
Sending a message to an MVS operator
Receiving mail from other users
Replying to mail
Saving and deleting mail
Ending the mailx program
Using write to send a message or a file
Sending a message: An example
Ending a message
Sending a file
Using talk for an online conversation
Beginning a conversation: An example
Viewing the conversation
Using wall to broadcast messages
Controlling messages and online conversations
Using the UUCP network
Transferring a file to a remote site
Using uucp to transfer files
Using uuto to transfer files
Transferring multiple files to a remote site
Transferring a file to the local public directory
Notification of transfer
Permissions
Transferring a file from a remote site
Checking a file's transfer status
Working with your files in the public directory
Running a command on a remote site
Using a remote file as an argument
Using a local file as an argument
Using TSO/E to send or receive mail
Sending a message
Sending a message to a distribution list
Sending a message to an MVS operator
Receiving mail from other users
Receiving messages from other systems
The z/OS UNIX file system
An introduction to the z/OS UNIX file system
The root file system and mountable file systems
Directories
Files
Files not in the file system
Comparison between MVS data sets and the z/OS UNIX file system
Sharing files between LPARs
Executable modules in the file system
Path and path name
Requirement for an absolute path name
Resolving a symbolic link in a path name
Symbolic and external links with a sticky bit
Command differences with symbolic links
Using commands to work with directories and files
Entering a TSO/E command
Using a relative path name on TSO/E commands
Finding the data set that contains a file
Using the ISPF shell to work with directories and files
Using the Network File System feature
External links
Security for the file system
Power failures and the file system
Converting files between code pages
Enhanced ASCII
File tagging in Enhanced ASCII
Unicode Services
File tagging in Unicode Services
Automatic code set conversion
Porting considerations
Working with directories
The working directory
Displaying the name of your working directory
Changing directories
Using notations for relative path names
Dot notation
Tilde notation
Example
Creating a directory
Removing a directory
Listing directory contents
Comparing directory contents
Finding a directory or file
Working with files
Using an editor to create a file
Naming files
Processing in uppercase and lowercase
Deleting a file
Deleting files over a certain age
Identifying a file by its inode number
Creating links
Creating a hard link
Creating a symbolic link
Creating an external link
Deleting links
Renaming or moving a file or directory
Comparing files
Sorting file contents
Using sorting keys — an example
Counting lines, words, and bytes in a file
Searching files by using pattern matching
Patterns
Regular expressions
Browsing files
Browsing files without formatting
Browsing files with formatting
Simultaneous access to a file
Backing up and restoring files: options
Backing up and restoring files from the shell
Backing up a complete directory into an MVS data set
Restoring a complete directory from an MVS data set
Viewing the contents of an archive
Converting between code pages
Appending to an existing archive
Backing up selected files by date
Listing process IDs of processes with open files
Handling security for your files
Default permissions set by the system
Changing permissions for files and directories
Using a symbolic mode to specify permissions
Using octal numbers to specify permissions
Position 1
Positions 2, 3, and 4
Using the sticky bit on a directory to control file access
Auditing file access
Displaying file and directory permissions
Setting the file mode creation mask
Changing the owner ID or group ID associated with a file
Temporarily changing the user ID or group ID during execution
Displaying extended attributes
Using access control lists (ACLs) to control access to files and directories
Setting up ACL support
Editing files
Using ISPF to edit a z/OS UNIX file
Using the vi screen editor
Basic principles
A simple vi session
Adding text
Moving the cursor up and down the screen
Moving up and down through a file
Moving the cursor on the line
Moving to sentences and paragraphs
Deleting text
Changing text
Undoing a command
Saving a file
Searching for strings
Searching backwards through a file
Case-sensitive searching
Special search characters
Moving text
Copying text
Other vi features
Message: vi/ex edited file recovered
Using the TMP_VI environment variable
Stopping the mail messages
Deleting the old mail messages
Using the ed editor
Creating and saving a text file
Editing an existing file
Identifying line numbers and changing your position in the buffer
Changing position using numbers
Changing position using a search string (regular expression)
Appending one file to another
Displaying the current line in the edit buffer
Changing a character string
Inserting text at the beginning or end of a line
Deleting lines of text
Changing lines of text
Inserting lines of text
Copying lines of text
Moving lines of text
Undoing a change
Entering a shell command while using ed
Ending an ed edit session
Default permissions
Using sed to edit a z/OS UNIX file
Printing files
Formatting files for online browsing or printing
Printing requests in shell scripts
Printing with the lp command
Printing with TSO/E commands
Checking the status of print jobs
Copying data between the z/OS UNIX file system and MVS data sets
Copying data using z/OS shell commands
Copying data using TSO/E commands
Copying a sequential data set or PDS member into a z/OS UNIX file
Using cp to copy a sequential data or PDS member into a z/OS UNIX file
Using OPUT and OCOPY to copy a PDS member, a PDSE member, or a sequential data set
Using OPUT
Example: Using OPUT with a PDSE member
Example: Using OPUT with a sequential data set
Using OCOPY
Example: Using ALLOCATE and OCOPY
Example: Using JCL and OCOPY
Copying a PDS or PDSE to a z/OS UNIX directory
Using cp to copy a PDS to a z/OS UNIX directory
Using OPUTX to copy a sequential data set or members of a PDS or PDSE
Example: Using OPUTX with a PDSE
Copying an MVS VSAM data set to a z/OS UNIX file
Copying a z/OS UNIX file into a sequential data set or PDS member
Using cp to copy a z/OS UNIX file into a sequential data set or PDS member
Using OGET and OCOPY to copy a file into a sequential data set or a PDS member
OGET
Example: Using OGET with a PDSE member
Example: Using OGET with a sequential data set
OCOPY
Example: Using ALLOCATE and OCOPY
Example: Using JCL and OCOPY
Copying z/OS UNIX files into a PDS or PDSE
Using cp to copy z/OS UNIX files into a PDS or PDSE
Using OGETX to copy files into a PDS or PDSE
Example: Using OGETX with a PDSE
Copying files within the z/OS UNIX file system
Copying an MVS data set into another MVS data set
Example: Using ALLOCATE and OCOPY
Example: Using JCL and OCOPY
Copying executable modules between MVS data sets and the z/OS UNIX file system
Using cp to copy executables between MVS and z/OS UNIX
Using TSO/E commands and JCL to copy executables
Copying an executable module from a PDSE
Copying an executable module from a PDS
Example: Using JCL to copy from a PDS to the file system
Copying an executable module from the file system
Example: Using JCL to copy from the file system to a PDS
Copying data: Code page conversion
Single-byte data
Double-byte data
Example: Using the iconv shell utility with MBCS data
Transferring files between systems
File transfer directly to or from z/OS UNIX
Transferring files using File Transfer Protocol (FTP)
Transferring files using the Network File System feature
Transferring files using the SEND and RECEIVE programs
Transferring files using the File Transfer, Access, and Management Function
File transfer using MVS data sets
Transferring files into the z/OS UNIX file system
Transferring files to the workstation
Transporting an archive file on tape or diskette
Putting an archive file into the file system
Step 1. Transferring the archive file to a data set
Step 2. Copying the file from a data set into a file system
Sending an archive file to others
Step 1. Create an archive file for multiple files
Step 2. Copy the file from the file system to a data set
Step 3. Transfer the archive file to a tape or diskette
Advanced vi topics
Editing options
Setting tab stops
Using abbreviations
Other editing options
Setting up an editing options command file
Editing several files
Combining files
Editing program source code
Controlling indention
Searching for opening and closing brackets
Making substitutions
Specifying a range of lines to change
Determining line numbers
Checking as you substitute
Using awk
Data files
Records
Fields
The shape of a program
Simple patterns
Using blanks and horizontal tabs
Applying more than one instruction
Assigning values to variables
String values
Numeric values
Using the print action for output
Running awk programs
The awk command line
Program files
Sources of data
Operators
Comparison operators
Arithmetic operators
Operation ordering
Compound assignments
Increment and decrement operators
Matching operators
Multiple-condition operators
Regular expressions
Pattern ranges
Using special patterns
Built-in variables
Built-in numeric variables
Built-in string variables
Statements and loops
The if statement
The while loop
The for loop
The next statement
The exit statement
Functions
Arithmetic functions
String manipulation functions
User-defined functions
Passing an array to a function
The Getline function
Running system commands
Controlling awk output
Formatting the output
Placeholders
Escape sequences
Code page conversion when the shell and MVS have different locales
Customizing the variant characters on your keyboard
Using the CONVERT option on the OMVS command
When do you need to convert between code pages?
Methods for converting data
The POSIX portable file name character set
The POSIX portable character set
Escape sequences for a 3270 keyboard
Escape sequences for portable characters not on your keyboard
Escape sequences for control characters
Escape sequences unique to a conversion table
BPXFX100 conversion table
BPXFX111 and BPXFX211 conversion tables
BPXFX437, BPXFX450, BPXFX471, BPXFX473, BPXFX477, BPXFX478, BPXFX480, BPXFX484, BPXFX485, BPXFX497 conversion tables
Locale objects, source files, and charmaps
Copyright IBM Corporation 1990, 2014