Zos Unix
Zos Unix
process group
Copyright 2002 by Steven H. Comstock 103 UNIX
The UNIX Program Management Model, p.4.
When a process creates another process, the creating process is
called the parent process, the created process is called the child
process
A process creates a child process using the fork() service
Every process has a Parent Process ID (PPID) which identifies
its parent process
Copyright 2002 by Steven H. Comstock 104 UNIX
The UNIX Program Management Model, p.5.
When a user logs in to a UNIX system, the login process ...
Creates a pseudo-terminal (also ptty or, sometimes, pTTY)
This provides a focus for terminal input and output for the
current session
A pseudo-terminal is used because UNIX supports multiple
sessions per terminal, so each session will get its own
pseudo-terminal
Establishes links to the ptty: file descriptors 0, 1, and 2 are
tied to files known as stdin, stdout, and stderr, respectively
A file descriptor is a UNIX handle to relate to an open file;
details beyond the scope of this document
Creates a process (allocates storage and sets initial values
for environment variables and options)
Runs a profile script (this sets user-specific environment
variables and options; these will override any system level
default values for same-named variables and options)
The initial shell is called a login shell because it runs the
profile script; subsequent sub-shells (shells invoked from the
current shell) do not normally run the profile
Loads a shell program which reads from stdin, waiting for
commands from the user
Copyright 2002 by Steven H. Comstock 105 UNIX
The UNIX Program Management Model, p.6.
A shell, as mentioned before, is a command processor
It accepts a command from the user
Then it finds the command (if it is a built-in command, just
invoke the code; otherwise look in the PATH to find the
program or script) and runs it
Each non-built-in command is run in a separate process
If the command being run is a script, it may contain
invocations of shell commands, subcommands, or further
programs or scripts
The shell can pass parameters to the invoked command, doing
variable substitution as needed
Normally, any "printed" (usually displayed) output from a
command goes to stdout, which is usually tied to the terminal
Similarly, any error messages go to stderr, which is also usually
tied to the terminal
If a command requires user input, by default it gets it from stdin,
which is usually the keyboard
Copyright 2002 by Steven H. Comstock 106 UNIX
The UNIX Program Management Model, p.7.
If a command is a shell built-in command, the command is
executed in the shells environment
But if the command is not a built-in, the shell creates a new
process to run the command in
Pictorially ...
Notice that running a command in a separate process protects
the invoking process from damage
For example, environment variables in the parent process are
inherited by the child process, but if the child process
changes the values, the new values are not reflected back in
the parents address space
ptty
process running the shell
process for running command
stdin
stdout
stderr
shell
command
user at
workstation
process group(s)
Copyright 2002 by Steven H. Comstock 107 UNIX
The UNIX Program Management Model, p.8.
A session is a collection of process groups established for job
control purposes
Every session has an identifier, the session ID (SID)
Each process group is a member of exactly one session
Each process in a process group is considered to be a
member of the session
The process that creates a session is the session leader; once
the session leader process ends, no other process in the
session can communicate with the ptty
One process group in a session may be the foreground
process group, all other process groups in the session are
background process groups
A session may have a controlling terminal; if so, every process
in the session has that terminal as its controlling terminal
process group
process group
process group
session
ptty
controlling
terminal
Copyright 2002 by Steven H. Comstock 108 UNIX
The UNIX Program Management Model, p.9.
By issuing a setpgid() command, a child process can start its own
process group in the same session
By issuing a setsid() command, a process starts a new session;
the process issuing this command will be the session leader of
the new session and no longer a member of the old session
A process relinquishes its controlling terminal when it
creates a new session
Other processes remaining in the old session that had that
controlling terminal continue to have it
Copyright 2002 by Steven H. Comstock 109 UNIX
The UNIX Program Management Model, p.10.
So initially, at login, there is one session with a single process
group containing a single process running a single thread
If that process does a fork(), it creates a child process in the
same process group
If it does multiple fork()s, you have multiple processes in the
same process group
If any child process does a fork(), its children, too, belong to
the original process group
When a process issues a setpgid(), that creates a new process
group with a single process, in the current session
From now on, if that process issues fork(), these children
(and their descendants) belong to the new process group
If a process issues setsid(), that starts a new session with a
single process group containing a single process running a
single thread
The new session starts out without a controlling terminal
Whether it is possible to obtain a controlling terminal is
implementation dependent, but if it is possible it is done by
issuing open() to a terminal device by the process that is the
session leader
Copyright 2002 by Steven H. Comstock 110 UNIX
The UNIX Program Management Model, p.11.
You may enter a string of commands connected using various
special symbols, for example (we only show three commands
here, but it can be any number):
command ; command ; command
execute the commands one after the other
command || command || command
run the second command only if the first command fails; run
the third command only if the second command fails
command && command && command
run the second command only if the first command is
successful; run the third command only if the second
command is successful
command && command || command
run the second command only if the first command is
successful; run the third command only if the second
command fails
command || command && command
run the second command only if the first one fails; run the
third command only if the second command is successful
Copyright 2002 by Steven H. Comstock 111 UNIX
The UNIX Program Management Model, p.12.
You can code a command string including the use of pipes, for
example:
command | command | command
run the first command, having output of that command
become input to the second command
then run the second command, having output of that
command become input to the third command
then run the third command
This works because every command uses stdin for input and
stdout for output, so the pipe tells UNIX (or the shell, more
accurately) to send the stdout of one command to the stdin of the
next command
Copyright 2002 by Steven H. Comstock 112 UNIX
The UNIX Program Management Model, p.13.
In all of the situations on the previous two pages, the command
string will be run in the foreground process group, and your
terminal will wait until the last command is done
If you put an ampersand (&) at the end of your command string,
the shell will create a new process group for this command
string and run the string of commands in the background
For example:
command | command | command &
create a background job (process group) to run this series of
commands
You can do this even if you only have one [long running]
command to run
Once you enter the command, the shell sets up the background
job and returns to your foreground process group
Now you can enter more commands, and any background
jobs youve started are running independently of your
foreground work
Copyright 2002 by Steven H. Comstock 113 UNIX
The UNIX Program Management Model, p.14.
Note that a pipelined command string job will set up multiple
processes that run simultaneously, coordinating inputs and
outputs as necessary
That is, the system will not wait for one process to end
before starting the next process
They are all started at once and downstream processes sit
waiting for input from upstream processes
And data is processed and passed on as soon as it is
available
Copyright 2002 by Steven H. Comstock 114 UNIX
The UNIX Program Management Model, p.15.
Instead of always using fork() and creating a new process, there
is an option of using exec()
The exec() service essentially reuses the current process but
runs a different program
Thus saving some of the overhead of creating a whole new
process
The shell will sometimes do this for the last command of a
pipeline, or connected command string, although this is
implementation dependent
Copyright 2002 by Steven H. Comstock 115 UNIX
The UNIX Program Management Model, p.16.
The POSIX standard introduced multi-threading
The ability to take the work of a process and divide it up into
multiple, independently dispatched units of work that run in
paralllel
The central concept here is of a POSIX thread, or pthread
There are three kinds of pthreads described
Heavy weight pthreads - each pthread competes for the CPU
at the same level, independently
Medium weight pthreads - there is a pool of work to be done
on pthreads but only a subset of them will run at one time;
the others must wait until some other running pthread in the
process finishes
Light weight pthreads - the system dispatching is not
involved here: user code determines what code runs when
There are a large number of services defined for working with
pthreads, includng pthread_create(), which creates a pthread
Copyright 2002 by Steven H. Comstock 116 UNIX
The UNIX Program Management Model, p.17.
The actual implementation details are left to the individual
software developers, recognizing their dispatching routines may
have differing granularity:
Process level only dispatching
Thread level only dispatching
Hybrid dispatching: threads within processes
Copyright 2002 by Steven H. Comstock 117 UNIX
The UNIX File Model: the Hierarchical File System
(HFS)
We spend a little time on HFS here, since it will impact some
notes in the next section
Each UNIX filesystem contains files, directories, and an inode table
Each file is given an inode number, unique within its filesystem
A files inode table entry contains its inode number and
information about the file (location, size, etc.), but not its name
Each file also has a device number (or file serial number), and
the combination of its inode number and device number are
unique throughout all the file systems in the UNIX system the
file is mounted in
We make these distinctions because it is possible for a
remote UNIX system to mount all or part of its filesystem to
appear to belong to the local filesystem
A directory is a file that contains a list of filenames and their
corresponding inode numbers
If a file found in a directory is itself a directory, we say it is a
subdirectory
Copyright 2002 by Steven H. Comstock 118 UNIX
Hierarchical File System (HFS), continued
UNIX supports these kinds of files:
Regular files (for data or programs)
Directories (for other directories and filenames)
Device files (all devices look like files)
Character special files
Block special files
Link files (aliases and pointers to other files)
Hard links
Symbolic links
External links
Pipe files (files used to transport data between programs)
Sockets (used for network communications)
Copyright 2002 by Steven H. Comstock 119 UNIX
Hierarchical File System (HFS), continued
UNIX organizes directories, subdirectories, and files in a
hierarchy, that can be described as an upside-down tree
The top of the hierarchy is called the root and is indicated by
a slash ("/")
The hierarchy of directories and subdirectories looks
something like this:
Each of these directories can have subdirectories which can, in
turn, have subdirectories, and so on
Ultimately you get down to files
Of course, a directory may include both files and
subdirectories
appls opt samples u
usr
tmp service logs local lib krb5 etc dev bin var
/
gtho stnt1 scoms stnt2
Copyright 2002 by Steven H. Comstock 120 UNIX
Paths
The route to get to a file is called the path: the absolute or
relative specification of the location of a file in the hierarchy
A user running a UNIX session is always assumed to be "in"
some directory - the current directory (also: working directory, also
current working directory)
Also, each user has a home directory specified in their profile
in the user database
At login time, the home directory is established as the
current directory
An absolute path always begin with the root directory, for
example: /u/scoms/cbl/cobex01
A relative path begins with the current directory and specifies
subdirectories down to the file
For example if the current directory were /u/scoms then you
could specify cbl/cobex01 to get to the same file as in the
example above
Copyright 2002 by Steven H. Comstock 121 UNIX
Paths, 2
In many situations, you specify a path as a list of directories to
search to find a file, the entries in the list separated by colons (:)
The system performs pathname resolution to resolve a
pathname to a particular file in a file hierarchy
The system searches from entry to entry in your path list in
order to find the file
This search pathname can be set and changed using
commands, although the details are beyond the scope of this
document
For example, you may set your search path to be
/bin:/usr/bin:/usr/etc
Then search will look first in /bin
then in /usr/bin
then in /usr/etc
Copyright 2002 by Steven H. Comstock 122 UNIX
UNI
X
on
z/OS
UNIX System Services
Part 7: UNIX on z/OS
UNIX on z/OS
Dubbing
z/OS Control Blocks for UNIX System Services
Processes
pthreads
Running Under OMVS
The BPXBATCH Utility
z/OS UNIX Control
I/O Issues
Practical Applications
Being Practical
Copyright 2002 by Steven H. Comstock 123 UNIX on z/OS
UNIX on z/OS
z/OS UNIX System Services provide a UNIX environment
which passes the validation tests to be certified as
conforming to the POSIX 1003.2 and XPG4 1995 standards
Users running on z/OS can access UNIX services and files and /
or traditional services and files
Run programs in batch - traditional or under a non-interactive
shell
Run programs and commands, including REXX execs, in
traditional TSO and TSO/ISPF
Interact with the system under traditional TSO READY or
TSO/ISPF
Interact with the system under an interactive shell - from TSO
READY or TSO/ISPF
Note that currently CICS and IMS are explicitly excluded from
using UNIX System Services
Copyright 2002 by Steven H. Comstock 124 UNIX on z/OS
UNIX on z/OS, 2
There are many pieces that collectively support this facility
The security interface, which supports security packages
such as RACF, ACF2, Top Secret, and so on, is used to
supply the user database and group database functions
Groups and users must be defined in a UNIX segment in
order for users to use UNIX System Services
HFS files are supported, for system functions and user
functions
Typically each user will have their own mountable filesystem;
access to HFS files is supported through JCL, commands,
and many utilities
Language Environment
LE provides support for many UNIX capabilities, such as:
environment variables, ability to work with executables with
long names and case-sensitive names, DLL support, locales
support
LE also makes this support available even to programs
that dont use UNIX services
A UNIX kernel address space
Keeps track of all UNIX processes going on and provides
services in support of these processes
Copyright 2002 by Steven H. Comstock 125 UNIX on z/OS
UNIX on z/OS, 3
There are many pieces that collectively support this facility,
continued
TSO commands
For managing HFS constructs (create directories and
subdirectories, for example; MKDIR, MKNOD; MOUNT,
UNMOUNT, OSTEPLIB)
For transferring data between the traditional file structures
and HFS, where possible and appropriate (OCOPY, OGET,
OGETX, OPUT, OPUTX)
For invoking shell scripts, commands, and executable files
(BPXBATCH, OSHELL)
Notice, by the way, that components whose names begin
with the letters "BPX" are, generally speaking, part of
UNIX System Services
To invoke the z/OS shell, which is based on UNIX System V
shell with some features of KornShell (OMVS)
Or you can run the tcsh shell, which is an enhanced
version of the Berkley UNIX C shell called csh
To edit or browse HFS files (OBROWSE, OEDIT)
To provide an ISPF-like interface (the ISPF shell) for doing
support work (ISHELL)
To provide access to online publications (OHELP)
Copyright 2002 by Steven H. Comstock 126 UNIX on z/OS
UNIX on z/OS, 4
There are many pieces that collectively support this facility,
continued
Extensions to REXX to access UNIX services
Two new address environments, SYSCALL and SH, are
available; using SYSCALL commands, you can issue many
UNIX commands from an exec running under a shell, in
batch, or under native TSO
A large set of callable services (hundreds of services), BPX...
routines
These can be called from Assembler programs
(LE-conforming or not) or high level languages
However, the functions these services implement are
often available as part of the C/C++ library, so the C/C++
user would typically use the C/C++ library function, which
will issue the appropriate service call on behalf of the user
But the COBOL or PL/I user who wants to use these
services can call the services directly
Copyright 2002 by Steven H. Comstock 127 UNIX on z/OS
UNIX on z/OS, 5
The objectives of the IBM UNIX System Services development
team are pretty focused:
"The full set of UNIX services are defined and intended for LE
enabled C/C++ programs"
But because so much of the UNIX capability is embedded in LE ...
And because all high level languages compiled with
supported compilers generate LE-enabled code
Which allows, for example, COBOL, PL/I, and
[LE-conforming] Assembler programs to call most C library
functions directly (that is, there is no need for a whole C
subroutine)
And because the non-LE UNIX services are available as
callable subroutines to just about anybody ...
The full set of UNIX services is pretty much available to all
programs and programmers
And because all programs and scripts are, ultimately, running
under z/OS ...
The full set of z/OS capabilities is available to all programs
and programmers
Copyright 2002 by Steven H. Comstock 128 UNIX on z/OS
UNIX on z/OS, 6
So you can create programs that ...
Are not LE-enabled and do not use UNIX services (Assembler
or non-supported compilers only)
Are LE-enabled and do not use UNIX services (LE-enabled
Assembler and all supported high level languages)
Are not LE-enabled but do use UNIX services (Assembler or
non-supported compilers only)
Are LE-enabled and do use UNIX services (LE-enabled
Assembler and all supported high level languages)
Programs that use UNIX System Services may or may not run
under a shell program (for example, they may run in batch or
under TSO)
However, traditional UNIX programs expect to be running
under a shell
Programs can access data on the HFS or in traditional z/OS files
Copyright 2002 by Steven H. Comstock 129 UNIX on z/OS
Dubbing
When a program is run in z/OS, either batch or TSO [with or
without ISPF], it starts out like any traditional program in a
traditional z/OS address space
If the program is LE-enabled, LE initialization takes place and
the program now has access to all the LE services weve
talked about and alluded to
An LE thread ID is assigned to the task, which is still a z/OS
task
If the program calls no UNIX services, then there is no new
behavior
Copyright 2002 by Steven H. Comstock 130 UNIX on z/OS
Dubbing, 2
But the first time the program calls any z/OS UNIX service,
the call is sent to some routine in the UNIX kernel address
space
At this point, the task becomes dubbed, which means the
UNIX kernel is now aware of the task as a UNIX thread
As a minimum, dubbing causes z/OS UNIX to ...
Obtain the user UID and the GID for the initial group the
user belongs to, and locate the initial directory
Note that if there is no UNIX segment defined for the
user in the security software, the request will fail
Assign a UNIX thread ID (which will not be the same as
the LE thread ID)
Assign a UNIX PID (Process ID), PGID (Process Group
ID), and PPID (Parent Process ID)
Build some new control blocks off the TCB (see next page)
Note that this does not mean the program is running under a
shell, it just means the UNIX kernel can now respond to
kernel requests because the requestor has various IDs
If a batch program is LE-enabled and has an LE-run-time parm
that includes POSIX(ON), the LE thread starts out dubbed, with
the LE thread ID the same as the UNIX thread ID
Still, no shell is provided automatically
Copyright 2002 by Steven H. Comstock 131 UNIX on z/OS
z/OS Control Blocks For UNIX System Services
Many of the control blocks for UNIX type entities (such as
directories, process groups, etc.) are maintained in the UNIX
kernel address space
But these control blocks are maintained in the programs address
space, off the Secondary TCB:
OTCB - Open systems Task Control Block
Holds UID and GID, points to kernel services and lots of
other places, including the THLI control block
THLI - THread Level Information
Holds flags and pointers to UNIX thread related information,
including the address of the PRLI control block
PRLI - PRocess Level Information
Contains PID, flags, process return code, other pointers
Copyright 2002 by Steven H. Comstock 132 UNIX on z/OS
z/OS Control Blocks For UNIX System Services, 2
So, visually, the connections are something like this:
Contents related control
blocks (RB chain, CDE,
XTLST, LLE)
LE related control blocks
(CAA, EDB, RCB, PCB)
TCB
PRLI
THLI
OTCB
STCB
Copyright 2002 by Steven H. Comstock 133 UNIX on z/OS
Processes
A z/OS UNIX process maps, roughly, to a z/OS address space
We say "roughly" because
In certain circumstances, you can request processes to share
an address space
Address space creation is expensive in z/OS (in terms of
processing time and resources)
so you can gain some performance benefits by sharing
an address space among two or more processes
but you lose exact UNIX behavior replication
Also, in z/OS UNIX, every process must have at least one
thread (task), in order to match the z/OS dispatching paradigm
But the minimum, strict UNIX model does not require
threads per se
Multi-threading is a POSIX component
Notice the implication, then: a process group is a collection of
address spaces
This is correct; the kernel keeps the relationships in mind
and enables cross-process work (such as sharing the
controlling terminal) to work as expected in a native UNIX
environment
Copyright 2002 by Steven H. Comstock 134 UNIX on z/OS
pthreads
z/OS UNIX uses a hybrid dispatching scheme, so pthreads are
implemented this way
Heavy weight pthreads become sub-tasks in the process
address space
Medium weight pthreads run under a special subtask called
the Initial Pthread Task (IPT)
The IPT attaches medium weight threads as subtasks to itself
When the maximum allowed number of pthreads have been
attached, the IPT waits until one finishes before dispatching
another
Light weight pthreads are not supported
But that is defined to be user-controlled dispatching anyway
One of the implications is that you cannot issue fork() from a
process that is using (or has used during its run) any pthread
work
It is, at best, ambiguous how to copy the task structure in a
new, fork()-ed address space in this situation
Copyright 2002 by Steven H. Comstock 135 UNIX on z/OS
Running Under OMVS
When you issue the OMVS command from TSO or ISPF 6, OMVS
is attached as any other TSO command processor - a subtask
The OMVS command processor initializes an LE environment,
requests dubbing, and attaches the z/OS shell program
OMVS has a UNIX thread ID and an LE thread ID, and they
are the same value
OMVS itself does not have any environment variables
The shell program runs any initialization script(s) that are
called for, to establish options and set environment variables,
and waits for user input
This is a login, interactive shell
The OMVS command has an optional operand that allows you to
establish multiple sessions when you start up
In which case, multiple process groups are set up
Copyright 2002 by Steven H. Comstock 136 UNIX on z/OS
Running Under OMVS, continued
As you issue commands, the shell creates processes to run
those commands in
Or shares the address spaces with multiple processes if you
are set up that way
Basically, the shell runs a fork(), which creates a duplicate
address space, followed by an exec() service request, which
replaces the shell program by the program that runs the
command
An alternative is spawn(), which is a fork() and exec() in a single
command
spawn() is part of POSIX.4b standard; a variation, spawn2() is
part of the XPG4.2 standard
Whether spawn() will try to create a new process in the
current address space is determined by the setting of the
environment variable _BPX_SHAREAS
The ability to create multiple processes in a single address
space is probably unique to the z/OS and OS/390 versions of
UNIX, so expecting this behavior in a script or program will
be non-portable
Note that spawn() will go ahead and create a new address
space if, for example, there is not enough virtual storage in
the current address space
Copyright 2002 by Steven H. Comstock 137 UNIX on z/OS
Running Under OMVS, continued
At this point, the OMVS user gets a sense that they are sitting at
a UNIX terminal
Commands and responses are pretty much the same as one
expects from any other UNIX terminal
Well, there are some exceptions
Some of these are extensions (access to z/OS files for
instance)
Some of these are behaviors that are common among
UNIX users but not part of the standard (maybe not even
written down formally)
z/OS UNIX System Services is new at the UNIX game, so
its still growing into it
Copyright 2002 by Steven H. Comstock 138 UNIX on z/OS
The BPXBATCH Utility
A major component supplied with z/OS UNIX is the program
called BPXBATCH
This utility allows you to run a program under a
(non-interactive) UNIX shell
In batch
From TSO or TSO/ISPF
From REXX execs
From a program
Copyright 2002 by Steven H. Comstock 139 UNIX on z/OS
z/OS UNIX Control
When an address space is created using fork(), we say the
address space is dubbed
Recall that a task within an address space is dubbed,
whether or not the address space is dubbed, if a program
running under the task invokes a call to a BPX service or was
started with the LE run-time option POSIX(ON)
Dubbed address spaces are seen by job control and the system
operator as having a jobname inherited from the process that
fork()ed the address space
When the process ends, the Workload Manager keeps the
address space around for 30 minutes before cleaning up and
removing the address space
In this way, if another process comes along needing to be
run, it can use the already existing one and save time and
computing resources
During the time of non-use, the address space has a name of
BPXAS
Copyright 2002 by Steven H. Comstock 140 UNIX on z/OS
I/O Issues
One area that is quite different between traditional z/OS and UNIX
styles of working is the management of files and buffers
To work with files, a z/OS program traditionally creates a DCB or
ACB to represent the file; in this control block is a ddname field
At step allocation time, the data set is located and allocated
to the job step on a shared or exclusive basis
At open time, the OPEN routines look through the JCL
supplied with the step for a ddname that matches, and the
connection is made to an external file
OPEN carves buffers for the file out of the address space the
program is running in
UNIX uses external variables to hold file names
Furthermore, UNIX programs generally use file descriptors to
represent files; in z/OS UNIX, a file descriptor is simply a
fullword binary integer
The kernel manages file descriptors, and all buffers are
managed by the kernel
Allowing, potentially at least, a higher degree of file sharing
between processes
Copyright 2002 by Steven H. Comstock 141 UNIX on z/OS
Practical Applications
So how do we expect programmers and developers to use z/OS
UNIX System Services?
Porting existing applications from other UNIX systems
Creating new UNIX applications to port to other UNIX systems
Developing new UNIX applications to run on the mainframe
Most likely Internet-based applications
With the added strengths of
accessing centrally stored corporate data
Using existing, already programmed business rules for
your specific business
Extending existing applications to take advantage of features
and capabilities unique to UNIX (or at least not usually found
on z/OS), such as
grep kinds of searching capabilities
Pipes (without the extra charge for IBMs BatchPipes program)
DLLs (actually available without using UNIX)
More natural use of multi-threading / multi-tasking
Copyright 2002 by Steven H. Comstock 142 UNIX on z/OS
Being Practical
It doesnt make sense to use UNIX services where they are not
needed or appropriate
Continue to develop, maintain, and extend applications where
their natural environment draws on traditional mainframe
strengths or that have already captured the business needs
for the company
Large, long running batch jobs with output spinoff and step
restart and checkpoint / restart capabilities
High volume online transaction processing
High data bandwidth applications that access very large
databases
Application development tools
Yes, you can use UNIX tools such as the vi editor, but
most mainframe developers are simply going to remain
more productive with the TSO/ISPF-based tools
The reality is that it is not an "either" / "or" situation, but an
environment where customers and users have an astoundingly
wide range of useful options to choose from
Copyright 2002 by Steven H. Comstock 143 UNIX on z/OS
This page intentionally left almost blank.
Copyright 2002 by Steven H. Comstock 144 UNIX on z/OS
Index
Special characters
/ . . . . . . . . . . . . . . . . . . . . . 120
64-bit addressing . . . . . . . . . . . . . . 22
_BPX_SHAREAS environment variable . . 137
A
Absolute path . . . . . . . . . . . . . . . 121
ACF2 . . . . . . . . . . . . . . . . . . . . 125
Address space . . . . . . . . . . . . . . . 14-19, 21-30, 36, 43, 49-50, 52-53, 101, 132-135, 137, 140
Alias . . . . . . . . . . . . . . . . . . . . 33-34
Alternate entry point . . . . . . . . . . . . 33-34
Alternate primary entry point . . . . . . . . 33-34
Arguments . . . . . . . . . . . . . . . . . 67
ASCB . . . . . . . . . . . . . . . . . . . . 27
ASCB control block . . . . . . . . . . . . 51, 53, 132
ASCRE - Address Space Create . . . . . . 29
ASID . . . . . . . . . . . . . . . . . . . . 27
Attach . . . . . . . . . . . . . . . . . . . 50, 52, 56, 62, 70-71
B
Background . . . . . . . . . . . . . . . . 75, 108, 113
Batch . . . . . . . . . . . . . . . . . . . . 48-49, 72, 82
Berkeley C shell . . . . . . . . . . . . . . 126
Binder . . . . . . . . . . . . . . . . . . . - See Program binder
BookManager . . . . . . . . . . . . . . . 20
BPXBATCH TSO command . . . . . . . . 126
BPXBATCH Utillity . . . . . . . . . . . . . 139
C
CAA control block . . . . . . . . . . . . . 88-89
CALL . . . . . . . . . . . . . . . . . . . . 54-56, 58-62, 64-66
CDE control block . . . . . . . . . . . . . 38-39, 41, 53, 57, 88-89, 132-133
145
Index
C, continued
CEEBINIT . . . . . . . . . . . . . . . . . 88-89
CEEPLPKA . . . . . . . . . . . . . . . . 88-89
Child process . . . . . . . . . . . . . . . . 104, 107, 109-110
CICS . . . . . . . . . . . . . . . . . . . . 124
CLIST . . . . . . . . . . . . . . . . . . . 75
Command processor . . . . . . . . . . . . 78
Command string . . . . . . . . . . . . . . 111-115
Condition . . . . . . . . . . . . . . . . . . 91
Condition handling . . . . . . . . . . . . . 91
Contents management . . . . . . . . . . . 52
Context for running programs . . . . . . . 36-45, 48-72, 74-82, 84-91, 132-133, 136
Control block
RBs . . . . . . . . . . . . . . . . . . . 40
Control blocks
ASCB . . . . . . . . . . . . . . . . . . 51, 53, 132
CAA . . . . . . . . . . . . . . . . . . . 88-89
CDE . . . . . . . . . . . . . . . . . . . 38-39, 41, 53, 57, 88-89, 132-133
EDB . . . . . . . . . . . . . . . . . . . 88-89
LLE . . . . . . . . . . . . . . . . . . . 39, 41, 53, 57, 88
OTCB . . . . . . . . . . . . . . . . . . 132-133
PCB . . . . . . . . . . . . . . . . . . . 88-89
PRB . . . . . . . . . . . . . . . . . . . 40-41, 53, 89, 132-133
PRLI . . . . . . . . . . . . . . . . . . 132-133
RCB . . . . . . . . . . . . . . . . . . . 88-89
STCB . . . . . . . . . . . . . . . . . . 40-41, 51, 53, 132-133
SVRB . . . . . . . . . . . . . . . . . . 40
TCB . . . . . . . . . . . . . . . . . . . 40-41, 51, 53, 89, 132-133
THLI . . . . . . . . . . . . . . . . . . 132-133
XTLST . . . . . . . . . . . . . . . . . 37-38, 41, 53, 57, 88-89, 132-133
Controlling terminal . . . . . . . . . . . . 108-110
Current directory . . . . . . . . . . . . . . 121
D
Data space . . . . . . . . . . . . . . . . . 18-19
Daughter task . . . . . . . . . . . . . . . 56, 70-71
DB2 . . . . . . . . . . . . . . . . . . . . 18, 30
DCE . . . . . . . . . . . . . . . . . . . . 20
DELETE . . . . . . . . . . . . . . . . . . 56, 59-61
DETACH . . . . . . . . . . . . . . . . . . 71
Device files . . . . . . . . . . . . . . . . . 119
Device number . . . . . . . . . . . . . . . 93, 118
146
Index
D, continued
DFSMSdfp . . . . . . . . . . . . . . . . . 20
Dialog manager . . . . . . . . . . . . . . 79
Directory . . . . . . . . . . . . . . . . . . 93, 118-119
Dispatching . . . . . . . . . . . . . . . . . 43-44, 51, 53, 62, 90, 132-133
DLL . . . . . . . . . . . . . . . . . . . . . 125
DLLs . . . . . . . . . . . . . . . . . . . . 91
Dubbing . . . . . . . . . . . . . . . . . . 130-131, 136, 140
Dump task . . . . . . . . . . . . . . . . . 50-51
Dynamic call . . . . . . . . . . . . . . . . 55-62, 64-66
E
EDB control block . . . . . . . . . . . . . 88-89
Enclave . . . . . . . . . . . . . . . . . . . 87-88, 90-91
Enqueue . . . . . . . . . . . . . . . . . . 45
Entry point . . . . . . . . . . . . . . . . . 33-35, 38, 41, 53
Environment option
noglob . . . . . . . . . . . . . . . . . 102
Environment options . . . . . . . . . . . . 102
Environment variables . . . . . . . . . . . 89, 101-103, 105-107, 136
_BPX_SHAREAS . . . . . . . . . . . . 137
PATH . . . . . . . . . . . . . . . . . . 102, 106
Error handling . . . . . . . . . . . . . . . 68-69, 91
ESPIE . . . . . . . . . . . . . . . . . . . 68-69, 91
ESTAE . . . . . . . . . . . . . . . . . . . 68-69, 91
ESTAI . . . . . . . . . . . . . . . . . . . 70
exec() service . . . . . . . . . . . . . . . 115, 137
Executable . . . . . . . . . . . . . . . . . 52
Executables . . . . . . . . . . . . . . . . 32-45, 53-61, 63-65, 88-89, 91, 101, 125-126, 132-133
Extended architecture . . . . . . . . . . . 16
External link . . . . . . . . . . . . . . . . 119
F
File . . . . . . . . . . . . . . . . . . . . . 93
File serial number . . . . . . . . . . . . . 118
Files . . . . . . . . . . . . . . . . . . . . 72, 118-120, 129, 141
147
Index
F, continued
Filesystem . . . . . . . . . . . . . . . . . 93, 118
Foreground . . . . . . . . . . . . . . . . . 75, 108
fork() service . . . . . . . . . . . . . . . . 104, 110, 115, 135, 137
G
GETMAIN . . . . . . . . . . . . . . . . . 65, 70
Group database . . . . . . . . . . . . . . 100, 125
Group ID . . . . . . . . . . . . . . . . . . 100
H
Hash table . . . . . . . . . . . . . . . . . 91
HFS . . . . . . . . . . . . . . . . . . . . 72, 91, 93, 118-122, 125-126, 129
Home directory . . . . . . . . . . . . . . . 121
I
Identities . . . . . . . . . . . . . . . . . . 98-100
IEEE . . . . . . . . . . . . . . . . . . . . 95
IKJEFT01 . . . . . . . . . . . . . . . . . 74, 82
IMS . . . . . . . . . . . . . . . . . . . . . 30, 124
Initiator . . . . . . . . . . . . . . . . . . . 48-49, 51
Inode number . . . . . . . . . . . . . . . 93, 118
Inode table . . . . . . . . . . . . . . . . . 93, 118
Interrupt . . . . . . . . . . . . . . . . . . 44
IPL . . . . . . . . . . . . . . . . . . . . . 29, 49
IPT - Initial Pthread Task . . . . . . . . . . 135
ISHELL TSO command . . . . . . . . . . 126
ISPF . . . . . . . . . . . . . . . . . . . . 20, 79-82, 126
148
Index
J
JCL . . . . . . . . . . . . . . . . . . . . . 48
JES2 . . . . . . . . . . . . . . . . . . . . 30, 48
JES3 . . . . . . . . . . . . . . . . . . . . 30, 48
Job . . . . . . . . . . . . . . . . . . . . . 48-50
Job (UNIX) . . . . . . . . . . . . . . . . . 113-114
Job step task . . . . . . . . . . . . . . . . 50-51
K
Kernel . . . . . . . . . . . . . . . . . . . 96, 125
Korn shell . . . . . . . . . . . . . . . . . 126
L
Language Environment . . . . . . . . . . 20, 84-87, 90-91
Latches . . . . . . . . . . . . . . . . . . . 45
LE . . . . . . . . . . . . . . . . . . . . . 84-91, 125, 128-131, See Also Language Environment
LINK . . . . . . . . . . . . . . . . . . . . 56, 58, 60, 63
Link files . . . . . . . . . . . . . . . . . . 119
LLE control block . . . . . . . . . . . . . . 39, 41, 53, 57, 88
LOAD . . . . . . . . . . . . . . . . . . . . 56-58, 60-61, 63
Load module . . . . . . . . . . . . . . . . 32, 35
Locks . . . . . . . . . . . . . . . . . . . . 45
Login shell . . . . . . . . . . . . . . . . . 105, 107, 110, 114
Long names . . . . . . . . . . . . . . . . 91, 125
M
Message file . . . . . . . . . . . . . . . . 88-89
MFT . . . . . . . . . . . . . . . . . . . . 11
MKDIR TSO command . . . . . . . . . . . 126
MKNOD TSO command . . . . . . . . . . 126
Mother task . . . . . . . . . . . . . . . . . 56, 70-71
Mount . . . . . . . . . . . . . . . . . . . 118
149
Index
M, continued
MOUNT TSO command . . . . . . . . . . 126
Mutexes . . . . . . . . . . . . . . . . . . 45
MVS . . . . . . . . . . . . . . . . . . . . 14-21
MVS/ESA . . . . . . . . . . . . . . . . . 19-20
MVS/XA . . . . . . . . . . . . . . . . . . 16-18
MVT . . . . . . . . . . . . . . . . . . . . 11-13
N
noglob environment option . . . . . . . . . 102
Nucleus . . . . . . . . . . . . . . . . . . 12, 15
Numbers . . . . . . . . . . . . . . . . . . 8-10
Numeric terms . . . . . . . . . . . . . . . 8-10
O
OBROWSE TSO command . . . . . . . . 126
OCOPY TSO command . . . . . . . . . . 126
OEDIT TSO command . . . . . . . . . . . 126
OGET TSO command . . . . . . . . . . . 126
OGETX TSO command . . . . . . . . . . 126
OHELP TSO command . . . . . . . . . . 126
OMVS TSO command . . . . . . . . . . . 126, 136-138
Open Group, The . . . . . . . . . . . . . 95
open() service . . . . . . . . . . . . . . . 110
OpenEdition . . . . . . . . . . . . . . . . 20
OPUT TSO command . . . . . . . . . . . 126
OPUTX TSO command . . . . . . . . . . 126
OS/360 . . . . . . . . . . . . . . . . . . . 11
OS/390 . . . . . . . . . . . . . . . . . . . 19-21
OS/VS1 . . . . . . . . . . . . . . . . . . 13
OS/VS2 . . . . . . . . . . . . . . . . . . 13
OSHELL TSO command . . . . . . . . . . 126
OSTEPLIB TSO command . . . . . . . . . 126
OTCB control block . . . . . . . . . . . . 132-133
150
Index
P
Parameters . . . . . . . . . . . . . . . . . 67
Parent process . . . . . . . . . . . . . . . 104, 107, 109-110
PATH environment variable . . . . . . . . 102, 106
Pathname resolution . . . . . . . . . . . . 122
Paths . . . . . . . . . . . . . . . . . . . . 121-122
PCB control block . . . . . . . . . . . . . 88-89
PCP . . . . . . . . . . . . . . . . . . . . 11
PID . . . . . . . . . . . . . . . . . . . . . - See Process ID
Pipe . . . . . . . . . . . . . . . . . . . . 112, 114-115
Pipe files . . . . . . . . . . . . . . . . . . 119
Pipes . . . . . . . . . . . . . . . . . . . . 97
POSIX . . . . . . . . . . . . . . . . . . . 20, 95, 124
POSIX threads . . . . . . . . . . . . . . . - See pthread
PRB control block . . . . . . . . . . . . . 40-41, 53, 89, 132-133
Private area . . . . . . . . . . . . . . . . 15, 17, 23, 51
PRLI control block . . . . . . . . . . . . . 132-133
Prmary entry point . . . . . . . . . . . . . 33-34
Process (LE) . . . . . . . . . . . . . . . . 87-88, 90
Process (UNIX) . . . . . . . . . . . . . . 101-117, 131-134, 137
Process group . . . . . . . . . . . . . . . 103, 107-110, 113, 134
Process ID . . . . . . . . . . . . . . . . . 101
Profile
security . . . . . . . . . . . . . . . . . 99
TSO . . . . . . . . . . . . . . . . . . . 99
UNIX . . . . . . . . . . . . . . . . . . 99
Profile script . . . . . . . . . . . . . . . . 105-106
Program . . . . . . . . . . . . . . . . . . 101-102
Program binder . . . . . . . . . . . . . . . 34
Program management . . . . . . . . . . . 101-117
Program object . . . . . . . . . . . . . . . 32, 35
Pseudo-TTY . . . . . . . . . . . . . . . . 105, 107-108
PSW . . . . . . . . . . . . . . . . . . . . 43-44
pthread . . . . . . . . . . . . . . . . . . . 116-117, 135
pthread_create() service . . . . . . . . . . 116-117
ptty, pTTY . . . . . . . . . . . . . . . . . 105, 107-108
R
RACF . . . . . . . . . . . . . . . . . . . . 125
RCB control block . . . . . . . . . . . . . 88-89
RCT . . . . . . . . . . . . . . . . . . . . 50-51, 77
Reenterable attribute . . . . . . . . . . . . 64-66
151
Index
R, continued
Reentrant attribute . . . . . . . . . . . . . 64-66
Region . . . . . . . . . . . . . . . . . . . 12, 28
Region (LE) . . . . . . . . . . . . . . . . 87-88, 90
Region control task . . . . . . . . . . . . . 51
Relative path . . . . . . . . . . . . . . . . 121
Responsibility count . . . . . . . . . . . . 39, 57, 59-60, 62
Reusability attributes . . . . . . . . . . . . 63-66
Reusable attribute . . . . . . . . . . . . . 64-66
REXX . . . . . . . . . . . . . . . . . . . . 75, 127
S
Script . . . . . . . . . . . . . . . . . . . . 102
Security . . . . . . . . . . . . . . . . . . 125
SEGAD . . . . . . . . . . . . . . . . . . . 53, 132
SEGLN . . . . . . . . . . . . . . . . . . . 53, 132
Session . . . . . . . . . . . . . . . . . . . 108-110
setpgid() service . . . . . . . . . . . . . . 109-110
setsid() service . . . . . . . . . . . . . . . 109-110
SH address environment . . . . . . . . . . 127
Shell . . . . . . . . . . . . . . . . . . . . 96
Shell built-ins . . . . . . . . . . . . . . . . 107
Shell program . . . . . . . . . . . . . . . 129
Shell script . . . . . . . . . . . . . . . . . 101-102, 105-107, 126
Signals . . . . . . . . . . . . . . . . . . . 45
Signature CSECT . . . . . . . . . . . . . 88
Single UNIX Specification . . . . . . . . . 95
Sister task . . . . . . . . . . . . . . . . . 70
SMP/E . . . . . . . . . . . . . . . . . . . 20
Socket files . . . . . . . . . . . . . . . . . 119
spawn() service . . . . . . . . . . . . . . 137
SPOOL . . . . . . . . . . . . . . . . . . . 48
Standards . . . . . . . . . . . . . . . . . 95, 124
Started task control . . . . . . . . . . . . 51
Static call . . . . . . . . . . . . . . . . . . 54
STC . . . . . . . . . . . . . . . . . . . . 50-51, 77
STCB control block . . . . . . . . . . . . . 40-41, 51, 53, 132-133
stderr . . . . . . . . . . . . . . . . . . . . 105-107, 112
stdin . . . . . . . . . . . . . . . . . . . . 105-107, 112
stdout . . . . . . . . . . . . . . . . . . . . 105-107, 112
Sub-shell . . . . . . . . . . . . . . . . . . 105
152
Index
S, continued
Subdirectory . . . . . . . . . . . . . . . . 93, 118
Subroutines . . . . . . . . . . . . . . . . 54-55, 57-66, 71
Subtask . . . . . . . . . . . . . . . . . . 50, 56, 62-63, 70-71, 77-78, 80
Superuser . . . . . . . . . . . . . . . . . 98
SVRB control block . . . . . . . . . . . . 40
SVS . . . . . . . . . . . . . . . . . . . . 13
Symbolic link . . . . . . . . . . . . . . . . 119
SYSCALL address environment . . . . . . 127
System area . . . . . . . . . . . . . . . . 15, 17, 22-23, 27, 51
T
Task . . . . . . . . . . . . . . . . . . . . 40-41, 43-45, 50-51, 53, 56, 62-63, 70-71, 77-78, 80, 132-133
TCB control block . . . . . . . . . . . . . 40-41, 51, 53, 89, 132-133
TCP/IP . . . . . . . . . . . . . . . . . . . 20
The Bar . . . . . . . . . . . . . . . . . . . 22-23, 27
The Line . . . . . . . . . . . . . . . . . . 16-17, 22-23, 27, 37, 40, 51
THLI control block . . . . . . . . . . . . . 132-133
Thread (LE) . . . . . . . . . . . . . . . . 87-91, 130-131, 136
Thread (UNIX) . . . . . . . . . . . . . . . 101, 103, 116-117, 131-133, 136
TMP . . . . . . . . . . . . . . . . . . . . 74, 76, 82
Top Secret . . . . . . . . . . . . . . . . . 125
True alias . . . . . . . . . . . . . . . . . . 33-34
tsch shell . . . . . . . . . . . . . . . . . . 126
TSO . . . . . . . . . . . . . . . . . . . . 20, 74-82, 126, 136
TSO commands
BPXBATCH . . . . . . . . . . . . . . . 126
ISHELL . . . . . . . . . . . . . . . . . 126
MKDIR . . . . . . . . . . . . . . . . . 126
MKNOD . . . . . . . . . . . . . . . . . 126
MOUNT . . . . . . . . . . . . . . . . . 126
OBROWSE . . . . . . . . . . . . . . . 126
OCOPY . . . . . . . . . . . . . . . . . 126
OEDIT . . . . . . . . . . . . . . . . . 126
OGET . . . . . . . . . . . . . . . . . . 126
OGETX . . . . . . . . . . . . . . . . . 126
OHELP . . . . . . . . . . . . . . . . . 126
OMVS . . . . . . . . . . . . . . . . . . 126, 136-138
OPUT . . . . . . . . . . . . . . . . . . 126
OPUTX . . . . . . . . . . . . . . . . . 126
OSHELL . . . . . . . . . . . . . . . . 126
OSTEPLIB . . . . . . . . . . . . . . . 126
UNMOUNT . . . . . . . . . . . . . . . 126
153
Index
T, continued
TSO ID . . . . . . . . . . . . . . . . . . . 99
TSO profile . . . . . . . . . . . . . . . . . 99
U
UID (UNIX user) . . . . . . . . . . . . . . 98-100
UNIX . . . . . . . . . . . . . . . . . . . . 94-100, 102-122
UNIX [user] name . . . . . . . . . . . . . 99
UNIX callable services . . . . . . . . . . . 127
UNIX on z/OS . . . . . . . . . . . . . . . - See z/OS UNIX
UNIX profile . . . . . . . . . . . . . . . . 99
UNIX program management model . . . . 101-117
UNIX System Services . . . . . . . . . . . 30
UNIX User ID . . . . . . . . . . . . . . . . 98
UNMOUNT TSO command . . . . . . . . 126
Use count . . . . . . . . . . . . . . . . . 38, 57, 60, 62
User database . . . . . . . . . . . . . . . 99, 125
V
Virtual storage . . . . . . . . . . . . . . . 13, 50
W
WAIT . . . . . . . . . . . . . . . . . . . . 71
Working directory . . . . . . . . . . . . . 121
Workload management . . . . . . . . . . 42
Workload Manager . . . . . . . . . . . . . 140
154
Index
X
X/Open company . . . . . . . . . . . . . . 95
XCTL . . . . . . . . . . . . . . . . . . . . 56, 61
XPG . . . . . . . . . . . . . . . . . . . . 95, 124
XTLST control block . . . . . . . . . . . . 37-39, 41, 53, 57, 88-89, 132-133
Z
z/OS . . . . . . . . . . . . . . . . . . . . 21-23, 27-30, 32-45, 48-52, 54-72, 74-82, 84-91
z/OS shell . . . . . . . . . . . . . . . . . 126, 136
z/OS UNIX . . . . . . . . . . . . . . . . . 124-143
z/OS UNIX System Services . . . . . . . . - See z/OS UNIX
z900 series machines . . . . . . . . . . . 21
155