MVS Programming: Extended Addressability Guide
MVS Programming: Extended Addressability Guide
GC28-1769-05
OS/390 IBM
MVS Programming: Extended
Addressability Guide
GC28-1769-05
Note
Before using this information and the product it supports, be sure to read the general information under Appendix A, “Notices”
on page A-1.
This edition applies to Version 2 Release 10 of OS/390 (5647-A01) and to all subsequent releases and modifications until otherwise
indicated in new editions.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the
address below.
IBM welcomes your comments. A form for readers' comments may be provided at the back of this publication, or you may address
your comments to the following address:
International Business Machines Corporation
Department 55JA, Mail Station P384
2455 South Road
Poughkeepsie, NY 12601-5400
United States of America
If you would like a reply, be sure to include your name, address, telephone number, or FAX number.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes
appropriate without incurring any obligation to you.
Copyright International Business Machines Corporation 1988, 2000. All rights reserved.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Who Should Use This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
How This Book Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
How to Use This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Where to Find More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Contents v
Expanded Storage Only Hiperspaces . . . . . . . . . . . . . . . . . . . . . . . 6-6
Summary of the Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6
Rules for Creating, Deleting, and Using Hiperspaces . . . . . . . . . . . . . . . 6-7
Creating a Hiperspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Choosing the Name of the Hiperspace . . . . . . . . . . . . . . . . . . . . . . 6-8
Specifying the Size of the Hiperspace . . . . . . . . . . . . . . . . . . . . . . . 6-9
Protecting Hiperspace Storage . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
Identifying the Origin of the Hiperspace . . . . . . . . . . . . . . . . . . . . . 6-12
Creating a Non-Shared or Shared Standard Hiperspace . . . . . . . . . . . 6-12
Creating an Expanded Storage Only Hiperspace . . . . . . . . . . . . . . . 6-13
Accessing Hiperspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-13
How Problem State Programs with PSW Key 8 - F Use Hiperspaces . . . 6-14
How Supervisor State or PSW Key 0 - 7 Programs Use Hiperspaces . . . 6-17
Obtaining an ALET for a Hiperspace . . . . . . . . . . . . . . . . . . . . . . 6-20
Transferring Data To and From Hiperspaces . . . . . . . . . . . . . . . . . . . 6-22
Read and Write Operations for Standard Hiperspaces . . . . . . . . . . . . 6-23
Read and Write Operations For Expanded Storage Only Hiperspaces . . . 6-26
Obtaining Improved Data Transfer To and From a Hiperspace . . . . . . . 6-27
Extending the Current Size of a Hiperspace . . . . . . . . . . . . . . . . . . . . 6-42
Deleting a Hiperspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-43
Releasing Hiperspace Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-44
Using Data-in-Virtual with Standard Hiperspaces . . . . . . . . . . . . . . . . . 6-44
Mapping a Data-in-Virtual Object to a Hiperspace . . . . . . . . . . . . . . . 6-46
Using a Hiperspace as a Data-in-Virtual Object . . . . . . . . . . . . . . . . 6-48
How SRBs Use Hiperspaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-49
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-1
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X-5
Contents vii
viii OS/390 V2R10.0 MVS Extended Addressability Guide
Figures
1-1. Accessing Data in a Data Space . . . . . . . . . . . . . . . . . . . . . 1-9
1-2. Accessing Data in a Hiperspace . . . . . . . . . . . . . . . . . . . . . 1-10
1-3. Data Requirements for VIO, Data Spaces, and Hiperspaces . . . . 1-12
1-4. Difficulty of Modifying an Existing Application . . . . . . . . . . . . . 1-13
2-1. Example of the BAKR Instruction . . . . . . . . . . . . . . . . . . . . . 2-3
2-2. Example of Using the Linkage Stack . . . . . . . . . . . . . . . . . . . 2-4
2-3. Example of an EREG Instruction . . . . . . . . . . . . . . . . . . . . . 2-5
2-4. Format of the Information Fields . . . . . . . . . . . . . . . . . . . . . . 2-6
2-5. Example of an ESTA Instruction . . . . . . . . . . . . . . . . . . . . . . 2-7
2-6. Example of an MSTA Instruction . . . . . . . . . . . . . . . . . . . . . 2-7
3-1. PC Routine Invocation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
3-2. Accessing Data Through the MVCP and MVCS Instructions . . . . . 3-8
3-3. PC Instruction Execution Environment . . . . . . . . . . . . . . . . . 3-12
3-4. PT and SSAR Instruction Execution Environment . . . . . . . . . . . 3-13
3-5. Required Macros to Make PC Routines Available to All Users . . . 3-16
3-6. Required Macros to Make PC Routines Available to Selected
Address Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
3-7. Declared Storage for Cross Memory Examples . . . . . . . . . . . . 3-19
3-8. Using ETDEF to Statically Define Entry Table Descriptors . . . . . . 3-21
3-9. Using ETDEF to Dynamically Define Entry Table Descriptors . . . . 3-23
3-10. Linkage Table and Entry Table Connection . . . . . . . . . . . . . . 3-25
3-11. Calling Sequence for a Stacking PC Routine . . . . . . . . . . . . . 3-26
3-12. Calling Sequence for a Basic PC Routine . . . . . . . . . . . . . . . 3-27
3-13. Linkage and Entry Tables for a Global Service . . . . . . . . . . . . 3-29
3-14. Comparing Basic and Stacking PC Linkage Conventions . . . . . . 3-39
3-15. Cross Memory Connections between Address Spaces . . . . . . . . 3-41
4-1. Example of an AR/GPR . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4-2. Using an ALET to Identify an Address/Data Space . . . . . . . . . . . 4-4
4-3. The MVC Instruction in Primary Mode . . . . . . . . . . . . . . . . . . 4-5
4-4. The MVC Instruction in AR Mode . . . . . . . . . . . . . . . . . . . . . 4-5
4-5. Base and Index Register Addressing in AR Mode . . . . . . . . . . . 4-6
4-6. Comparison of Addressability through a PASN-AL and a DU-AL . . 4-11
4-7. PASN-ALs and DU-ALs at a Space Switch . . . . . . . . . . . . . . 4-12
4-8. Special ALET Values . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
4-9. Functions of the ALESERV Macro . . . . . . . . . . . . . . . . . . . . 4-16
4-10. Example 1: Adding an Entry to a DU-AL . . . . . . . . . . . . . . . . 4-21
4-11. Example 1: Sharing a Data Space through DU-ALs . . . . . . . . . 4-22
4-12. Example 2: Adding an Entry to a PASN-AL . . . . . . . . . . . . . . 4-23
4-13. Example 2: Sharing a Data Space through the PASN-AL . . . . . . 4-24
4-14. Example 3: Sharing Data Spaces Between Two Address Spaces . 4-25
4-15. Obtaining the ALET for the Primary Address Space . . . . . . . . . 4-26
4-16. Using the ALET for the Home Address Space . . . . . . . . . . . . . 4-27
4-17. Relationship Between the CHKEAX and ACCESS Parameters on
ALESERV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-30
4-18. Difference Between Public and Private Entries . . . . . . . . . . . . 4-31
4-19. Comparison of an AX and an EAX . . . . . . . . . . . . . . . . . . . 4-33
4-20. Checking the Validity of an ALET . . . . . . . . . . . . . . . . . . . . 4-37
5-1. Example of Rules for Accessing Data Spaces . . . . . . . . . . . . . . 5-5
5-2. Creating, Deleting, and Using Data Spaces . . . . . . . . . . . . . . . 5-6
5-3. Example of Specifying the Size of a Data Space . . . . . . . . . . . 5-10
Using this book also requires you to be familiar with the operating system and the
services that programs running under it can invoke.
The following table lists titles and order numbers for books related to other
products:
| Changed Information
| The limit on the number of LXs is 2048.
| The Notices section is now under heading Appendix A.
Summary of Changes
for GC28-1769-04
OS/390 Version 2 Release 7
Summary of Changes
for GC28-1769-03
OS/390 Version 2 Release 6
Summary of Changes
for GC28-1769-02
OS/390 Version 2 Release 4
Changed Information
“Writing an Initialization Routine” on page 7-5
Summary of Changes
for GC28-1769-00
OS/390 Release 1
Because it maps all of the available addresses, an address space includes system
code and data as well as user code and data. Thus, not all of the mapped
addresses are available for user code and data. This limit on user applications was
a major reason for System/370 Extended Architecture (370-XA) and MVS/XA.
Because the effective length of an address field expanded from 24 bits to 31 bits,
the size of an address space expanded from 16 megabytes to 2 gigabytes. An
MVS/XA address space is 128 times as big as an MVS/370 address space.
A 2-gigabyte address space, however, does not, in and of itself, meet all of
programmers' needs in an environment where processor speed continues to
increase, where applications must support hundreds of users with instant response
time requirements, and where businesses depend on quick access to huge
amounts of information stored on DASD.
User Programs
and data
4 kilobytes
2 gigabytes User data or
2 gigabytes
System programs
and data
User Programs
and data
Both the architecture and the system protect the integrity of code and data within
an address space. Various techniques, like storage protect key and supervisor state
requirements, provide protection that is almost like a wall around an address space,
and this wall is basically a good thing from the point of view of the work going on
inside that individual address space.
Whether your application is one that can use extended addressability depends on
many factors. One basic factor is the amount of central, expanded, and auxiliary
storage available at your installation to back up virtual storage. Extended
addressability frequently requires additional amounts of virtual storage, which
means that your installation must have sufficient central and auxiliary storage, and
some of the techniques work most efficiently only when expanded storage is
available.
The goals for the design of a particular application are equally important in the
decision-making process. These goals might include:
Performance. For an application with large numbers of online end users,
achieving the best possible response time is always a significant design goal.
Efficient use of system resources, such as storage, and efficient use of the
DASD resources.
Ability to randomly access very large amounts of data.
Data integrity and isolation. Data in an address space is generally available to
all tasks (or TCBs) running in that address space; access to data in a data
space or hiperspace can be restricted. Code running in an address space can
inadvertently overlay data; because of its isolation, data in a data space or
hiperspace is less likely to be overlaid.
Independence from individual device characteristics, from record-oriented
processing, and from data management concerns in general. Extended
addressability can allow an application to focus on controlling data as
information in contrast to controlling data as records in data sets stored on
DASD volumes.
Achieving these goals depends to a very great extent on choosing a way to extend
addressability that meets your needs. You need to understand, at a very high level,
basic concepts related to each technique and how you might apply extended
addressability to specific programming situations.
At the detailed technical level, extended addressability can mean learning new
programming techniques, or new ways of applying existing techniques. At a higher
level, extended addressability can open completely different solutions to
programming problems. With extended addressability, virtual storage, backed by
expanded storage, can become, conceptually, a high-performance medium for
application data. It is also important to note that you should think of extended
addressability techniques as ones you can use to modify existing applications as
well as code new ones.
This simple example illustrates how extended addressability can both improve the
performance of existing solutions and open the possibility of new solutions. The
large amounts of virtual and processor storage now available to an application can
allow totally new solutions and simplify the entire process of application
development.
Basic Concepts
No single technique for extended addressability meets all possible needs.
Choosing the right one for a particular application requires you to understand the
advantages and disadvantages of the technique and some of the key differences
between them. Many applications require a combination of various techniques.
Before you decide to incorporate one or more of the techniques in the design of a
new application, or decide to use a technique to modify an existing application,
consult the detailed technical description of each technique.
Technical Description
The key fact to remember, however, is that cross memory provides synchronous
communication or processing across address spaces. When a task issues a PC
instruction, control passes to the PC routine. When the PC routine completes, it
returns control to the calling routine. Cross memory, for example, allows an
application running in one address space to provide services for many users in
other address spaces.
Technical Description
ASC mode determines how the processor resolves address references for the
executing program. In primary ASC mode, the processor uses the contents of
general purpose registers to resolve an address to a specific location. In access
register ASC mode, an access register (AR) identifies the space the processor is to
use to resolve an address. The processor uses the contents of an AR as well as
You can, however, use ARs without using cross memory. If your application needs
to manipulate data in other address/data spaces but does not need to transfer
control to other address spaces, use ARs. If your application needs to transfer
control to routines in other address spaces but does not need to manipulate data,
use cross memory. If your application needs both the transfer of control and the
manipulation of data, use both cross memory and ARs.
Technical Description
Data-in-Virtual
Data-in-virtual enables you to map data into virtual storage but deal only with the
portion of it that you need. The DIV macro provides the system services that
manage the data object. It enables you to map the object into virtual storage,
create a window, and “view” through that window only the portion of the data object
that you need. The system brings into central storage only the data that you
actually reference.
You can map a data-in-virtual object in either an address space, a data space, or a
hiperspace. Mapping the object into a data space or hiperspace provides additional
storage for the data; the size of the window is no longer restricted to the space
available in an address space. It also provides additional isolation and integrity for
the data, as well as more direct methods of sharing access to that data.
Data-in-virtual is most useful for applications, such as graphics, that require large
amounts of data but normally reference only small portions of that data at any given
time. It requires that the source of the object be a VSAM linear data set on DASD
(a permanent object) or a hiperspace (a temporary object).
Data-in-virtual is also useful for applications that require small amounts of data;
data-in-virtual simplifies the way you access data by avoiding the complexities of
access methods.
Technical Description
VLF uses data spaces to hold data objects in virtual storage as an alternative to
repeatedly retrieving the data from DASD. If you have an existing data retrieval
application or are considering designing one, determine whether VLF can meet
your needs.
Technical Description
Programs that use data spaces run in AR ASC mode. They use MVS macros to
create, control, and delete data spaces. Assembler instructions executing in the
address space directly manipulate data that resides in data spaces.
Programs that use hiperspaces run in primary or AR ASC mode. They use MVS
macros to create, control, and delete hiperspaces. Programs cannot directly
manipulate data in a hiperspace, but use MVS macros to transfer data to and from
the hiperspace for data manipulation. Hiperspaces provide high-speed access to
large amounts of data.
Technical Description
Data spaces and hiperspaces are similar in that both are areas of virtual storage
that the program can ask the system to create. They differ in the way your program
accesses data in the two areas. This difference, and others, are described in later
chapters. But before you can understand the differences, you need to understand
what your program can do with these virtual storage areas.
Under certain conditions, virtual input/output (VIO) can be a better option than a
data space or a hiperspace. “Choosing VIO Instead of a Data Space or a
Hiperspace” on page 1-12 compares data spaces, hiperspaces, and VIO, and
presents some trade-offs.
You can place all types of data in a data space or hiperspace, rather than in an
address space or on DASD. Examples of such data include:
Tables, arrays, or matrixes
Data base buffers
Temporary work files
Copies of permanent data sets
Because data spaces and hiperspaces do not include system areas, the cost of
creating and deleting them is less than that of an address space.
To help you decide whether you need this additional storage area, some important
questions are answered in the following sections. These same topics are addressed
in greater detail in the appropriate chapter later in the book.
How Does a Program Obtain a Data Space or a Hiperspace? Data spaces and
hiperspaces are created through the same system service: the DSPSERV macro.
The macro service allocates contiguous virtual storage of the size (up to two
gigabytes) you specify.
Who Owns a Data Space or Hiperspace? Although programs create data spaces
and hiperspaces, they do not own them. When a program creates a data space or
hiperspace, the system assigns ownership to the TCB that represents the program
or to the TCB that your program chooses as the owner.
When a TCB terminates, the system deletes any data spaces or hiperspaces that
the TCB still owns. If you want the space to exist after the creating TCB terminates,
assign the space to a TCB that will continue to be active beyond the termination of
the creating TCB.
Can Problem State Programs Use Data Spaces and Hiperspaces? Problem
state programs can create and use both data spaces and hiperspaces. Some
types of data spaces and hiperspaces require that a program be supervisor state or
have PSW key 0-7.
The main difference between data spaces and hiperspaces is the way a program
references data. A program references data in a data space directly, in much the
same way it references data in an address space. It addresses the data by the
byte, manipulating, comparing, and performing arithmetic operations. The program
uses the same instructions (such as load, compare, add, and move character) that
it would use to access data in its own address space. To reference the data in a
data space, the program must be in the ASC mode called access register (AR)
mode. Pointers that associate the data space with the program must be in place
and the contents of ARs that the instructions use must identify the specific data
space.
Figure 1-1 on page 1-9 shows a program in AR mode using a data space. The
CLC instruction compares data at two locations in the data space; the MVC
instruction moves the data at location D in the data space to location C in the
address space.
Program
A
B
CLC A,B D
MVC C,D
Figure 1-2 on page 1-10 shows a program in an address space using the data in a
hiperspace. The program uses the HSPSERV macro to transfer an area in the
hiperspace to the address space. While the data is in the address space, the
program compares the values at locations A and B, and uses the MVC instruction
to move data at location D to location C. After it finishes using the data in those
blocks, the program transfers the area back to the hiperspace. The program could
be in either primary or AR ASC mode.
HSPSERV... n
tio
e ra
op n
CLC A,B ad tio
MVC C,D re e ra
RV op
SE ite
HSPSERV... P wr
HS ER
V
PS
A HS
B
D
With one HSPSERV invocation, the program can transfer data in more than one
area between the hiperspace and the address space.
The system backs hiperspace virtual storage with expanded storage only, or with a
combination of expanded and auxiliary storage, depending on your choice. When
you create a hiperspace, the system gives you storage that will not be the target of
assembler instructions and will not need the backing of real storage frames.
Therefore, when the system moves data from hiperspace to address space, it can
make the best use of the available resources.
If your program can easily handle the data in 4K byte blocks, a hiperspace might
give you the best performance. Use a hiperspace if you need a place to store data,
but not to manipulate data. A hiperspace has other advantages:
The program can stay in primary mode and ignore the ARs.
The program can benefit from the high-speed access.
Assume you want to change this application to improve its performance. If the
tables were to reside in data spaces, one table to each data space, the tables
would then be accessible to the program through assembler instructions. The
program could move the tables to the data spaces (through buffers in the address
space) once at the beginning of the update operations and then move them back
(through buffers in the address space) at the end of the update operations.
If the tables are VSAM linear data sets, data-in-virtual can map the tables and
move the data into the data space where a program can access the data.
Data-in-virtual can then move the data from the data space to DASD. With
data-in-virtual, the program does not have to use address space buffers as an
intermediate buffer area for transferring data to and from DASD.
Technical Description
See Chapter 5, Creating and Using Data Spaces for more information about
data spaces.
This kind of application can benefit from a hiperspace. If the data base were to
exist in a hiperspace, a program would still bring one record into its address spaces
at a time. Instead of reading from DASD, however, the program would bring in the
records from the hiperspace on expanded storage (or auxiliary storage, when
expanded storage is not available). In effect, this technique can eliminate many I/O
operations and reduce execution time.
Technical Description
See Chapter 6, Creating and Using Hiperspaces for more information about
hiperspaces.
In making the decision on which to chose, you need to consider the following
questions:
How is the data in your program organized?
How does the program use the data?
How much programming effort is required to change an existing program to
take advantage of VIO, data spaces, or hiperspaces?
Two tables in this section help you understand facts related to these questions.
Figure 1-3 answers questions about the data the program uses.
Figure 1-3. Data Requirements for VIO, Data Spaces, and Hiperspaces
Question VIO Data spaces Hiperspaces
Is the data in your VIO supports only Data spaces support Hiperspaces support
program temporary? temporary data. temporary data and temporary data and
permanent data (through permanent data through
DIV). DIV or data window
services. (For information
on using data window
services, see OS/390
MVS Programming:
Assembler Services
Guide.)
Is the data in your VIO (through EXCP) Data spaces have no Hiperspaces have no
program sequential? supports both sequential requirement. requirement.
and random access;
however, random access
requires more processor
cycles.
Is data arranged (or able VIO has no requirement. Data spaces have no Hiperspaces require that
to be organized) in 4K requirement. the data be accessed
byte blocks? and referenced in 4K
byte increments, located
on a 4K byte boundary.
When would you choose VIO over data spaces or hiperspaces? Use VIO when
you want to improve the performance of an existing program, but you do not want
to make large changes. For information about how to use VIO, see OS/390 MVS
JCL User's Guide.
An easier way to save and restore status, however, is to allow the system to do it
for you through the linkage stack. The linkage stack saves you and the system
work in the following ways:
The “chain” of status save areas is located in one place rather than chained
throughout storage. Diagnostic information thus appears in sequence on the
linkage stack. (For the contents of an entry in the stack, see “Contents of the
Linkage Stack Entry” on page 2-4.)
The linkage stack provides a place for reentrant programs to save the caller's
complete status before the reentrant programs dynamically obtain their working
storage. Once a program has saved the caller's status on its linkage stack, it
has all 16 GPRs and ARs available to establish its working environment.
Your programs do not have to obtain and chain 72-byte save areas, provided
all called programs are using the linkage stack.
The following illustration shows how a program uses the linkage stack. The call
from Program 1 to Program 2 automatically places all the caller's status on the
linkage stack. The return from Program 2 to Program 1 automatically restores all
the caller's status and removes the entry from the linkage stack.
Current linkage
stack entry } (stack)
(unstack) call return
The linkage stack actually consists of two stacks: the normal linkage stack and the
recovery linkage stack. The normal linkage stack consists of at least 96 entries for
use by programs that run under the workunit. (Note that under some
circumstances, the system might provide more than 96 entries, but you will always
have at least 96.) When the system needs an entry and finds that all entries in the
normal stack are used, it abends the program with a “stack full” interruption code.
After the “stack full” interruption occurs, the system uses the recovery linkage stack.
The recovery linkage stack is available to the program's recovery routines after
the “stack full” interruption occurs. If you anticipate a need for more than 96 entries,
you can use the LSEXPAND macro to expand the size of the normal and recovery
stacks for tasks. For information about how and when to issue the LSEXPAND
macro, see “Expanding a Linkage Stack to a Specified Size” on page 2-7.
Any routines to which the exit routine passes control are also subject to the same
restriction. However, the exit routine, or any routines to which it passes control, can
manipulate linkage stack entries that they themselves add.
This chapter introduces each instruction and gives simple examples of each. It is
not intended to direct you in your coding. For complete descriptions of the
instructions, see Principles of Operation.
The stacking PC instruction adds an entry to the linkage stack. Chapter 3 describes
the two types of PC linkages. The stacking PC uses the linkage stack to save the
user's environment. The basic PC, on the other hand, requires that the PC routine
provide code to save the user's environment. The stacking and basic PC
instructions are cross memory instructions; they are described in more detail in “PC
A program can use the BAKR to branch to a subroutine in its address space and
add an entry to the linkage stack, or it can use a BAKR simply to branch to the
next instruction in the program and add an entry to the linkage stack. A program
return (PR) instruction returns control to the program and removes an entry from
the linkage stack.
The BAKR instruction does not change the current addressing mode, nor does it
cause a branch out of an address space. You can be in either primary or AR ASC
mode to use BAKR.
The following example shows the PR instruction and a use of the BAKR instruction.
In the example, the BALR branches to subroutine SUBR. When SUBR receives
control, it uses BAKR to save the caller's status on the linkage stack. The BAKR
saves the contents of register 14, which the calling program loaded with the
address of the instruction after the BALR, on the linkage stack. Zero, as the
second operand, means that the status information is saved and no branch occurs.
The PR instruction in SUBR restores the caller's status, restores the contents of
This use of the BAKR instruction is consistent with the MVS convention in which
the called program saves the status of the caller. This convention is described in
the chapter on linkage conventions in OS/390 MVS Programming: Assembler
Services Guide.
The program call from Program 1 to Program 2 automatically places all the caller's
status on the linkage stack (adding Entry 1 to the linkage stack). Program 2 uses
the BALR instruction to branch to a subroutine, which uses the BAKR instruction to
save Program 2's status (adding Entry 2 to the stack). When the subroutine returns
to Program 2 through the PR instruction, Program 2's status is restored (removing
Entry 2 from the stack). When Program 2 uses the PR instruction to return to
Program 1, Program 1's status is restored (removing Entry 1 from the stack). At
any time, the entry formed by the most recent BAKR or stacking PC instruction
contains the status of the caller of the currently executing code.
TCBA
Program 1
PR
On return from a routine, the PR instruction restores the entry and returns control to
the calling program.
In the following example, EREG extracts the contents of the calling program's ARs
0-1 and GPRs 0-1 from the current entry and loads them into ARs 0-1 and GPRs
0-1. The entry in this example was caused by the BAKR instruction.
The EREG instruction does not change the current stack pointer.
Figure 2-4 shows the code for each of the four information fields and the format of
the fields. The format of the third field varies depending on whether a BAKR or a
stacking PC instruction caused the entry.
0 2 4 6 7
1 PSW
0 7
0 4 7
2 or
Reserved PC Number
0 7
3 Modifiable Area
0 7
The ESTA instruction copies one of the fields in the current entry into an even/odd
pair of GPRs. It returns a condition code that tells whether the entry on the linkage
stack was formed by the BAKR (CC=0) or stacking PC (CC=1) instruction.
In the following example, the load address instruction (LA) loads a code of “1” into
register 9, where “1” identifies the information field that contains the PSW. The
ESTA instruction then copies this field into general registers 4 and 5. The BZ
instruction causes a branch if the stack entry was formed by a BAKR.
Another example of the ESTA instruction appears in Figure 4-20 on page 4-37.
The timing of the execution of the LSEXPAND macro is important. You must
anticipate using up the entries in the stack. If the program has already issued a
“stack full” program interruption, the system will not accept the LSEXPAND macro
and will abend the workunit. In other words, don't wait until the normal linkage stack
is full to issue this macro.
To request that the linkage stack have 2000 entries and the recovery linkage stack
have 150 entries, code the following LSEXPAND macro:
LSEXPAND NORMAL=2,RECOVERY=15
Synchronous cross memory communication takes place between the user and the
service provider when the user issues a program call (PC) instruction. If the service
provider has previously established the necessary environment, the PC instruction
transfers control to a service provider program called a PC routine. The PC routine
provides the requested service and then returns control to the user.
The user program and the PC routine can execute in the same address space or in
different address spaces. In either case, the PC routine executes under the same
TCB as the user. Thus, the PC routine provides the service synchronously.
A PC routine can access (fetch or store) data in the user's address space by using
access registers (ARs) and the full set of assembler instructions. If the PC routine
has the proper authority, it can also access data in other address spaces or in data
spaces. For information about using access registers, see Chapter 4, “Using
Access Registers” on page 4-1.
Note: In releases prior to SP3.1.0, a PC routine could access data in the user's
address space only by issuing the MVCP or MVCS instructions. PC routines
can still use these instructions. IBM recommends the use of access
registers, however.
The rest of this chapter discusses when you should consider using synchronous
cross memory communication and explains the environment the service provider
must create and how to create it.
Basic PC: Transfers control to another program, the PC routine. The basic PC
requires the service provider to save and restore the user's environment. The
PC routine can be in the same address space as the program that issues the
PC instruction, or in a different address space.
Cross memory local (CML) lock: The LOCAL lock of an address space other
than the home address space.
Cross memory mode: Cross memory mode exists when at least one of the
following conditions are true:
– The primary address space (PASN) and the home address space (HASN)
are different address spaces.
PC Routines
To provide a service, the service provider supplies a PC routine and uses MVS
macros to make the PC routine available to the address space of the user who
needs the service. A service provider can make a PC routine available to users in
all address spaces or to users in selected address spaces only. Before a user can
invoke a PC routine, however, the user also needs a PC number, which the service
provider must provide. Each PC number identifies a specific PC routine.
PC Routine Invocation
Any program can issue a PC instruction provided the program is running in either
primary or AR ASC mode. When a program issues a PC instruction, the system
invokes the requested PC routine providing the service provider has made the PC
routine available to the calling program's address space. In addition, if the calling
program is running in problem state, it must also have a PSW-key mask (PKM) that
The service provider is responsible for defining the level of authorization problem
programs need to invoke a PC routine. The service provider defines the level of
authorization for each PC routine by specifying the PKM that a problem state
program must have to invoke the PC routine. If the problem program's PKM agrees
with the service provider's specification, the system allows the problem program to
invoke the PC routine. Otherwise, the PC instruction causes a program interrupt
(privileged operation exception).
PC Linkages
There are two types of PC linkages, basic and stacking. The terms basic and
stacking refer to the type of PC linkage used to invoke the PC routines. The basic
PC linkage and the stacking PC linkage are similar in that each invokes a program.
They are different, however, in the manner of invocation and the capabilities
available on invocation.
The stacking PC provides more capability and better performance than does the
basic PC. For example, the stacking PC uses the system provided linkage stack to
save and restore the user's environment. On the other hand, the basic PC requires
that the PC routine provide code to save and restore the user's environment. For a
detailed comparison of the stacking PC and the basic PC, see “PC Linkages and
PC Routine Characteristics” on page 3-30.
PC Routine Execution
A PC routine executes in either the service provider's address space or in the
user's address space. A PC routine that causes a space switch (PC-ss) executes in
the service provider's address space, which becomes the primary address space. A
PC routine that does not cause a space switch (PC-cp) executes in the user's
primary address space, which remains the primary address space. The service
provider uses the ETDEF macro to indicate whether a PC routine is to cause a
space switch. Regardless of where the PC routine executes, it always runs under
the same TCB or SRB as the program that issued the PC instruction.
A PC routine may provide services directly to the user, or it may invoke other
routines to provide the services. If necessary, a PC routine can itself issue PC
instructions.
The following figure shows how a user invokes a PC routine to obtain a service.
.
. 1
.
.
.
PC
2
.
.
.
.
3
Example 1
1. A program in the cross memory user’s address space issues a PC
instruction to request a service.
The PC routine can, if necessary, access data in the user's address space without
using ARs. The MVCP instruction moves data from the secondary address space
(the user) to the primary address space (the service provider). The MVCS
instruction moves data from the primary address space (the service provider) to the
The following figure shows how a PC routine can use the MVCP or MVCS
instructions to access data.
. .
. 1 . 2
. .
. .
. .
3
PC MVCP
. 5 .
. .
. .
. .
4
MVCS
.
.
.
DATA
Example 2
1. A program in the cross memory user’s address space issues a PC
instruction to request a service.
4. The PC routine stores data back into the cross memory user’s address
space.
Figure 3-2. Accessing Data Through the MVCP and MVCS Instructions
Following this topic are two figures, Figure 3-3 on page 3-12 and Figure 3-4 on
page 3-13, that show how the cross memory environment supports communication.
Refer to these figures as you read this topic.
Entry Tables
For each PC routine, the service provider issues the ETDEF macro to define the
PC routine's name or entry point and its environment. A PC routine's environment
refers to whether the routine runs in supervisor state or problem state, the value of
the routine's authorization key mask, whether the routine causes a space switch,
and so forth. After defining the PC routine's environment, the service provider
issues ETCRE to create an entry table. The service provider's home address space
owns the entry table.
The entry table contains one entry for each PC routine. Each entry contains the
operating environment definition created by ETDEF. Before a user can invoke a PC
routine, the service provider must connect the entry table to the linkage table of the
user's address space.
There are two types of LXs, a system LX and a non-system LX. To connect an
entry table to the linkage table in one or more, but not all address spaces, the
service provider must use a non-system LX. To connect an entry table to all
linkage tables, the service provider must use a system LX. A system LX, for
example, enables an installation to replace an installation-written SVC routine with
a PC routine that gets invoked through a system linkage index.
The PC Number
The service provider must also supply the user with a PC number. The service
provider creates this number by concatenating the LX to the entry table index (EX).
As previously stated, the LX is an index into the linkage table. The EX is an index
into the entry table and identifies the relative entry in the entry table that
corresponds to the PC routine that is to receive control. For example, if the first
table entry corresponded to the PC routine, the EX would be X‘00’; if it was the
second entry, the EX would be X‘01’, and so forth. The service provider is
responsible for calculating and keeping track of entry table indexes. When a
program issues the PC instruction, the system uses the PC number to locate the
correct entry table entry and transfer control to the PC routine.
The service provider and the user must agree on a method the service provider will
use to provide the user with the PC number. The service provider might, for
example, supply a macro that returns the PC number to the user. Or the service
provider could place the PC number in a storage area common to both the service
provider and the user. The user could then retrieve the PC number from the
common area.
All programs are initially dispatched with a PKM value equal to the storage protect
key of the program's TCB or SRB. For example, a PKM value of X'0080'
represents key 8 and X'0001' represents key 15. The PC, PR, and PT instructions
can change the PKM value.
The EKM is a 16-bit string value like the PKM. It can be used to alter the PSW
keys under which the PC routine will run. For a basic PC routine, the system ORs
the EKM into the PKM before the PC routine receives control. The result of the OR
operation is the PKM under which the PC routine will run. A stacking PC routine
can either have the system OR the EKM into the PKM, or have the system replace
the PKM with the EKM.
Two AX values, 0 and 1, have the same meaning for all address spaces. A value of
0 always corresponds to an authority table entry that provides neither PT nor SSAR
authority. A value of 1 always corresponds to an entry that provides both PT and
SSAR authority.
The characteristics of the PC routines defined in the entry table determine whether
the service provider needs PT and SSAR authority. The service provider needs the
authority if either of the following conditions are true:
The entry table defines a basic PC routine that causes a space switch
The entry table defines a stacking PC routine for which the ETDEF macro
specifies SASN=OLD.
When MVS initially creates an address space, the address space has neither PT
nor SSAR authority to any address space. The service provider uses the AXSET
and ATSET macros to establish PT and SSAR authority. If a service provider needs
PT and SSAR authority to all address spaces, the service provider must issue the
AXSET macro and request an AX value of 1.
Figure 3-3 on page 3-12 and Figure 3-4 on page 3-13 show the environment
needed to issue a PC instruction, a PT instruction, or an SSAR instruction. An
address space can have only one AX value at any time. The service provider that
runs in the address space owns the current AX value for the address space. Only
the service provider should set the AX value from 0 to a single non-0 value, or from
a non-0 value to 0 in the address space. Other code besides the service provider
3
•
4 7
Linkage Table Entry Table
PC Routine
5 8
9
6
•
PC LX EX 1
• The system uses the linkage index 2 together with a system maintained
pointer 3 to locate a particular entry in the linkage table 4 .
• The system uses linkage table value 5 together with the EX value 6
to locate a particular entry in the service provider’s entry table 7 .
• The system uses information from the entry table entry 8 to invoke the
requested PC routine 9 .
2
AX
• 3 •
4
Authority Table PC Routine
.
.
.
1
.
SSAR
.
5 .
.
.
PT
• The table entry 5 specifies whether the cross memory user has granted
the service provider PT or SSAR authority.
Environmental Considerations
Resource management is different - If your cross memory programs invoke
programs in other address spaces, you might need to manage resources
differently. For example, your cross memory programs must be able to handle
the situation that occurs when an invoked program in another address space
abnormally terminates.
Accounting methods might be affected - Your cross memory programs might
acquire the ownership of resources on behalf of cross memory users. You
Restrictions
MVS macros are unavailable to programs running in cross memory mode
unless the macro documentation specifically states that it is available.
Code running in cross memory mode cannot issue any SVCs except ABEND.
That is, any macro that depends on SVCs is unavailable in cross memory
mode.
Only one step of a job can establish ownership of space switch entry tables.
Subsequent job steps cannot issue the LXRES, AXRES, or ETCRE macros.
Routines that get control as the result of a PC instruction must not use the
checkpoint/restart facility.
In order to be accessed, the address space must be one or more of the
following:
– The home address space
– A non-swappable address space
– An address space whose local lock is held or whose local lock is held as a
cross memory local (CML) lock.
Requirements
Storage acquired in a cross memory environment is attributed to the job step task
of the address space in which it was obtained if the subpool it comes from is task
related. A program that acquires such a resource should provide a task
termination/address space termination resource manager to clean up any resources
obtained on behalf of the terminating task or address space but attributed to
another address space's job step task. For more considerations on resource
management, see “Resource Management” on page 3-39.
The macros the service provider issues to establish, disconnect, or destroy the
cross memory environment are:
ATSET
AXEXT
AXFRE
AXRES
AXSET
ETCON
ETCRE
ETDEF
The actual set of macros the service provider must issue depends on the following:
Whether the services will be available to all address spaces or to selected
address spaces only
Whether the PC routine is space switch or non-space switch.
The service provider must issue these macros from a program that is running in
supervisor state or with a PSW-key mask of 0-7, and is enabled, unlocked, and in
primary ASC mode.
In addition to the previously listed macros, the service provider might also issue the
PCLINK macro. The PCLINK macro enables a basic PC routine to save and restore
the user's environment. Only basic PC routines that are in supervisor state are
permitted to issue the PCLINK macro.
Linkage Index
The LXRES macro supplies the service provider with a linkage index (LX).
Because the PC routine is to be available to all users, the service provider should
obtain a system LX. Note that there are a limited number of system LXs available,
and a system LX cannot be freed for reuse. See “Reusing LXs” on page 3-42 for
more information about system LXs.
The figure is divided into three columns. For a basic PC routine, refer to the left
column. For a stacking PC routine where SASN=OLD is specified, refer to the
center column. For a stacking PC routine where SASN=NEW is specified, refer to
the right column. (U) identifies macros that must be issued by service provider code
that is running in the user's address space. Several macros shown in the figure
must be issued in a specific sequence. Therefore, IBM recommends that the
service provider issue the macros in the listed sequence.
Stacking PC Routine
Basic PC Routine SASN=OLD SASN=NEW
AXRES AXRES LXRES (See note 1)
AXSET AXSET ETDEF
LXRES (See note 1) LXRES (See note 1) ETCRE
ETDEF ETDEF ETCON (U) (See note 2)
ETCRE ETCRE
ATSET (U) ATSET (U)
ETCON (U) (See note 2) ETCON (U) (See note 2)
PCLINK
Notes:
1. Use a non-system LX.
2. To determine whether address space authorization (PT and SSAR authority) is needed before issuing the
ETCON macro, see “Address Space Authorization” on page 3-17 for basic PC routines and “Address Space
Authorization” on page 3-18 for stacking PC routines.
Figure 3-6. Required Macros to Make PC Routines Available to Selected Address Spaces
Regardless of the types of PC routines the entry table will define, the service
provider must always issue the LXRES macro to reserve a non-system LX. The
rest of the macros that the service provider must issue depend on the types of PC
routines the entry table will define.
Basic PC Routine
Authorization Index: The service provider must issue the AXRES macro to
reserve an authorization index (AX) if address space authorization is required. The
service provider must then issue the AXSET macro using the reserved AX value as
input. AXSET assigns the AX value as the authorization index for the service
provider's home address space.
Address Space Authorization: The types of PC routines that the entry table
defines determines whether the service provider needs PT and SSAR authority to
the user's address space. Authority is needed if:
The entry table defines a basic PC routine that causes a space switch
The entry table defines a stacking PC routine for which the ETDEF macro
specifies SASN=OLD.
To obtain address space authorization, service provider code, running in the user's
address space, must issue the ATSET macro. Input to ATSET must be the AX
value reserved by the service provider.
PC Routines and the Entry Table: The service provider must issue ETDEF to
define the PC routines and ETCRE to create the entry table. To connect the entry
table to the user's address space, service provider code, running in the user's
address space, must issue the ETCON macro.
Stacking PC Routine
Authorization Index: The types of PC routines that the entry table defines
determines whether the service provider must obtain an authorization index. If
either of the following conditions are true, the service provider must obtain an
authorization index:
The entry table defines a basic PC routine that causes a space switch
The entry table defines a stacking PC routine for which the ETDEF macro
specifies SASN=OLD.
The service provider must issue the AXRES macro to reserve an AX. The service
provider must then issue the AXSET macro using the reserved AX value as input.
AXSET assigns the AX value as the authorization index for the service provider's
home address space.
To obtain address space authorization, service provider code, running in the user's
address space, must issue the ATSET macro. Input to ATSET must be the AX
value reserved by the service provider.
PC Routines and the Entry Table: The service provider must issue ETDEF to
define the PC routines and ETCRE to create the entry table. To connect the entry
table to the user's address space, service provider code, running in the user's
address space, must issue the ETCON macro.
PC Number
Before the user can invoke a basic PC routine or a stacking PC routine, the service
provider must supply the user with the PC number that identifies the PC routine.
For information about how to do this, see “The PC Number” on page 3-10.
For each example, assume that the service provider has obtained common storage
that the user can access through name/token callable services. The service
provider could use the area pointed to by the token returned by name/token
callable services to store the PC numbers corresponding to its services. It could
also store some of the lists it needs to invoke PC/AUTH services, and the lists that
must be available to different address spaces. Assume also that SERVBLK, shown
in Figure 3-7, describes the common storage area. All examples use the declared
storage areas shown in Figure 3-7.
SERVBLK DSECT
LXL DS 0F LX LIST
LXCOUNT DS F NUMBER OF LXS REQUESTED
LXVALUE DS F LX RETURNED BY LXRES
AXL DS 0F AX LIST
AXCOUNT DS H NUMBER OF AXS REQUESTED
AXVALUE DS H AX RETURNED BY AXES
TKL DS 0F TOKEN LIST
TKCOUNT DS F NUMBER OF ETS CREATED
TKVALUE DS F TOKEN RETURNED BY ETCRE
PCTAB DS 0F TABLE OF PC NUMBERS
SERV1PC DS F PC NUMBER FOR SERVICE 1
SERV2PC DS F PC NUMBER FOR SERVICE 2
Setting Up
To make its services available to other address spaces through a PC instruction,
the service provider sets up the authorization structures and the linkage and entry
tables.
To request that the system reserve an authorization index (AX) for the service
provider's address space, or an extended authorization index (EAX) for a PC
routine, the service provider issues the AXRES macro. The AX or EAX is reserved
across the entire system. The home address space at the time the AXRES macro
is issued becomes the owner of the AX or EAX:
LA 2,1
STH 2,AXCOUNT REQUEST 1 AX
GETAX AXRES AXLIST=AXL,RELATED=FREEAX
See “Extended Authorization Index (EAX)” on page 3-33, “Types of Access List
Entries” on page 4-12 and “EAX-Authority to an Address Space” on page 4-28 for
more information about the EAX.
To set the AX of the service provider's address space to the AX value that MVS
reserved, the service provider issues the AXSET macro:
SETAX AXSET AX=AXVALUE,RELATED=(GETAX,SETAX)
To request that the system reserve a non-system LX for later use, the service
provider issues the LXRES macro to reserve a 4-byte LX. A non-system LX allows
a service provider to connect to selected users. The home address space at the
time the LXRES macro is issued becomes the owner of the LX:
.
.
LA 2,1
ST 2,LXCOUNT REQUEST 1 LX
GETLX LXRES LXLIST=LXL,RELATED=FREELX
.
.
To define which PC routines will be available to user, the service provider must
issue two macros, ETDEF and ETCRE. The ETDEF macro builds an entry table
descriptor (ETD). Each ETD defines a PC routine. The ETCRE macro uses the
ETDs as input to build an entry table. The entry table contains ETD entries for each
of the PC routines that the service provider is making available to the user. The
home address space at the time the service provider issues the ETCRE macro
becomes the owner of the entry table.
There are two ways the service provider can use the ETDEF macro:
If all of the information about the PC routine being defined is available at the
time the ETDEF macro is assembled, the service provider can statically define
an ETD by specifying the TYPE=ENTRY option.
If some of the information about the PC routine being defined is unavailable
when assembling the ETDEF macro, the service provider must issue ETDEF
twice: once with TYPE=ENTRY, and once with TYPE=SET. TYPE=ENTRY
reserves storage for an ETD entry. TYPE=SET initializes the ETD entry, and
The following figure shows how to use ETCRE and ETDEF to create an entry table
that defines two stacking PC routines. This example works only when the PC
routines are located in LPA or in the nucleus.
In the previous example, the first ETDEF macro defines the beginning of the entry
table definition.
The second ETDEF macro defines a space switch PC routine named Service1.
This PC routine receives control in problem state, requires that all input and output
parameters be in key 8 storage, and can reference date that is in key 8 storage
only. This example of the ETDEF macro shows how to define a stacking PC routine
that decreases authority.
The third ETDEF macro defines a non-space switch PC routine named Service2.
This PC routine can reference input/output parameters in any key. This example of
the ETDEF macro shows how to define a stacking PC routine that increases
authority.
The routine is a stacking PC because PC=STACKING is the default.
The STATE=SUPERVISOR parameter specifies that the PC routine, Service2,
will receive control in supervisor state.
The parameter AKM=(0:15) specifies that programs running with any PSW key
may invoke the PC routine.
The parameter EKM=(0:15) specifies that the program will run with all PKM bits
on.
The parameter PKM=OR specifies that the system is to OR the PSW-key mask
of the caller with the mask specified by EKM=(0:15) before invoking the PC
routine.
The last ETDEF macro defines the end of this entry table definition.
When a PC routine is not in LPA and is not in the nucleus, the service provider will
not know the location of the PC routine until it is loaded. Also, the service provider
will not know the address of the PC routine's associated recovery routine (ARR)
until it is loaded, and will not know the EAX value until the AXRES macro is issued.
Therefore, the service provider must create at least part of the entry table
definitions dynamically. The following figure shows how the service provider could
create the entry table if the PC routine, Service1, and the ARR, ARR1, were loaded
into private storage first. The figure shows code for a non-reentrant program.
ETDEF TYPE=SET specifies a complete entry replacement. All options are either
set or defaulted. Nothing is carried over from the TYPE=ENTRY declaration. Note
that, in this example, the service provider uses the AX value, provided through the
AXRES macro, as an EAX value.
The preceding example of the ETDEF macro shows how to define a stacking PC
routine that uses an ARR and an EAX:
The parameter ROUTINE=(2) specifies that the PC entry point address is in
register 2.
The parameter ARR=(3) specifies that the address of the ARR to receive
control if the stacking PC routine ends abnormally is in register 3.
The parameter EAX=(4) specifies that the EAX value for the PC routine is in
register 4.
Once the linkage and entry tables have been created, the service provider can
construct the PC numbers that identify the PC routines. A PC number is a fullword
value formed by combining an LX and an EX.
The LXRES macro returns the LX in the format that's shown below. This format
allows the service provider to OR the LX with an EX to form a PC number:
0 LX 0
To make the PC numbers accessible, the service provider can save the address of
its SERVBLK by using name/token callable services:
LA 2,SERVBLK
ST 2,SERVBLKA
CALL IEANTCR,(LEVEL,NAME,TOKEN,PERSOPT,RETCODE)
.
.
.
LEVEL DC A(IEANT_SYSTEM_LEVEL)
NAME DC CL16'SERVBLK'
TOKEN DS XL16
SERVBLKA DS A
DS XL12
PERSOPT DC A(IEANT_NOPERSIST)
RETCODE DS F
IEANTASM INCLUDE NAME/TOKEN SERVICES X
ASSEMBLER DECLARATION STATEMENTS
Establishing Access
The next two steps make the service provider's services available to a user. The
instructions used for these two steps must be issued from the user's address space
by a program running in supervisor state or with a PKM value of 0-7. If the user is
a problem state program, the service provider must provide code that executes on
behalf of the user with the user's address space as the home address space. The
service provider must repeat these two steps for each user.
1. Set the PT and SSAR authority in the user's authority table entry that
corresponds to the service provider's AX value. This action allows the service
provider to issue a PT or SSAR instruction with the user's address space as
the instruction target.
SETAT ATSET AX=AXVALUE,PT=YES,SSAR=YES,RELATED=RESETAT
2. Connect the service provider's entry table to the user's linkage table at the
entry that corresponds to the service provider's LX. After the system completes
the connection, the linkage table entry points to the service provider's entry
table.
To invoke a PC routine, the user still needs a PC number. The service provider and
the user must have previously agreed on a method the service provider will use to
provide a PC number. For example, the service provider could provide a macro that
the user issues to find the PC number that the service provider has stored in a
table in commonly addressable storage.
At this point in the example, the service provider has provided two services that the
user can access using PC instructions. The service provider has also established
authority to issue PT and SSAR instructions to the user's address space. The
user's linkage table is connected to the service provider's entry table as shown in
Figure 3-10.
ET
LT user SS
EX=0 At this point, the service
ETE for Service 1
provider has established its
ETE for Service 2 ability to provide two
EX=1
services to a user via a PC.
EX=2 invalid
The user’s LT is connected
to the service provider’s
EX=3 invalid
entry table.
LX ET
SS SS
Invoking a PC Routine
The PC instruction gives control to a PC routine. The PC number determines the
specific PC routine that receives control. The entry table entry that corresponds to
the PC number defines the PC routine's location and environment. To return to the
caller, a stacking PC routine issues the PR instruction; a basic PC routine issues
the PT instruction.
Figure 3-11 on page 3-26 shows the instruction sequence needed to invoke a
stacking PC routine. The stacking PC automatically saves the user's environment.
When the PC routine issues the PR instruction to return control to the caller, the
system restores the caller's environment.
Figure 3-12 on page 3-27 shows the instruction sequence needed to invoke a
basic PC routine. The calling program must save registers and its SASID before
issuing the PC instruction. When the PC returns control, the caller must restore
registers and the SASID.
To make it easier for the user to invoke a PC routine, the service provider can
provide a macro that generates the needed instruction sequence.
Removing Access
The next two steps remove access to previously provided services. The steps must
be performed with the user's address space as the home address space. These
steps are essentially the opposite of the steps used to establish access. First, the
service provider removes PT and SSAR authority to the user's address space.
RESETAT ATSET AX=AXVALUE,PT=NO,SSAR=NO,RELATED=(SETAT)
The service provider then disconnects the entry table from the user's linkage table.
DISET1 ETDIS TKLIST=TKL,RELATED=CONET
Cleaning Up
Before shutting down, the service provider must remove all cross memory
connections and release any cross memory resources it owns. After ensuring that
all connections to the entry table have been disconnected, the service provider
destroys the entry table.
DESET1 ETDES TOKEN=TKVALUE,RELATED=CET1
The service provider then frees the non-system LX so it will be available for reuse
(providing no other address space is connected to the LX).
The service provider then resets the AX of its address space to zero.
SR 2,2 ZERO VALUE
RESETAX AXSET AX=(2),RELATED=LXRES RESET AX TO ZERO
Finally, the service provider frees the AX so the system can reuse it. Freeing the
AX removes PT and SSAR authority corresponding to the service provider's AX in
all authority tables in the system.
FREEAX AXFRE AXLIST=AXL,RELATED=GETAX
Setting Up
The service provider first obtains a system LX. MVS sets aside part of the available
LXs for use as system LXs. When the service provider connects an entry table to a
system LX, the entry table is connected to all present and future address spaces.
Unlike a non-system LX, a system LX cannot be freed for reuse. When an address
space that owns a system LX terminates, the LX becomes dormant. The system
allows a dormant system LX to be reconnected to an address space different from
the original owning address space. This is an important consideration for a service
provider that can be terminated and then restarted. The service provider must have
a way to remember the system LX it owned so that it can connect the LX to an
entry table when it is restarted. See “Reusing LXs” on page 3-42 for more
information.
In the example, the service provider would first test LXVALUE. If LXVALUE was
zero, the service provider would issue the LXRES macro. Otherwise the service
provider would pass the value found in LXVALUE to the ETCON macro.
To obtain a system LX, the service provider issues the LXRES macro with the
SYSTEM=YES option.
The code shown in the following three steps runs with the service provider's
address space as the home address space. The first step obtains a system LX. If
the service provider's address space is coming up for the first time since IPL, the
service provider issues the LXRES macro with the SYSTEM=YES option. The
service provider must then save the LX somewhere, probably in common storage,
so it is accessible if the service provider is restarted.
The service provider then sets its address space AX to a value of 1. An AX value
of 1 authorizes the service provider to issue a PT or SSAR instruction to all other
address spaces. (Because the service provider is providing a service to all users,
the service provider does not need to obtain a unique AX.)
LA 2,1
AXSET AX=(2)
The service provider then issues the ETCRE macro to create the entry table.
ETCRE ENTRIES=ETDESC
ST ,TKVALUE SAVE THE ET TOKEN
The service provider can construct the PC numbers and make them accessible the
same way it did in “Example 1 - Making Services Available to Selected Address
Spaces” on page 3-20.
Establishing Access
To connect the entry table to the linkage table in each current and future address
space, the service provider issues the ETCON macro. In this case, the service
provider can issue the ETCON macro from any address space.
LA 2,1
ST 2,TKCOUNT SET COUNT OF ETS TO BE CONNECTED
ETCON LXLIST=LXL,TKLIST=TKL
All address spaces in the system now have access to the service provider's
services. Figure 3-13 shows how the linkage and entry tables appear at this point.
LT LT ET
1 n SS
EX=0 ETE for Service 1
Providing Service
The service provider supplies services in the same way as in Example 1. The users
of the services must be aware of the PC number associated with each service.
Cleaning Up
Finally, the service provider sets the AX of its address space to 0.
SR 2,2
AXSET AX=(2)
The stacking and basic PC linkages share some common capabilities. The stacking
linkage, however, offers more capability and provides better performance than does
the basic linkage. The service provider uses the PC parameter on the ETDEF
macro to define the type of linkage that will be used. Stacking is the default. IBM
recommends the use of the stacking PC linkage. This book refers to a PC routine
as either a stacking PC routine or a basic PC routine depending on the linkage
used to invoke the routine.
PC Linkage Capabilities
The stacking PC linkage and the basic PC linkage provide the following capabilities:
The PC routine's PKM authority can be increased.
Basic PC routines must receive control in primary mode; stacking PC routines
have the option to do so.
Basic PC routines must receive control with SASN=old PASN; stacking PC
routines have the option to do so.
The PC routine can receive control in either problem state or supervisor state.
The PC routine can be either a space switch routine or a non-space switch
routine.
Defining a PC Routine
When you define a PC routine, you define its operating characteristics and its
environment. Several definitions apply to both basic and stacking PC routines.
Other definitions apply to stacking PC routines only.
For each PC routine, you must specify the type of linkage, basic or stacking, that
the system is to use when a user invokes the routine. IBM recommends that you
use only the stacking linkage. To define the type of linkage, use the PC keyword on
the ETDEF macro.
Note: If you currently provide basic PC routines, you may continue to use these
basic PC routines without change.
All of the information that you provide to define a basic PC routine you also provide
to define a stacking PC routine. There is also additional information that you can
provide for stacking PC routines only. The topic “Definitions Common to Both
Stacking and Basic PC Routines” explains how to provide the definitions common
to both types of PC routines. The topic “Definitions for Stacking PC Routines Only”
on page 3-33 explains how to provide the definitions that apply to stacking PC
routines only.
Use a non-space switch PC routine if the PC routine must support problem state
callers and must run in supervisor state in the caller's address space. If you do not
have these requirements, you can use a space switch routine, which has certain
advantages. A space switch routine:
Provides code isolation
Allows you to access data in multiple address spaces
Prevents you from having to place your code in common storage.
Problem State Program Authorization: You can specify the PSW key mask
(PKM) that a problem state program must be running under in order to invoke a PC
routine. When a program in problem state issues a PC instruction, the system uses
the program's PKM and the PC routine's authorization key mask (AKM) to
determine whether the program is authorized to invoke the PC routine. If any bit in
the program's PKM is on and the corresponding bit in the AKM is also on, the
program is authorized and the system invokes the PC routine. Otherwise, the
system disallows the invocation.
To define the AKM, specify the AKM parameter on the ETDEF macro.
PSW-key Mask (PKM): You can specify the PKM that a PC routine is to run
under. The PKM, which has meaning only for PC routines that run in problem state,
defines:
The PSW-key values that the PC routine can set by means of the MODESET
macro or the SPKA instruction
Whether the PC routine is authorized to use the MVCK, MVCS, and MVCP
instructions
Other PC routines that the PC routine can invoke
If the user's PKM provides sufficient authority for the PC routine, use the user's
PKM by omitting the EKM parameter from the ETDEF macro.
If the PC routine needs more authority than the user has, use the EKM parameter
to increase the authority. You must also omit the PKM parameter or specify
PKM=OR. When you specify PKM=OR or omit PKM, the system determines the
PKM authority for the PC routine by ORing the caller's PKM value with the EKM
value.
For a stacking PC routine only, you can decrease authority or define a new
authority. You do this by defining the authority in the EKM value and specifying
PKM=REPLACE. Specifying PKM=REPLACE causes the system to use the EKM
value as the new PKM value for the PC routine.
ASC Mode: A stacking PC routine can receive control in either primary address
space control (ASC) mode or in AR ASC mode. The ASC mode determines
whether the PC routine can use ARs. AR ASC mode is required to use ARs. The
ASCMODE parameter on the ETDEF macro determines the mode. The default is
for the PC routine to receive control in primary ASC mode.
SASN Value: A stacking PC routine can receive control with the secondary
address space number (SASN) set to one of two values:
SASN can equal the number of the user's primary address space (the address
space from which the PC instruction was issued).
SASN can equal the number of the service provider's address space (the
address space where the PC routine executes)
The SASN parameter on the ETDEF macro determines the SASN value. The
default is for SASN to equal the number of the user's primary address space.
Here are two examples of how you might use the SASN parameter:
PSW Key: By default, a PC routine runs under the caller's PSW key. You have
the option to run under a different key. To specify a different PSW key, use the EK
parameter on the ETDEF macro.
PC Routine Requirements
All PC routines must meet certain requirements depending on the type of PC
routine, stacking or basic.
Stacking PC Routines
Stacking PC routines must meet the following requirements:
They must not use the checkpoint/restart facility.
They must be either permanently resident in LPA or the nucleus, or they must
be loaded under the job step task of the address space that created the entry
table.
They must issue the PR instruction to return control to the user.
Stacking PC routines that cause a space switch must:
– Run in an address space that is non-swappable
– Use only those MVS services that are supported in cross memory mode.
Basic PC Routines
Basic PC routines must meet the following requirements:
They must not use the checkpoint/restart facility.
They must be either permanently resident in LPA or the nucleus, or they must
be loaded under the job step task of the address space that created the entry
table.
They must use the PCLINK macro or provide code to save and restore the
user's environment.
They must use the PT instruction to return control to the user.
Basic PC routines that cause a space switch must:
– Run in an address space that is non-swappable
– Use only those MVS services that are supported in cross memory mode.
Basic PC
A basic PC routine receives control in primary mode and only from a user program
that's running in primary mode. The PC routine can receive control in either
problem state or in supervisor state. In order to return control to the user's program,
the PC routine must save the user's environment. Before issuing the PT instruction
to return to the user, the PC routine must restore the previously saved environment.
When the PC routine returns control to the user's program, the user's program must
restore its general registers and its secondary address space identifier (SASID).
After issuing PCLINK STACK, the PC routine can begin processing. If necessary,
the PC routine can use the PCLINK macro with the EXTRACT option to get
information from the PCLINK stack.
When the PC routine is ready to return control to the user's program, the PC
routine must load into general registers 0, 1, and 15 any data to be returned to the
user. The PC routine can then issue PCLINK with the UNSTACK,THRU option.
This option restores general registers 3, 13, 14, the program mask and, optionally,
the original PSW protection key. The PC routine can then issue the PT instruction
to return control.
For information about coding the PCLINK macro, see OS/390 MVS Programming:
Authorized Assembler Services Reference LLA-SDU.
Stacking PC
A stacking PC routine can receive control in either primary mode or AR mode. The
user program that issues the PC instruction can be in either primary mode or AR
mode. When the user's program issues the PC instruction, the system saves the
user's environment on the linkage stack. When the PC routine issues the PR
instruction to return to the user, the system restores the user's environment from
the stack before returning control. Thus, there is no need for the caller or the PC
routine to either save or restore the environment. The system saves the caller's
general registers (0 - 15), ARs (0 - 15), PASN, SASN, PKM, and PSW. If
necessary, the PC routine can issue the extract stacked state instruction (ESTA) to
examine the stacked entry.
User in Primary Mode: A user program that's running in primary mode can
invoke a PC routine that receives control in either primary mode or AR mode. Any
addresses that the user program passes must be located within the user's primary
address space. The user must not use ARs to pass parameter values or
addresses. Before issuing a PC instruction, the user must:
Load the PC number into general register 14.
If there is a parameter list to pass, load its address into general register 1.
When the PC routine returns control, GPRs 2 - 13 and ARs 2 - 13 are restored to
their original values. GPRs 0, 1, and 15, and ARs 0, 1, and 15 contain the values
that were in them when the PC routine issued the PR instruction. GPR 14 and AR
14 are used as work registers by the system.
For more information about using ARs, see Chapter 4, “Using Access Registers”
on page 4-1.
PC Routine That Receives Control In Primary Mode: After receiving control, the
PC routine must establish a general register as a base register. The PC routine
must also initialize general register 13:
If the PC routine calls other routines, the PC routine must initialize general
register 13 to the address of an 18-word save area that's located on a word
boundary in the PC routine's primary address space. The PC routine must
initialize the second word of the save area to the value C‘F1SA’. The value
C‘F1SA’ indicates that the system saved the user's environment on the linkage
stack. IBM recommends that all PC routines that receive control in primary
mode initialize general register 13 in this way.
A PC routine that does not call other routines and does not wish to provide an
18-word save area must initialize general register 13 to one of the following
values.
– Zero.
– The address of a two word save area that's located on a word boundary in
the PC routine's primary address space. The PC routine must initialize the
second word of the area to the value C‘F1SA’.
Either value, zero or C‘F1SA’, in general register 13 indicates that the system
saved the user's environment on the linkage stack.
Addressability to the latent parameter area is through the primary address space.
When the PC routine receives control, general register 4 contains the address of
the latent parameter area.
To restore the user's environment and to return control, the PC routine must issue
the PR instruction.
Addresses that the caller passes to the PC routine must be qualified by an ALET.
Before using an ALET, the PC routine must check the ALET:
If the caller passes an ALET of 0, a space switch PC routine for which
SASN=OLD has been specified must change the ALET to 1 before using it.
If the caller passes other ALETs, the PC routine must use them to qualify
addresses that the caller has passed.
The PC routine must never use an ALET of 1 that the caller has passed. If a
caller passes an ALET of 1, the PC routine might, for example, set an error
return code and return to the caller.
Addressability to the latent parameter area is through the primary address space.
When the PC routine receives control, general register 4 contains the address of
the latent parameter area. Before referencing the latent parameter area, the PC
routine must set AR 4 to a value of 0.
Before returning control to the user, the PC routine must do the following:
If there are parameters to pass, place the address of the parameters into
general register 0 or 1 and the ALET the caller will use to address the data into
the corresponding AR. Remember that the address of any data in the caller's
address space is qualified by an ALET of 0 for the caller, but an ALET of 1 for
the PC routine if SASN=OLD. When passing the ALET to qualify the address of
data in the caller's address space, IBM recommends that the PC routine pass
an ALET of 0 rather than depending on the caller to change the ALET from 1 to
0.
If there is a return code, place it into general register 15.
To restore the caller's environment and return control, the PC routine must issue
the PR instruction.
The examples in Figure 3-14 on page 3-39 compare the linkage conventions for
the basic PC (first example) to the conventions for the stacking PC (second
example). Both the user program and the PC routine are in primary mode.
User PC Routine
. BALR 6,
..
. .
PR
STACKING PC LINKAGE
L 14,PCNUMBER
PC (14)
See Chapter 4, “Using Access Registers” on page 4-1 for information about being
in AR mode and manipulating the contents of ARs.
Resource Management
IBM recommends that a program running under the job step task, rather than
under a subtask of the job step task, acquire and release these cross memory
resources: AXs, EAXs, LXs, authority tables, and entry tables. Likewise, the same
program should load the PC routines.
During normal termination, the program that obtained cross memory resources
should release those resources. If this is not done, however, MVS releases these
resources during termination of the job step task.
When the job step task of an address space terminates, MVS eliminates any cross
memory connections between the terminating address space and other address
spaces. After these connections are eliminated:
Programs executing in other address spaces cannot access the terminating
address space through a PT, SSAR, or PC instruction.
Reusing ASIDs
The system assigns an ASID to an address space when the address space is
created. A limited number of ASIDs are available for the system to assign. When
all ASIDs are assigned to existing address spaces, the system is unable to start a
new address space. This condition might be the result of too many lost ASIDs in
the system. A lost ASID is one that is associated with an address space that has
terminated, but because of the address space's cross memory connections, the
system does not reuse the ASID. In effect, the ASID is “lost from use” for the
duration of the IPL, or until all connected address spaces have terminated.
This section tells you two ways to reduce the possibility that the system will run out
of ASIDs for assignment to new address spaces. One is through coding cross
memory services to avoid losing ASIDs and the second is through the installation's
use of parameters in the IEASYSxx member of SYS1.PARMLIB.
An ASID is unavailable for reuse when the address space owns entry tables that
contain space switch entries (created through SSWITCH=YES on the ETDEF
macro), and when one of the following is true:
Those tables connect to other address spaces through a non-system LX
(created through SYSTEM=NO on the LXRES macro), in which case the ASID
is not eligible for reuse until all connected address spaces terminate
Those tables connect to other address spaces through a system LX, in which
case the ASID is not eligible for reuse for the duration of the IPL.
The ASID of an address space with no entry tables, or with entry tables that
contain only non-space switch entries (created through SSWITCH=NO on the
ETDEF macro), is available for reuse when the address space terminates.
For an example of ASID reuse, see Figure 3-15 on page 3-41, which describes the
cross memory relationships between four address spaces. Address spaces A, B,
and C own entry tables with space switch entries. Address space B is a server
address space. It has a system LX; its PC routines are available to all address
spaces. Address spaces A and C have non-system LXs; their PC routines are
available to selected address spaces. Address space D owns no entry tables.
LXRES with
non-system LX B
ETCRE A
ETCON to A
PC routine LXRES with C
defined in system LX
ETDEF with
SSWITCH=YES PC
LXRES with
PC routine non-system IX D
defined in ETCRE C
ETDEF with
SSWITCH=YES PC
ETCON to C
PC routine
defined in
ETDEF with
SSWITCH=YES PC
To maintain the integrity of an address space, the system does not reuse an ASID
until all programs that could potentially access that address space have completed.
This means that the system reuses the ASIDs of the address spaces in the figure
as follows:
A's and B's ASIDs are reusable only after a reIPL.
C's ASID is reusable after both C and D terminate.
D's ASID is reusable after D terminates.
A's and B's ASIDs are the lost ASIDs. Because programs in all address spaces
potentially have the ability to transfer control to address space B, and programs in
B can transfer control to address space A, A's and B's ASIDs are not reusable
within an IPL. (Consider the consequences of the system reusing A's ASID at
termination of A. Then, a program in B could pass control to code running in the
address space that received the reused ASID.)
Reusing LXs
| The limits on the number of LXs is 2048. Some of the LXs are reserved as system
| LXs; the rest are available as non-system LXs. Use the LXRES macro with
| SYSTEM=YES to obtain a system LX; with SYSTEM=NO to obtain a non-system
| LX. The rule for the reuse of a system LX is simple: the system does not reassign
| it. The original requester of the LX can choose to reconnect to the LX should the
| address space terminate and then restart. You can use the NSYSLX parameter in
| the IEASYSxx member of SYS1.PARMLIB to increase or decrease the number of
| system LXs available for the system's use.
The system considers reusing a non-system LX when all entry tables are
disconnected from the LX. This is the case when an address space that owns a
non-system LX terminates or when the owner of the non-system LX uses ETDIS to
disconnect all entry tables from the LX and uses LXFRE to free the LX. In the
example in Figure 3-15 on page 3-41, assume that all entry tables are
disconnected by the system during address space termination. This means the
system reuses non-system LXs as follows:
A's non-system LX is reusable when A and B terminates
C's non-system LX is reusable when C and D terminates
Again referring to Figure 3-15 on page 3-41, assume that address space B issues
ETDIS to disconnect from A's LX and A issues LXFRE to free its non-system LX.
After these two actions complete, A's LX is available for reuse. If B had not
disconnected from A's LX, the LX would not be available for reuse until both A and
B terminate.
The system reuses EAXs in the same way it reuses ASIDs. The system does not
reuse an EAX until all programs that could potentially access the address space
have completed. In the example in Figure 3-15 on page 3-41, assume that A owns
an EAX in the entry table connected to B, and B owns an EAX in an entry table
connected to all address spaces (because B has a system LX), and C owns an
EAX in the entry table connected to D. In this example, the system reuses the
EAXs as follows:
Accounting Considerations
CPU execution time for space switch PC routines is attributed to the home address
space of the work unit that invokes the PC routine. The PC routine execution time
is not attributed to the address space where the PC routine itself resides. For
example, address space A owns a space switching PC routine that is invoked by a
task whose home address space is B. When the task in B executes the PC routine
in space A, that CPU time is attributed to address space B.
Recovery Considerations
Space switch PC routines have special recovery considerations. A space switch PC
routine has active binds to address spaces other than home. If the PC routine tries
to access data in one of these address spaces after the address space has
terminated, the PC routine will incur a program check and its recovery routine might
get control. The SETFRR macro provides options that specify the cross memory
mode in which the recovery routine must get control. The ETDEF macro with the
ARR parameter and the ESTAEX macro also can define recovery routines for PC
routines in cross memory mode. However, these recovery routines are not
protected against memory terminations of associated address spaces.
There are also options that enable a recovery routine to get control as a resource
manager when the requested cross memory mode cannot be established in order
to recover resources serialized by local (CML) or global locks. For information on
recovery in cross memory mode, see OS/390 MVS Programming: Authorized
Assembler Services Guide.
Access registers provide you with a different function from cross memory. You
cannot use them to branch into another address space. Through access registers,
however, you can use assembler instructions to manipulate data in other address
spaces and in data spaces. You do not use access registers to reference
addresses in hiperspaces.
In addition to this chapter, other sources of information can help you understand
how to use access registers:
Chapter 5, “Using Data Spaces,” contains examples of using access registers
to manipulate data in data spaces.
Principles of Operation contains descriptions of how to use the instructions that
manipulate the contents of access registers.
Also, the following books contain the syntax and parameter descriptions for the
macros that are mentioned in this chapter:
OS/390 MVS Programming: Authorized Assembler Services Reference
ALE-DYN
OS/390 MVS Programming: Authorized Assembler Services Reference
ENF-IXG
OS/390 MVS Programming: Authorized Assembler Services Reference
LLA-SDU
OS/390 MVS Programming: Authorized Assembler Services Reference
SET-WTO.
The functions of cross memory and access registers are different and
complementary. In a multiple address space environment, you might use them
both.
Access
Registers 0 1 Identify address spaces or data spaces 14 15
General
Purpose 0 1 Identify locations within an address or data space 14 15
Registers
Why would a program use ARs? Generally, instructions and data reside in a
single address space — the primary address space (PASN). However, you might
want your program to have more virtual storage than a single address space offers,
or you might want to separate data from instructions for:
Storage isolation and protection
Data security
Data sharing among multiple users
For these reasons and others, your program can have data in address spaces
other than the primary or in data spaces. The instructions still reside in the primary
address space, but the data can reside in another address space or in a data
space.
To access data in other address spaces, your program uses ARs and executes in
the address space control mode called access register mode (AR mode).
What is address space control (ASC) mode? The ASC mode determines where
the system looks for the data that the address in the GPR indicates. The two ASC
modes that are generally available for your programs are primary and AR mode.
The PSW determines the ASC mode. Both problem state and supervisor state
programs can use both modes, and a program can switch between the two modes.
In primary mode, the data your program can access resides in the program's
primary address space. (An exception to this statement is that a program in
primary mode can use the cross memory instructions, MVCP and MVCS, to
manipulate data in the secondary address space.) When it resolves the
addresses in data-referencing instructions, the system does not use the
contents of the ARs.
In AR mode, the data your program can access resides in the address/data
space that the ARs indicate. For data-referencing instructions, the system uses
the AR and the GPR together to locate an address in an address/data space.
Specifically, the AR contains a value, called an ALET, that identifies the
address space or data space that contains the data, and the GPR contains a
base address that points to the data within the address/data space. (In this
book the term address/data space refers to “address space or data space.”)
The following chart summarizes where the system looks for the instructions and the
data when the program is in primary mode and AR mode.
In this book, the AR and GPR pair that is used to resolve an address is called
AR/GPR. Figure 4-1 illustrates AR/GPR 4.
Do not confuse cross memory mode with ASC mode. A program can be in AR
mode with the primary, secondary, and home address spaces all the same.
Likewise, a program can be in AR mode with the primary, secondary, and home
address spaces all different. Chapter 3, “Synchronous Cross Memory
Communication” on page 3-1 contains information about cross memory mode.
Do not confuse addressing mode (AMODE) with ASC mode. A program can be in
AR mode and also be in either 31-bit or 24-bit addressing mode. However,
programs in 24-bit addressing mode are restricted in their use of data spaces; for
example, a program in 24-bit addressing mode cannot create a data space, nor can
the program access data above 16-megabytes in that space.
How does your program switch ASC mode? Use the SAC instruction to change
ASC mode:
SAC 512 sets the ASC mode to AR mode
SAC 0 sets the ASC mode to primary mode
The following figure shows an ALET in the AR and the access list entry that points
to the address/data space. It also shows a GPR that points to the data within the
address/data space.
Access List
AR
ALET
GPR
@
Data
By placing an entry on an access list and obtaining an ALET for that entry, a
program builds the connection between the program and the target address/data
space. (In describing the subject of authorization, the terms “target address space”
and “target data space” are used to mean an address space or data space in which
a program is trying to reference data.) The process of building this connection is
called establishing addressability to an address/data space.
For programs in AR mode, when the GPR is used as a base register, the
corresponding AR must contain an ALET. Conversely, when the GPR is not used
as a base register, the corresponding AR is ignored. For example, the system
ignores an AR when the associated GPR is used as an index register.
In Figure 4-3, the move instruction, MVC, is in code that is running in primary
mode. The MVC instruction uses GPRs 1 and 2. GPR 1 is used as a base register
to locate the destination of the MVC instruction. GPR 2 is used as a base register
to locate some data to be moved.
MVC A(LEN,1),B(2)
0 1 2 ...
GPRs ...
B
In Figure 4-4, the MVC instruction, in code that is in AR mode, moves the data at
location B in Space Y to location A in Space X. GPR 1 is used as a base register
to locate the destination of the data, and AR 1 is used to identify space X. GPR 2
is used to locate the source of the data, and AR 2 identifies Space Y. In AR mode,
the MVC instruction is in code that is running in AR mode. The MVC instruction
moves data from one address/data space to another. Note that the address space
that contains the MVC instruction does not have to be either Space X or Space Y.
Address Space
Access List
MVC A(LEN,1),B(2)
Space Y
Space X
AR ALET ALET ...
X Y
GPR ...
0 1 2 ...
Because ARs that are associated with index registers are ignored, when you
code assembler instructions in AR mode, place the commas very carefully. In
those instructions that use both a base register and an index register, the comma
that separates the two values is very important.
Figure 4-5 shows four examples of how a misplaced comma can change how the
assembler resolves addresses on the load instruction.
For their syntax and help with how to use them, see Principles of Operation.
Access Lists
When the system dispatches a work unit (that is, a TCB or SRB), it gives that work
unit an access list (a DU-AL) that is empty. When the system creates an address
space, it gives that address space an access list (PASN-AL) that contains only
entries for existing data spaces that are known as common area
(SCOPE=COMMON) data spaces. Programs add entries to the DU-AL and the
PASN-AL. The entries represent the address/data spaces that the programs want
to access.
Before your program can use ARs to reference data in an address/data space, it
must establish a connection to the address/data space. The connection between
the program that the work unit represents and the address/data spaces is through
an access list. The process of establishing this connection is called establishing
addressability.
Although you cannot use ARs to access data in hiperspaces, you can establish a
connection between a program and a hiperspace through ALETs and access lists.
If you are using hiperspaces see “Accessing Hiperspaces” on page 6-13. The
information in this chapter applies to data/address spaces.
Before you can set up the access list entries and obtain ALETs, you need to know
about:
The two types of access lists, and the differences between them
The two types of entries in access lists, and the differences between them
The ALETs that are available to every program
The ALESERV macro, which manages entries in access lists and gives
information about ALETs and STOKENs.
The term STOKEN (for “space token”) identifies an address space, a data space,
subspace, or a hiperspace. It is similar to an address space identifier (ASID or
ASN), with two important differences: the system does not reuse the STOKEN
value within an IPL, and data spaces, subspaces, and hiperspaces do not have
ASIDs. The STOKEN is an eight-byte variable that the system generates when you
create an address space, data space, subspace, or hiperspace. (Note that the
system never generates a STOKEN value of zero.)
A program uses the DU-AL associated with its work unit and the PASN-AL
associated with its primary address space.
If your program is not part of a subsystem, it will probably place entries for
address/data spaces in its DU-AL.
Each work unit has one DU-AL; programs that the work unit represents can use it.
That DU-AL cannot be shared with another work unit. A program can, however, use
the ALCOPY parameter on the ATTACH(X) macro at the time of the attach, to pass
a copy of its DU-AL to the attached task. “Attaching a Subtask and Sharing Data
Spaces with It” on page 5-24 describes a program attaching a subtask and passing
a copy of its DU-AL. This action allows two programs, the issuer of the ATTACH
Each address space has one PASN-AL. All programs running in the primary
address space can use the PASN-AL for that address space. They cannot use the
PASN-AL of any other address space.
Adding and deleting DU-AL and PASN-AL entries for address spaces might require
that the program have special authorization. For more information on this
authorization, see “EAX-Authority to an Address Space” on page 4-28.
Because access lists belong to work units, you must remember the relationship
between the program and the work unit that represents the program. For simplicity,
this chapter describes access lists as if they belong to programs. For example,
“your program's DU-AL” means “the DU-AL that belongs to the TCB that represents
your program.”
Space Z
Space Y
Space Y
Space X
AS1
TCB A
DU-AL
PGM 1
Space X
ALETX DC F
ALETY DC F
Space Z
Space Y
Space Y
AS1
Space X
TCB A DU-AL
PGM1
PASN-AL
PC Space X Space W
ALETX DC F
ALETY DC F Space W
AS2
PGM2
PR
ALETX DC F
An access list entry for an address space is either a public entry or a private
entry, and a combination of both these types can be on the same DU-AL or
PASN-AL.
A program can access the target address space through a public entry if it has
(1) the access list entry that identifies the address space, and (2) the ALET for
the entry.
A program can access the target address space through a private entry if it has
(1) an access list entry that identifies the address space, (2) the ALET for the
entry, and (3) the appropriate extended authorization index (EAX) value.
Figure 4-8 describes the ALETs that have values of zero, one, and two, and the
address spaces they identify.
Special ALETs
0
Primary
address
Secondary space
1 address
Home space
address
space
2
Except for these three special ALET values, a program should never depend on the
value of an ALET.
The change in the meaning of an ALET of zero and one is important when your
program issues a space-switching PC instruction. If you pass an ALET of zero to
the routine in the target address space, the zero now refers to that address space.
If the parameter is in the address space that the program switched from and the
PC was defined SASN=OLD (or used the default), your program must change the
value of the ALET from zero to one. An example of this change is in “Example of
Using TESTART” on page 4-37.
The change in the meaning of an ALET of zero and one can also be important
when your program issues a space-switching PC instruction followed by a
non-space-switching PC instruction. For example, if your program issues a PC from
address space A to address space B:
The home address space is A.
The primary address space is B.
The secondary address space is A.
When you use nested PC routines (one PC routine invokes another PC routine,
and that PC routine invokes yet another PC routine, and so on), using the special
ALET values is not sufficient to maintain addressability to any address space other
than the current primary and secondary address spaces. If you use nested PC
routines, use the ALESERV macro to add entries to the DU-AL and pass
ALET-qualified addresses. You can use the ALESERV macro with the ADDPASN
parameter to add the current primary address space to the DU-AL.
After a program issues a SSAR instruction, an ALET of one references the new
secondary address space.
The meaning of the ALET with the value of two (for the home address space) does
not change at a space switch.
The following examples show several ways of placing the value “0” in an AR.
Example 1
Example 2
Example 3
Example 4
Set AR 12 to zero and set GPR 12 to the address contained in GPR 15. This code
is useful to establish a program's base register GPR and AR from an entry point
address contained in register 15. The example assumes that GPR 15 contains the
entry point address of the program, PGMA.
LAE 12,(15,) ESTABLISH PROGRAM'S BASE REGISTER
USING PGMA,12
Example 5
You can also find examples of the ALESERV macro in Chapter 5, Creating and
Using Data Spaces.
This section describes these actions and gives some examples. The first item in the
list, having authority to access data in the address/data space, depends on whether
the entry is for a data space or an address space.
Authority to add an entry for a data space follows certain rules that are
summarized in Figure 5-2 on page 5-6. This table tells what problem state and
supervisor state or PSW key 0-7 programs can do with data spaces.
Authority to add an entry for an address space is determined by whether you
require that the system check the EAX value of the program when the program
The ALESERV ADD process described in this chapter applies to the data spaces
called SCOPE=SINGLE and SCOPE=ALL. For SCOPE=COMMON data spaces,
ALESERV ADD adds an entry to all PASN-ALs. “Creating and Using
SCOPE=COMMON Data Spaces” on page 5-22 describes the ALESERV ADD
process for these data spaces.
The ALESERV ADDPASN macro adds to the DU-AL an entry for the primary
address space. An application would use this macro if its programs run in many
address spaces.
ALESERV ADD and ALESERV ADDPASN are the only ways to add an entry to an
access list. For examples of adding entries to the DU-AL and PASN-AL, see:
“Example of Adding an Access List Entry for a Data Space” on page 4-18
The example of adding an entry for an address space specifies that the system is
not to check for EAX-authority.
Using the DSECT that the program established, the program can easily manipulate
data in the data space.
A more complete example of manipulating data within this data space appears in
“Example of Creating, Using, and Deleting a Data Space” on page 5-21.
If the address space does not need the protection that the EAX offers, a program in
supervisor state or PSW key 0 - 7 can use the CHKEAX and ACCESS parameters
on ALESERV ADD when it adds the address space entry to the access list:
CHKEAX=NO tells the system not to check the EAX value of the program that
is adding the entry to the access list.
ACCESS=PUBLIC tells the system not to check the EAX value of a program
trying to access data in the address space.
Note that, by using the ALESERV defaults, the program could have issued the
following:
ALESERV ADD,ALET=ASALET,STOKEN=ASTOKENN,CHKEAX=NO
A program can pass an ALET or a STOKEN to another program in the same way it
passes other parameter data. MVS has certain rules for passing ALETs, as
described in “Rules for Passing ALETs” on page 4-20. It does not have rules for
passing STOKENs. However, the ALESERV service determines whether the
receiving program can add an entry for the address/data space that a STOKEN
represents.
In these examples, programs share their data spaces with programs running under
work units other than their own.
The examples all involve adding entries for data spaces. The reason the examples
are not of address spaces is because of the additional decision that you have to
make about EAX-authority when you add entries for address spaces to access lists.
Consider that a supervisor state program named PGM1 created a data space and
received a STOKEN from DSPSERV. To add the entry to the DU-AL, PGM1
issues:
ALESERV ADD,STOKEN=STOKDS1,ALET=ALETDS1,AL=WORKUNIT
.
ALETDS1 DS F
STOKDS1 DS CL8
ALESERV accepts the STOKEN, adds an entry to the DU-AL and returns an ALET
at location ALETDS1. Figure 4-10 shows PGM1 with the entry for DS1 on its
DU-AL. It shows the STOKEN and the ALET.
AS1
DU-AL
PGM 1
DS1
ALESERV . . . DS1
ALETDS1 DS F
STOKDS1 DS CL8
PGM 2
Consider that PGM2, also in supervisor state, and running under a TCB different
from PGM1's TCB, would also like to have access to DS1. PGM1 passes PGM2
the STOKEN for DS1. PGM2 then uses the ALESERV ADD macro to obtain the
ALET and add the entry. Figure 4-11 on page 4-22 shows PGM2 with
addressability to DS1.
DU-AL
PGM 1
DS1
ALESERV . . . DS1
ALETDS1 DS F
STOKDS1 DS CL8
DU-AL
PGM 2
ALESERV . . .
DS1
ALET1 DS F
STOK1 DS CL8
Note: A problem state program with PSW key 8 - F can add entries to an access
list only for a data space that the program created or owns.
In Figure 4-12 on page 4-23, consider that PROG1, adds an entry for a data space
to the PASN-AL. PROG1 issues the following macro:
ALESERV ADD,STOKEN=STOKDS2,ALET=ALETDS2,AL=PASN
.
ALETDS2 DS F
STOKDS2 DS CL8
ALESERV accepts the STOKEN, adds an entry to the PASN-AL, and returns an
ALET at location ALETDS2. Figure 4-12 shows PROG1 with the PASN-AL entry for
DS2.
DS2
DS2
AS1
PROG 1
ALESERV . . .
ALETDS2 DS F
STOKDS2 DS CL8
PROG 2
Note: A problem state program with PSW key 8-F can add entries to the
PASN-AL only for the type of data space called SCOPE=SINGLE.
Consider that PROG2 (either in problem or supervisor state and running under a
TCB different from PROG1's) would like to have access to DS2. In this case, both
PROG1 and PROG2, because they run in the same address space, share the
same PASN-AL. PROG2 does not have to add an entry to its PASN-AL; the entry
is already there. PROG1 passes the ALET to PROG2. Figure 4-13 on page 4-24
shows that PROG2 has the ALET for DS2 and, therefore, has addressability to DS2
through its PASN-AL.
DS2
DS2
AS1
PROG 1
ALETDS2 DS F
STOKDS2 DS CL8
PROG 2
ALET2 DS F
In a similar way, any supervisor state or problem state program that runs in AS1
and has the ALET for DS2 can access DS2.
The SCOPE parameter on DSPSERV determines how the creating program can
share the data space. For more information on the SCOPE parameter, see
“SCOPE=SINGLE, SCOPE=ALL, and SCOPE=COMMON Data Spaces” on
page 5-3.
Referring to Figure 4-13, consider that PROG1 wants to allow a program in another
address space (whose home address space is different from PROG1's) to access
data in DS2. Figure 4-14 on page 4-25 shows that PROG1 passes the STOKEN
for DS2 to PROG2, a supervisor state program in AS2. PROG2 uses the ALESERV
macro to add the entry to its DU-AL. PROG2 also could have added the entry to
its PASN-AL.
DS2
AS1
AS2
PROG 1
DU-AL
ALETDS2 DS F PGM 2
STOKDS2 DS CL8
ALESERV . . . DS2
STOK2 DS CL8
Figure 4-14. Example 3: Sharing Data Spaces Between Two Address Spaces
PGM2, without having EAX-authority to the address space, can issue ALESERV
ADDPASN to place an entry for AS2 on the DU-AL. This action gives PGM3 and
PGM4 addressability to AS2, providing the ALETs are passed to these programs.
AS2
TCB A PGM 2 PGM 3 PGM 4
PGM 1 ALESERV ADDPASN . . . PC
PC
PC AL2 DC F
ALET2 DC F
PGMALET DC F
Figure 4-15. Obtaining the ALET for the Primary Address Space
In the following example, a program adds an entry for the primary address space to
the DU-AL as a public entry.
ADDPASN CSECT
ADDPASN AMODE 31
ADDPASN RMODE ANY
BAKR 14, SAVE CALLER'S STATUS ON STACK
SAC 512 SWITCH INTO AR MODE
.
LAE 12, SET BASE REGISTER AR
BASR 12, SET BASE REGISTER GR
USING ,12
SYSSTATE ASCENV=AR
.
ADD PROGRAM'S PASN AS PUBLIC TO THE PROGRAM'S DU-AL
ALESERV ADDPASN,ALET=PGMALET
.
BODY OF PROGRAM
.
REMOVE PROGRAM'S PASN FROM DU-AL
ALESERV DELETE,ALET=PGMALET REMOVE PASN FROM DU-AL
.
PR RETURN TO CALLER
.
PGMALET DC F ALET FOR PROGRAM'S PASN
END
Figure 4-16. Using the ALET for the Home Address Space
Access lists have a limited size; the DU-AL has 509 entries and the PASN-AL has
510 entries. Therefore, it is a good programming practice to delete entries from an
access list when the entries are no longer needed. The specific rules are:
If a program needs an entry for a short period of time, it should delete the entry
when it no longer needs the entry.
If a program adds an entry and uses that entry during execution, the program
does not need to delete the entry; the system deletes the entry when the task
terminates.
If a supervisor state or PSW key 0 - 7 program does not want the system to
check the EAX-authority of the program when it deletes an entry for an address
space, it should use CHKEAX=NO on ALESERV DELETE. CHKEAX=YES is
the default.
Once the entry is deleted, the system can immediately reuse the ALET.
Programs that share data spaces with other programs have another action to take
when they delete an entry from an access list. They should notify the other
programs that the entry is no longer connecting the ALET to the data space.
Otherwise, those programs might continue to use an ALET for the deleted entry.
See “ALET Reuse by the System” on page 4-28 for more information.
When ALESERV ADD added the entry to the access list, the system did not check
the EAX-authority of the program; in this example, the system does not check the
EAX-authority either.
The system does not check and notify programs about the reuse of an ALET.
Therefore, when a program uses ALESERV DELETE to delete an access list entry,
the program must ensure that other programs do not use the old ALET.
Consider a program, PROGA, deleting the data space, DSA, and removing the
entry from the PASN-AL. The ALET for that entry, ALETA, ceases to have meaning
in relationship to DSA. The system, free now to reuse that ALET, assigns ALETA to
a new data space, DSB. Suppose other programs in the address space were also
using ALETA to access DSA. If PROGA does not tell those programs about the
removal of ALETA, those programs will mistakenly access DSB, while intending to
access DSA.
This response to the system's removal of the entry and reuse of an ALET is similar
to the work a program does after it frees address space storage that it obtained
and shared with other programs. When that area of storage is freed, MVS reuses
the area to satisfy a later request for storage. When an access list entry is freed,
MVS reuses that ALET to satisfy a later ALESERV ADD request.
Earlier in the chapter the two types of access list entries were defined. The
definitions are repeated here.
An access list entry for an address space is either a public entry or a private
entry, and a combination of both these types can be on the same DU-AL or
PASN-AL. The two types differ from each other by the kind of checking the system
does when a program tries to use the entry to access an address space.
A program can access the target address space through a public entry if it has
(1) the ALET for the entry and (2) the access list entry that identifies the
address space.
A program can access the target address space through a private entry if it has
(1) the ALET for the entry, (2) an access list entry that identifies the address
space and, (3) the appropriate EAX value.
The ACCESS and CHKEAX parameters on ALESERV determine when the system
checks the EAX-authority of the program.
CHKEAX=YES tells the system to check the EAX of the program at the time
the program uses the ALESERV macro to add the entry for the address space
or delete the entry from the access list.
ACCESS=PRIVATE tells the system to check the EAX of the program that is
attempting to access the target address space through the entry.
It is important that you understand the relationship between the two parameters on
ALESERV that determine whether the system checks the EAX value against the
SSAR authority in the target address space's authority table. Figure 4-17
describes the relationship.
Once a program places a private entry on the access list (placing the EAX
restriction on the users of the address space), a supervisor state or PKM 0 - 7
program running in the address space can use the ATSET macro to turn SSAR
authority off. This action means that an EAX, when used as an index into that entry
in the authority table, will find SSAR authority turned off. The program with that
EAX no longer has EAX-authority to the address space. It is not possible, however,
for a program in the target address space to prevent a program from using an entry
that was added with the CHKEAX=NO and ACCESS=PUBLIC parameters on
ALESERV.
Figure 4-18 gives an example of public and private entries. PGM1 has public
entries and private entries on its DU-AL and its PASN-AL. It has the ALETs that
allow it to access AS1 and DS1 through its PASN-AL and AS2 and AS3 through its
DU-AL.
To add the entries for the three address spaces to an access list, the
program might have had to establish EAX-authority to AS1, AS2, and AS3. A
supervisor state or PSW key 0 - 7 program can use CHKEAX=NO on
ALESERV that allows the program to add the entry, requesting that the system
not check its EAX value. Problem programs with PSW key 8 - F must have
EAX-authority.
To add an entry for the data space to an access list, the program has to
meet certain MVS criteria, as described in Figure 5-2 on page 5-6.
To access data in AS1 and AS2, the program has to have EAX-authority to
those address spaces. To access data in address spaces that have private
entries, the system checks the EAX-authority of the program to the address
space.
To access data in AS3 or the data space, the program does not need
EAX-authority. Entries for data spaces are public entries. To access data in
address spaces that have public entries, the system does not check the
program's EAX-authority.
private
AS1
DU-AL
AS2
PGM 1 private
public
ALETDS1 DC F AS3
ALETAS1 DC F
ALETAS2 DC F
ALETAS3 DC F
To delete the entries for the three address spaces, the program might need
EAX-authority to the address spaces. A supervisor state or PSW key 0 - 7 program
can use the CHKEAX=YES parameter on the ALESERV macros to require this
system checking. Problem programs must have EAX-authority.
Figure 4-19 on page 4-33 shows the AX value for an address space and the EAX
value of a program in supervisor state or PSW key 0 - 7. Assume that the
ALESERV ADD macro included CHKEAX=YES, or the default, and that the entry
for address space AS2 is a private entry, ACCESS=PRIVATE.
The AX value of AS1 indexes into the AT of AS2. The system checks this
value on PT or SSAR instructions to find out if a caller in AS1 has the authority
to (1) PT to AS2 or (2) set AS2 as its secondary address space. If the entry in
AS2's authority table has the PT authority, PGM1 can PT to AS2; if SSAR
authority is on, PGM1 can set AS2 as its secondary address space.
In Figure 4-19, the value of the AX and EAX is 4. The value 4 is an arbitrary value
chosen for illustrative purposes. You obtain an AX or EAX value from the AXRES
macro. The entry that the AX and EAX indexes into indicates SSAR authority is on,
which means that PGM1 is EAX-authorized to the address space.
The example also shows the difference between cross memory data movement
with a move to primary (MVCP) and a data movement performed through ARs and
the MVC instruction. PGM1 uses the SSAR instruction to establish AS2 as the
secondary address space, then it uses MVCP to move data from AS2 to AS1.
PCRTN issues the SAC instruction to change the ASC mode to AR mode. Having
loaded the addresses and ALETs into the AR/GPR correctly, PCRTN uses MVC to
move data from AS2 to AS1.
Notes:
1. If PCRTN had used CHKEAX=NO on ALESERV, the system would not have
checked the EAX.
2. If PCRTN had used ACCESS=PUBLIC on ALESERV, the system would not
have checked the EAX value when programs referenced that address space
through that access list entry.
3. Consider the storage key and data access and integrity issues when you add
entries for address spaces. Most problem state programs execute with a PSW
key of 8, which allows them to use public access list entries to modify data in
storage that has storage key 8.
4. The EAX value can be the same as the AX value.
AX=4 AS2
AS1
Authority
table
PT authority
. . .
PGM1 1 SSAR authority
SSAR AS2
MVCP
Data
EAX Authorization
AS1 AS2
Authority
table
PT authority
PROG1 . . .
1 SSAR authority
PC
EAX=4
PCRTN
ALESERV ADD ...
SAC 512
MVC Data
In some cases, supervisor state or PSW key 0 - 7 programs in the target address
space can change the EAX checking that the system does for programs accessing
data in their address space. For example, in Figure 4-19, a program in AS2 could
use the ATSET macro to change SSAR authority in the fifth entry in the authority
table. Because the entry was added as CHKEAX=YES and ACCESS=PRIVATE, if
the program turned SSAR authority off, PCRTN could no longer access the address
space through that access list entry. If the entry had been added CHKEAX=NO and
ACCESS=PUBLIC, programs in the target address space would be unable to
prevent access through those access list entries.
Remember that the EAX-authority to an address space is the same as the SSAR
authority. In other words, authority for an address space to issue the SSAR
instruction for the target address space is the same as the authority to add an entry
for an address space to an access list or access data in that address space
through ARs. The same ATSET macro that sets the PT and SSAR authority in the
target address space's authority table also sets authority table bits that correspond
to the EAX.
As you read the following procedures for a program in the accessing address space
and a program in the target address space, keep three facts in mind:
A problem state program with PSW key 8 - F must be EAX-authorized to the
target address space before it can issue the ALESERV ADD or ALESERV
DELETE macros for that address space. A supervisor state or PSW key 0 - 7
program might require EAX-authorization.
The target address space must give explicit permission to the accessing
program.
The only way for a program in the accessing address space to get a non-zero
EAX is to issue a stacking PC instruction, which establishes the appropriate
EAX.
The program has that EAX value only while the PC routine is running.
The TESTART macro tests the validity of an ALET and the EAX-authority of the
caller to access the address/data space that the ALET represents. The macro
returns a code that identifies whether the ALET is:
0
A valid ALET for the DU-AL
A valid ALET for the PASN-AL
1
Invalid
Input to TESTART is the ALET that it received and the EAX of the calling program.
To get the EAX, a program can issue the extract stacked state (ESTA) instruction
to retrieve the EAX from the current linkage stack entry. The first information field in
the linkage stack entry contains the EAX of the caller. (If the EAX is 0, the ALET is
for a public entry.) See “Extract Stacked State (ESTA) Instruction” on page 2-6 for
a description of ESTA instruction, an example of its use, and the format of the
information field. Figure 4-20 on page 4-37 shows an example of PGM1 (in
problem state) requesting service from PCRTN (in supervisor state).
AS2
private entry
AS1
PGM 1
PC
ALET2 DC F
PCRTN
ESTA ...
TESTART ...
ALETAS2 DC F
Having received the ALET from another program, PGM1 passes the ALET to
PCRTN for PCRTN's use. Before it uses the ALET, PCRTN issues the TESTART
macro to test its validity.
To get the EAX value of the caller, PCRTN issues the ESTA instruction. PCRTN
determines which of the return codes is acceptable for its purposes. For example, it
might accept only ALETs that index public entries on a DU-AL.
The following code checks for ALETs of 0 and 1. It then changes the ALET of 0 to
1 to reflect the change in primary and secondary address space at the space
switch.
The following example shows how a program can obtain storage in another
address space, provided it has the proper authorization. The caller uses ALESERV
ADD to obtain an ALET representing the address space (or uses an ALET with the
value 1 or 2) and then STORAGE OBTAIN to obtain storage. The example
assumes that the caller passes the STOKEN of the target address space by a
pointer in AR/GPR 1 on entry. It also assumes that this program has the proper
authorization to the target address space.
The program requests one page (4096 bytes) of storage above 16 megabytes in
subpool 0 in the target address space.
Such asynchronous exit routines include those caused by the ATTACH macro with
the ETXR parameter, the STIMER macro with the EXIT parameter, the SCHEDXIT
macro, and some attention and I/O exit routines.
When control returns to your program from an asynchronous exit routine, the
system deletes the DU-AL associated with the asynchronous routine and restores
your program's DU-AL and EAX value.
Consider that a program changes ASC mode from primary to AR mode and, while
in AR mode, issues the LINKX and STORAGE macros. When it changes ASC
mode, it should issue the following:
SAC 512
SYSSTATE ASCENV=AR
The LINKX macro generates different code and addresses, depending on the ASC
mode of the caller. During the assembly of LINKX, the LINKX macro service checks
the setting of the global bit. Because the global bit indicates that the caller is in AR
mode, LINKX generates code and addresses that are appropriate for callers in AR
mode.
The STORAGE macro generates the same code and addresses whether the caller
is in AR mode or primary mode. Therefore, the STORAGE macro service does not
check the global bit.
When the program changes back to primary mode, it should issue the following:
SAC
SYSSTATE ASCENV=P
Using X-Macros
Some macro services, such as LINK and LINKX, offer two macros, one for callers
in primary mode and one for callers in either primary or AR mode. The name of the
IBM recommends that you always use ESTAEX unless your program and your
recovery routine are in 24-bit addressing mode, or your program requires a branch
entry. In those cases you should use ESTAE.
Note that an X-macro generates a larger parameter list than the corresponding non
X-macro. A program using the X-macros must provide a larger parameter list than if
it used the non X-macro.
If your program must issue macros while it is in AR mode, make sure the macros
support AR mode callers and that SYSSTATE ASCENV=AR is coded. For
information about macros that support AR mode callers and how to issue the
macros correctly, see “Address Space Control (ASC) Mode” in the appropriate
macro description in one of the following:
OS/390 MVS Programming: Authorized Assembler Services Reference
ALE-DYN
OS/390 MVS Programming: Authorized Assembler Services Reference
ENF-IXG
OS/390 MVS Programming: Authorized Assembler Services Reference
LLA-SDU
OS/390 MVS Programming: Authorized Assembler Services Reference
SET-WTO.
If you rewrite programs and use the X-macro instead of the non X-macro, you must
change both the list and execute forms of the macro. If you change only the
Do not pass other ALETs; the system does not support them.
Some of the macros that support callers in AR mode require that parameter lists be
in the primary address space. To learn where the input parameter lists must reside,
see the macro descriptions in one of the following:
OS/390 MVS Programming: Authorized Assembler Services Reference
ALE-DYN
OS/390 MVS Programming: Authorized Assembler Services Reference
ENF-IXG
OS/390 MVS Programming: Authorized Assembler Services Reference
LLA-SDU
OS/390 MVS Programming: Authorized Assembler Services Reference
SET-WTO
OS/390 MVS Programming: Assembler Services Reference.
Some macro services accept control parameters from a program. Do not pass a
parameter that resides at location zero in a data space to a macro service. Some
macros use the value 0 to designate that a parameter list was not specified.
See OS/390 MVS IPCS Commands for more information about the ARCHECK
subcommand.
The DSPSERV macro with the TYPE=BASIC parameter (the default) manages data
spaces. Use this macro to:
Create a data space
Release an area in a data space
Delete a data space
Expand the amount of storage in a data space currently available to a program.
Load an area of a data space into central storage
Page an area of a data space from central storage
A program's ability to create, delete, and access data spaces depends on whether
it is a problem state program with PSW key 8 - F, a supervisor state program, or a
PSW key 0-7 program. All programs can create, access, and delete the data
spaces they own or created, and can share their data spaces with other programs
running in the same address space. In addition, supervisor state or PSW key 0-7
programs can share their data spaces with programs in other address spaces.
Unless otherwise stated, this chapter describes what the supervisor state or
PSW key 0-7 programs can do.
Use this chapter to help you create, use, and delete data spaces. In addition, four
sources of information can help you understand how to use data spaces:
Chapter 1 can help you verify that a data space, rather than a hiperspace
would be the best choice for your program. See “Basic Decision: Data Space or
Hiperspace” on page 1-7.
Chapter 4, “Using Access Registers,” contains many examples of setting up
addressability to data spaces.
One of the following contains the syntax and parameter descriptions for the
macros that are mentioned in this chapter:
– OS/390 MVS Programming: Authorized Assembler Services Reference
ALE-DYN
– OS/390 MVS Programming: Authorized Assembler Services Reference
ENF-IXG
– OS/390 MVS Programming: Authorized Assembler Services Reference
LLA-SDU
– OS/390 MVS Programming: Authorized Assembler Services Reference
SET-WTO.
Principles of Operation contains descriptions of how to use the instructions that
manipulate access registers.
When a program uses the DSPSERV macro to create a data space, the system
returns a STOKEN that uniquely identifies the data space. (Data spaces do not
have ASIDs.) The program then gains access to the data space: it uses the
ALESERV macro to add an entry to an access list and obtain an access list entry
token (ALET). The entry on the access list identifies the newly created data space
and the ALET indexes the entry.
Data Space X
The process of giving the STOKEN to ALESERV, adding an entry to an access list,
and receiving an ALET is called establishing addressability to the data space.
The access list can be one of two types:
A dispatchable unit access list (DU-AL) — the access list that is associated with
a TCB or SRB
A primary address space access list (PASN-AL) — the access list that is
associated with an address space
The data space virtual area is available to programs that run under the TCB that
owns the data space and is available, in some cases, to other programs.
When a TCB terminates, the system deletes any data spaces that the TCB owns.
The system swaps a data space in and out as it swaps in and out the address
space that dispatched the owning TCB. Thus, data spaces shared by programs that
run in other address spaces must be owned by TCBs in non-swappable address
spaces.
A data space can remain active even after the creating TCB terminates. When the
program creates a data space, it can assign ownership of the data space to a TCB
Because access lists and data spaces belong to units of work, keep in mind the
relationship between the program and the unit of work under which it runs. For
simplicity, however, this chapter describes access lists and data spaces as if they
belong to programs. For example, “a program's DU-AL” means “the DU-AL that
belongs to the TCB under which a program is running.”
Two programs run in address space AS1, both of which owns data spaces:
A problem state program, PGM1, running under TCB A that owns
SCOPE=SINGLE data space DS1
A supervisor state program, PGM2, running under TCB B that owns
SCOPE=ALL data space DS2
PASN-AL DS1
SCOPE=ALL
DS2 SCOPE=SINGLE
AS1
DU-AL
TCB A AS2
PGM 1
ALETDS1 DS F DS1
TCB C
PGM 3
DU-AL
TCB B TCB D
PGM 2 PGM 4 DS2
ALETDS2 DS F ALET2 DS F
STOKDS2 DS CLB STOK2 DS CLB
The four programs have the following relationship to the two data spaces.
. PGM1 can access DS1 through the DU-AL. BEcause it runs in problem state,
. PGM1 cannot add an entry for DS1 to the PASN-AL.
. PGM2 can access DS2 through its PASN-AL. (If PGM1 passes the STOKEN for
DS1 to PGM2, PGM2 could add an entry to the PASN-AL for DS1. If PGM2
passes the ALET for DS2 to PGM1, PGM1 could access DS2 through the
PASN-AL.)
. PGM3 cannot access either DS1 or DS2.
. PGM4 can access DS2 through its DU-AL
Two programs run in address space AS2, neither of which owns data spaces:
A problem state program, PGM3, running under TCB C
A supervisor state program, PGM4, running under TCB D
Earlier in this chapter, it was stated that storage within a data space is available to
programs that run under the TCB that owns the data space. The exception to this
statement is when the owning TCB has the data space entry on the PASN-AL and
a program running under the TCB uses a space-switching PC instruction. During
the time that the primary address space is not the owning TCB's home address
space, the program cannot access the data space. For example, in Figure 5-1 on
page 5-5, consider what happens to PGM2 if it should PC to PGM3. Because the
entry for DS2 is on AS1's PASN-AL, PGM2 cannot access DS2 while it is running
in AS2.
Figure 5-2 (Page 1 of 2). Creating, Deleting, and Using Data Spaces
Type of data A problem state, key 8 - F A supervisor state or key 0-7
Function space program: program:
CREATE SCOPE=SINGLE Can create a SCOPE=SINGLE data Can create the data space if its primary
space. or home address space is the same as
the intended owner's home address
space
SCOPE=ALL Cannot create the data spaces. Can create the data space if its primary
SCOPE=COMMON or home address space is the same as
the intended owner's home address
space
DELETE SCOPE=SINGLE Can delete the SCOPE=SINGLE Can delete a SCOPE=SINGLE data
data spaces it owns or created if its space if its primary or home address
PSW key matches the storage key of space is the same as the owner's home
the data space. address space.
SCOPE=ALL Cannot delete the data space. Can delete the data space if its primary
SCOPE=COMMON or home address space is the same as
the owner's home address space.
RELEASE SCOPE=SINGLE Can release storage in the data Can release storage in a
spaces it owns or created if its PSW SCOPE=SINGLE data space if its
key matches the storage key of the primary or home address space is the
data space. same as the owner's home address
space and its PSW key matches the
storage key of the data space.
SCOPE=ALL Cannot release the storage. Can release storage in the data space if
SCOPE=COMMON its PSW key matches the storage key of
the data space.
EXTEND SCOPE=SINGLE Can extend the current size if it owns Can extend the current size.
SCOPE=ALL the data space.
SCOPE=COMMON
LOAD or OUT SCOPE=SINGLE Can page areas into (and out of) Can page areas into and out of central
SCOPE=ALL central storage from (or to) a data storage.
SCOPE=COMMON space created by any task in its
address space.
Names of data spaces and hiperspaces must be unique within an address space.
You have a choice of choosing the name yourself or asking the system to generate
a unique name for your data space. To keep you from choosing names that it uses,
MVS has some specific rules for you to follow. These rules are listed in the
DSPSERV description under the NAME parameter in OS/390 MVS Programming:
Authorized Assembler Services Reference ALE-DYN.
Use the GENNAME parameter to ask the system to generate a unique name for
your data space. GENNAME=YES generates a unique name that has as its last
one to three characters the first one to three characters of the name you specify on
the NAME parameter.
Example 1
If PAY␣␣␣␣␣ is the name you supply on the NAME parameter and you code
GENNAME=YES, the system generates the following name:
nccccPAY
where the system generates the digit n and the characters cccc, and appends the
characters PAY that you supplied.
Example 2
If J␣␣␣␣␣␣␣ is the name you supply on the NAME parameter and you code
GENNAME=YES, the system generates the following name:
nccccJ
Note that the system has a supply of 99,999 names it can generate for data spaces
and hiperspaces for a single address space. If the system tries to generate a name
and finds that it has used up the supply of names, it rejects the program with a
return code of “08” and a reason code of “0012.” The system restores the supply of
names whenever the number of such data spaces and hiperspaces owned by the
address space goes to zero. Therefore, if your program is a batch job and it is
creating a data space, do not:
Request that the system generate a name (through the GENNAME parameter)
and
Assign ownership to a TCB that remains for the life of the address space.
If you create the data space with a storage key of 0 through 7, the system does not
check the size against the total storage already used for data spaces and
hiperspaces. If you create the data space with a storage key of 8 through F, the
system adds the initial size of the space to the cumulative total of all data spaces
and hiperspaces for the address space and checks this total against the installation
limit for an address space.
For information on the IBM defaults and how to change them, see “Limiting Data
Space Use” on page 5-14.
The BLOCKS parameter allows you to specify a maximum size and initial size
value.
The maximum size identifies the largest amount of storage you will need in the
data space.
An initial size identifies the amount of the storage you will immediately use.
As you need more space in the data space, you can use the DSPSERV EXTEND
macro to increase the size of the available storage, thus increasing the storage in
the data space that is available for the program. The amount of available storage is
called the current size. (At the creation of a data space, the initial size is the same
If you know the default size and want a data space smaller than or equal to that
size, use the BLOCKS=maximum size or omit the BLOCKS parameter.
If you know what size data space you need and are not concerned about
exceeding the installation limit, set the maximum size and the initial size the same.
BLOCKS=0, the default, establishes a data space with the maximum size and the
initial size both set to the default size.
If you do not know how large a data space (with storage key 8 - F) you will
eventually need or you are concerned with exceeding the installation limit, set the
maximum size to the largest size you might possibly use and the initial size to a
smaller amount, the amount you currently need.
Use the NUMBLKS parameter to request that the system return the size of the data
space it creates for you. You would use NUMBLKS, for example, if you did not
specify BLOCKS and do not know the default size.
Figure 5-3 shows an example of using the BLOCKS parameter to request a data
space with a maximum size of 100,000 bytes of space and a current size of 20,000
bytes.
Dataspace
Not available for immediate
use by the program.
Maximum size
100,000 bytes
Current size
20,000 bytes Available for immediate
use by the program.
As your program uses more of the data space storage, it can use DSPSERV
EXTEND to extend the current size. “Extending the Current Size of a Data Space”
on page 5-19 describes extending the current size and includes an example of how
to extend the current size of the data space in Figure 5-3.
Unless you specify a size of 2 gigabytes and the processor does not support an
origin of zero, the system gives you the size you request, regardless of the location
of the origin. An example of the problem you want to avoid in addressing data
space storage is described as follows:
Suppose a program creates a data space of 1 megabyte and assumes the data
space starts at address zero when it really begins at the address 4096. Then, if
the program uses an address lower than 4096 in the data space, the system
abends the program.
The data space that the system creates has the same storage protection key as the
PSW key of the caller.
Figure 5-4 on page 5-12 shows a SCOPE=ALL data space DSX with a storage
key of 5, owned by a subsystem. PGM1 and PGM2, with PSW keys of 8, have
entries for the data space on their DU-ALs and have the ALETs for these entries.
However, their PSW keys do not match the storage key of the data space. Their
ability to access data in DSX depends on how the creating program coded the
FPROT parameter on the DSPSERV macro.
If the creating program specified no fetch-protection (FPROT=NO), PGM1 and
PGM2 can fetch from but not store into the data space.
Figure 5-4 shows one way PGM1 and PGM2 can gain fetch and store capability to
the data space. The subsystem provides a PC routine with a PSW key of 5 in the
common area. To access the data space, the two users PC into the subsystem's
address space and have access to its data space.
DSX
SCOPE=ALL
Data Space
owned by
subsystem
DU-AL DU-AL
PGM 1 PGM 2
(PSW key 8) (PSW key 8)
PC DSX PC DSX
ALETDSX DC F ALETDSX DC F
PC routine
(PSW key 5)
COMMON AREA
When you use ALESERV, you can omit the ACCESS parameter, which specifies
whether an access list entry is public or private. Data space entries are always
public, the default for ACCESS.
See OS/390 DFSMS Checkpoint/Restart for more information about the CHKPT
macro.
Serializing the use of the storage in a data space requires methods like those you
would use to serialize the use of virtual storage in an address space. Use the ENQ
and DEQ macros, compare and swap operations, or establish your own protocol for
serializing data space use.
The routines can be called in either primary or AR mode; however, during the time
they manipulate data in a data space, they must be in AR mode. The source and
target locations are assumed to be the same length (that is, the target location is
not filled with a padding character).
The first COPYDATA example uses the MVC instruction to move the specified data
in groups of 256 bytes:
COPYDATA DS D
BAKR 14, SAVE CALLER'S STATUS
LAE 12,(,) BASE REG AR
BALR 12, BASE REG GR
USING ,12 ADDRESSABILITY
.
LTR 4,4 IS LENGTH NEGATIVE OR ZERO?
BNP COPYDONE YES, RETURN TO CALLER
.
S 4,=F'256' SUBTRACT 256 FROM LENGTH
BNP COPYLAST IF LENGTH NOW NEGATIVE OR ZERO
THEN GO COPY LAST PART
.
COPYLOOP DS H
MVC (256,2),(3) COPY 256 BYTES
LA 2,256(,2) ADD 256 TO TARGET ADDRESS
LA 3,256(,3) ADD 256 TO SOURCE ADDRESS
S 4,=F'256' SUBTRACT 256 FROM LENGTH
BP COPYLOOP IF LENGTH STILL GREATER THAN
ZERO, THEN LOOP BACK
The second COPYDATA example uses the MVCL instruction to move the specified
data in groups of 1048576 bytes:
COPYDATA DS D
BAKR 14, SAVE CALLER'S STATUS
LAE 12,(,) BASE REG AR
BALR 12, BASE REG GR
USING ,12 ADDRESSABILITY
.
LA 6,(,2) COPY TARGET ADDRESS
LA 7,(,3) COPY SOURCE ADDRESS
LTR 8,4 COPY AND TEST LENGTH
BNP COPYDONE EXIT IF LENGTH NEGATIVE OR ZERO
.
LAE 4,(,3) COPY SOURCE AR/GR
L 9,COPYLEN GET LENGTH FOR MVCL
SR 8,9 SUBTRACT LENGTH OF COPY
BNP COPYLAST IF LENGTH NOW NEGATIVE OR ZERO
THEN GO COPY LAST PART
.
COPYLOOP DS H
LR 3,9 GET TARGET LENGTH FOR MVCL
LR 5,9 GET SOURCE LENGTH FOR MVCL
MVCL 2,4 COPY DATA
ALR 6,9 ADD COPYLEN TO TARGET ADDRESS
ALR 7,9 ADD COPYLEN TO SOURCE ADDRESS
LR 2,6 COPY NEW TARGET ADDRESS
LR 4,7 COPY NEW SOURCE ADDRESS
SR 8,9 SUBTRACT COPYLEN FROM LENGTH
BP COPYLOOP IF LENGTH STILL GREATER THAN
ZERO, THEN LOOP BACK
.
COPYLAST DS H
AR 8,9 ADD COPYLEN
LR 3,8 COPY TARGET LENGTH FOR MVCL
LR 5,8 COPY SOURCE LENGTH FOR MVCL
MVCL 2,4 COPY LAST PART OF THE DATA
B COPYDONE BRANCH TO EXIT CODE
COPYLEN DC F'148576' AMOUNT TO MOVE ON EACH MVCL
COPYDONE DS H
.
EXIT CODE
LA 15, SET RETURN CODE OF
PR RETURN TO CALLER
The anchor and the extents allow callable cell pool services to keep track of the cell
pool.
This section gives an example of one way a program would use the callable cell
pool services. This example has only one cell pool with one extent. In the example,
you will see that the program has to reserve storage for the anchor and the extent
and get their addresses.
For more information on how to use the services and an example that includes
assembler instructions, see the chapter on callable cell pool services in OS/390
MVS Programming: Assembler Services Guide.
Assume that you have an application that requires up to 4,000 records that are
each 512 bytes in length. You have decided that a data space is the best place to
hold this data. Callable cell pool services can help you build a cell pool, each cell
having a size of 512 bytes. The steps are as follows:
1. Create a data space (DSPSERV CREATE macro)
Specify a size large enough to hold 2,048,000 bytes of data (4000 times 512)
plus the data structures that callable cell pool services need.
2. Add the data space to an access list (ALESERV macro)
The choice of DU-AL or PASN-AL depends on how you plan to share the data
space.
3. Reserve storage for the anchor and obtain its address
The anchor (of 64 bytes) can be in the address space or the data space. In this
example, the anchor is in the data space.
4. Initialize the anchor (CSRPBLD service) for the cell pool
At this point, the cell pool structures are in place and users can begin to request
cells. Figure 5-5 describes the areas you have defined in the data space.
Data Space
Access List
The pool of
4000 cells,
each 512 2048000 bytes
AR bytes in size
ALET
anchor 64 bytes
Figure 5-5. Example of Using Callable Cell Pool Services for Data Spaces
A program that has addressability to the data space can then obtain a cell (or cells)
through the CSRPGET service. Input to CSRPGET includes the ALET of the space
and the address of the anchor. CSRPGET returns the address of the cell (or cells)
it allocates.
The system increases the data space by the amount you specify, unless that
amount would cause the system to exceed one of the following:
The data space maximum size, as specified by the BLOCKS parameter on
DSPSERV CREATE when the data space was created
The installation limit for the combined total of data space and hiperspace
storage with storage key 8 -F per address space. These limits are either the
system default or are set in the installation exit IEFUSI.
If one of those limits would be exceeded, the VAR parameter tells the system how
to satisfy the EXTEND request.
VAR=YES (the variable request) tells the system to extend the data space as
much as possible, without exceeding the limits set by the data space maximum
size or the installation limits. In other words, the system extends the data space
to one of the following sizes, depending on which is smaller:
– The maximum size specified on the BLOCKS parameter
– The largest size that would still keep the combined total of data space and
hiperspace storage within the installation limit.
VAR=NO (the default) tells the system to:
– Abend the caller, if the extended size would exceed the maximum size
– Reject the request, if the data space has storage key 8 - F and the request
would exceed the installation limits
Consider the data space in Figure 5-3 on page 5-10, where the current (and initial)
size is 20,000 bytes and the maximum size is 100,000 bytes. To increase the
current size to 50,000 bytes, adding 30,000 bytes to the current size, the creating
program would code the following:
The storage the program can use would then be 50,000 bytes, as shown in
Figure 5-6.
Data space
Maximum size
100,000 bytes
Current size
50,000 bytes
If you use VAR=YES when you issue the EXTEND request, use NUMBLKS to find
out the size by which the system extended the data space.
A problem program with PSW key 8 - F can delete only the data spaces it created
or owns, provided it has a PSW key that matches the storage key of the data
space.
The following example shows you how to delete a data space entry from an access
list and then delete the data space.
ALESERV DELETE,ALET=DSPCALET REMOVE DS FROM AL
DSPSERV DELETE,STOKEN=DSPCSTKN DELETE THE DS
.
DSPCALET DS F DATA SPACE ALET
DSPCSTKN DS CL8 DATA SPACE STOKEN
IBM recommends that you explicitly remove the entry for a data space from the
access list and delete the space before the owning task terminates. This frees up
resources when they are no longer needed, and avoids excess processing at
termination time. However, if you don't, MVS automatically does it for you at
termination time.
The lines of code in the middle of the example (under the comment “MANIPULATE
DATA IN THE DATA SPACE”) illustrate how, with the code in AR mode, the
familiar assembler instructions store, load, and move a simple character string into
the data space and move it within the data space. The example ends with the
program deleting the data space entry from the access list, deleting the data space,
and returning control to the caller.
DSPEXMPL CSECT
DSPEXMPL AMODE 31
DSPEXMPL RMODE ANY
BAKR 14, SAVE CALLER'S STATUS ON STACK
SAC 512 SWITCH INTO AR MODE
SYSSTATE ASCENV=AR SET GLOBAL BIT FOR AR MODE
.
ESTABLISH AR/GPR 12 AS BASE REGISTER
.
LAE 12, SET BASE REGISTER AR
BASR 12, SET BASE REGISTER GPR
USING ,12
CREATE THE DATA SPACE AND ADD THE ENTRY TO THE ACCESS LIST
.
DSPSERV CREATE,NAME=DSPCNAME,STOKEN=DSPCSTKN, X
BLOCKS=DSPBLCKS,ORIGIN=DSPCORG
ALESERV ADD,STOKEN=DSPCSTKN,ALET=DSPCALET,AL=WORKUNIT
.
.
ESTABLISH ADDRESSABILITY TO THE DATA SPACE
.
LAM 2,2,DSPCALET LOAD ALET OF SPACE INTO AR2
L 2,DSPCORG LOAD ORIGIN OF SPACE INTO GR2
USING DSPCMAP,2 INFORM ASSEMBLER
.
MANIPULATE DATA IN THE DATA SPACE
.
L 3,DATAIN
ST 3,DSPWRD1 STORE INTO DATA SPACE WRD1
.
MVC DSPWRD2,DATAIN COPY DATA FROM PRIMARY SPACE
INTO THE DATA SPACE
MVC DSPWRD3,DSPWRD2 COPY DATA FROM ONE LOCATION
IN THE DATA SPACE TO ANOTHER
MVC DATAOUT,DSPWRD3 COPY DATA FROM DATA SPACE
INTO THE PRIMARY SPACE
.
Note that you cannot code ACCESS=PRIVATE on the ALESERV macro when you
request an ALET for a data space; all data space entries are public.
To gain addressability to the space, issue the ALESERV ADD macro with the
AL=PASN parameter. ALESERV ADD then adds an entry for the data space to the
caller's PASN-AL and returns the ALET for that entry. Additionally, ALESERV ADD
adds the same entry to every PASN-AL in the system. As new address spaces
come into the system, their PASN-ALs have this entry on them. All programs use
the same ALET to access the data space. In other words, with the entry on all
PASN-ALs, programs in other address spaces do not have to issue the ALESERV
ADD macro. However, the creating program must pass the ALET for the data
space to the other programs.
PASN-AL
PASN-AL
PASN-AL
COMDS
COMDS
COMDS
COMDS
PROG1
DSPSERV . . .
PROG 2
ALESERV . . .
SCOPE=COMMON
COMMON AREA
Your installation can use the IEASYSxx member of SYS1.PARMLIB to set limits on
the total number of SCOPE=COMMON data spaces available to programs. For
information about how to set up this member, see OS/390 MVS Initialization and
Tuning Reference.
A program can use the ETXR option on ATTACH or ATTACHX to specify the
address of an end-of-task routine to be given control after the new task is normally
or abnormally terminated. The exit routine receives control when the originating
task becomes active after the subtask is terminated. The routine runs
asynchronously under the originating task. Upon entry, the routine has an empty
dispatchable unit access list (DU-AL). To establish addressability to a data space
created by the originating task and shared with the terminating subtask, the routine
can use the ALESERV macro with the ADD parameter, and specify the STOKEN of
the data space.
The following example, represented by Figure 5-8, assumes that program PGM1
(running under TCBA) has created a SCOPE=SINGLE data space DS1 and
established addressability to it. Its DU-AL has several entries on it, including one for
DS1. PGM1 uses the ATTACHX macro to attach subtask TCBB. PGM1 uses the
ALCOPY=YES parameter to pass a copy of its DU-AL to TCBB. It can also pass
The figure shows the two programs, PGM1 and PGM2, sharing the same data
space.
Current linkage
stack entry } (stack)
(unstack) call return
The following example shows you how TCBA attaches TCBB and passes its
DU-AL:
DSPSERV CREATE,NAME=DSNAME,BLOCKS=DSSIZE,STOKEN=DSSTOK,ORIGIN=DSORG
ALESERV ADD,STOKEN=DSSTOK,ALET=DSALET
ATTACHX EP=PGM2,ALCOPY=YES
.
DSNAME DC CL8'MYDSPACE' DATA SPACE NAME
DSSTOK DS CL8 DATA SPACE STOKEN
DSALET DS F DATA SPACE ALET
DSORG DS F ORIGIN RETURNED
DSSIZE DC F'256' DATA SPACE 1 MEGABYTES IN SIZE
The two DU-ALs do not necessarily stay identical; after the attach, PGM1 and
PGM2 are free to add and delete entries on their own DU-ALs.
If TCBA terminates, the system deletes the data space that belonged to TCBA and
terminates PGM2.
The following example describes a problem state program with PSW key 8 - F
creating a data space and sharing the data in that space with other programs in the
address space. Additionally, the program assigns ownership of the data space to its
Unless PGM1 or the job step TCB explicitly deletes the data space, the system
deletes the data space when the job step task terminates.
Note that when PGM1 issues the ALESERV ADD to add the entry for DS1 to the
PASN-AL, the system checks to see if an entry for DS1 already exists on the
PASN-AL. If an entry already exists, and a problem state program with PSW key 8
- F added the entry, the system rejects the ALESERV ADD request. However,
PGM1 can still access the data space. The system will simply not create a
duplicate entry.
The task that issues the DIV IDENTIFY owns the pointers and structures
associated with the ID that DIV returns. Any program can use DIV IDENTIFY;
however, the system checks the authority of programs that try to use subsequent
DIV services for the same ID.
For problem state programs with PSW key 8 - F, data-in-virtual allows only the
issuer of the DIV IDENTIFY to use other DIV services for the ID. That means, for
example, that if a problem state program with PSW key 8 issues the DIV
IDENTIFY, another problem state program with PSW key 8 cannot issue DIV MAP
for the same ID. The issuer of DIV IDENTIFY can use DIV MAP to map a VSAM
linear data set to a data space window, providing the program owns the data
space.
Figure 5-9 shows what data-in-virtual requires of the tasks that represent the
authorized programs that issue the DIV macros. The table does not show the
IDENTIFY service because data-in-virtual does not have restrictions on this service.
Figure 5-9. Requirements for Authorized Programs using the DIV Services with Data Spaces
ACCESS MAP SAVE UNIDENTIFY,
UNACCESS, UNMAP,
RESET
Object is a linear Task that issued the Task (or authorized Task (or authorized Task (or authorized
data set, window DIV IDENTIFY. subtask of the task) subtask of the task) subtask of the task)
is in a data that issued the DIV that issued the DIV that issued the DIV
space IDENTIFY. (See IDENTIFY. The task IDENTIFY. The task
Notes.) does not have to own does not have to own
the data space. the data space.
Notes:
If the program is in supervisor state or PSW key 0 - 7, any task within the caller's primary address space can own the data
space.
If the program is APF-authorized, but not supervisor state or PSW key 0 - 7, the caller must own or be the creator of the
data space.
Your program can map one data-in-virtual object into more than one data space.
Or, it can map several data-in-virtual objects within a single data space. In this way,
data spaces can provide large reference areas available to your program.
Figure 5-10 shows a data-in-virtual object mapped into a data space. The “window”
is the entire data space.
Address Space
Permanent Object
DU-AL
Program
DS1
DS1
Issuing DSPSERV LOAD does not guarantee that the pages will be in central
storage; the system honors your request according to the availability of central
storage. Also, after the pages are loaded, page faults might occur elsewhere in the
system and cause the system to move those pages out of central storage.
If you finish processing through one or more 4K block of data space storage, you
can use DSPSERV OUT to page the area out of central storage. The system will
make these real storage frames available for reuse. DSPSERV OUT requires that
you specify the STOKEN, the beginning address of the area, and the size of the
area. (Note that DSPSERV OUT corresponds to the PGSER macro with the OUT
parameter.)
When your program has no further need for the data in a certain area of a data
space, it can use DSPSERV RELEASE to free that storage.
To release storage in a data space, the caller must have a PSW key that is either
zero or equal to the key of the data space storage the system is to release. If the
caller is in supervisor state with PSW key 0 - 7 and is releasing a SCOPE=SINGLE
data space, the caller's home or primary address space must be the same as the
owner's home address space. If the caller is in problem state with PSW key 8 - F
and is releasing a SCOPE=SINGLE data space, the caller must own or have
created the data space. Otherwise, the system abnormally ends the caller.
Use DSPSERV RELEASE instead of the MVCL instruction to clear 4K byte blocks
of storage to zeroes because:
DSPSERV RELEASE is faster than MVCL for very large areas.
Pages released through DSPSERV RELEASE do not occupy space in
processor or auxiliary storage.
Like a TCB, an SRB routine has a DU-AL and can use the PASN-AL of its address
space. The DU-AL that the system gives the SRB routine can be either empty or a
copy of the scheduling program's DU-AL. When you issue the SCHEDULE macro
to schedule an SRB, you can obtain:
An empty DU-AL for the SRB routine by specifying MODE=NONXM. With a
mode of NONXM, the SRB routine runs with its primary, secondary, and home
address spaces equal to SRBASCB.
A copy of the scheduling routine's DU-AL by specifying MODE=FULLXM. If the
scheduling program creates entries in the DU-AL after scheduling the SRB, the
SRB routine will not have access to those data spaces. With a mode of
FULLXM, the SRB runs with the same primary, secondary, and home
addressability as the scheduling program.
Figure 5-11 and Figure 5-12 illustrate the attributes of an SRB that is scheduled
with MODE=FULLXM and MODE=NONXM. Figure 5-13 identifies the home,
primary, and secondary addressability for each type of invocation of the
SCHEDULE macro.
DATA
SPACE
TCB A PC ROUTINE
PC
ALETDS5 DS F
SRB
ROUTINE
COMMON AREA
SRB
Figure 5-11. Scheduling an SRB with an Empty DU-AL and in a Non-Cross Memory Environment
DATA
SPACE
AS1 AS2
DU-AL
TCB A PC ROUTINE
GETMAIN
DSPSERV CREATE DS5
SCHEDULE ...MODE=FULLXM
ALESERV ADD
ALETDS5 DS F DU-AL
PC
ALETDSS DS F
DS5
SRB SRB
ROUTINE
COMMON AREA
Figure 5-12. Scheduling an SRB with a Copy of the Scheduling Program's DU-AL and in the Same Cross Memory
Environment
Figure 5-13. Addressability for Each Type of Invocation of the SCHEDULE Macro
NONXM FULLXM
TCB SRB TCB SRB
HOME AS1 AS3 AS1 AS1
Primary AS1 AS3 AS1 AS1
Secondary AS2 AS3 AS2 AS2
When you use the DSPSERV CREATE macro to create the data space and assign
ownership, you must identify the TCB through the TTOKEN parameter. A TTOKEN
identifies a TCB. Unlike TCB addresses, TTOKENs are unique within the IPL; the
system does not assign this same identifier to any other TCB until the next IPL. If
you know the TCB address of the task that is to receive ownership, but not the
TTOKEN, use the TCBTOKEN macro. The TCBTOKEN macro accepts the TCB
For more information about TTOKENs, see “Obtaining the TCB Identifier for a Task
(TTOKEN).”
When an SRB routine terminates, it can delete any data spaces it created. Use the
STOKEN parameter on the DSPSERV DELETE macro to specify the data space.
Some MVS macros require that you identify the task using the TCB address, some
require the TTOKEN, and some allow you to use either the TCB address or the
TTOKEN. If you know a task's TCB address and need the TTOKEN value or if you
need the TTOKEN for the current task, the task that attached the current task, or
the job step task, you can use the TCBTOKEN macro to obtain the value. You can
also use the TCBTOKEN macro if you know the TTOKEN for a task and want the
TCB address. Use the TYPE parameter on the TCBTOKEN macro to specify the
value you are looking for:
TOTTOKEN The system returns the TTOKEN of the task whose
TCB address you specify.
CURRENT The system returns the TTOKEN of the currently
active task.
PARENT The system returns the TTOKEN of the task that
attached the currently active task.
JOBSTEP The system returns the TTOKEN of the job step
task for the primary address space.
TOTCB The system returns the TCB address for the task
whose TTOKEN you specify.
In the following example, a TCB routine creates a data space and then schedules
an SRB which can immediately address the data space.
For the syntax of SNAPX, see OS/390 MVS Programming: Assembler Services
Reference. For the syntax of SDUMPX, see OS/390 MVS Programming: Authorized
Assembler Services Reference LLA-SDU.
MVS limits the number of access list entries and the number of data spaces
available to each TCB. Therefore, IBM recommends that, given a choice, you use
one large data space rather than a number of small data spaces that add up to the
size of the one large data space.
HSPSERV. . .
HSPSERV . . .
data area
tion
e o pera
w ri t n
ratio
buffer area ope
read
The data in the hiperspace and the buffer area in the address space must both
start on a 4K byte boundary.
A program would use a hiperspace rather than a data space if the program needs
an area outside the address space primarily for storage purposes, and not for data
manipulation. If you are uncertain whether a hiperspace or a data space is the best
choice for your program, see “Basic Decision: Data Space or Hiperspace” on
page 1-7.
Use this chapter to help you create, use, and delete hiperspaces. It describes some
of the characteristics of hiperspaces, how to move data in and out of a hiperspace,
and how data-in-virtual can help you control data in hiperspaces. In addition, the
See OS/390 DFSMS Checkpoint/Restart for more information about the CHKPT
macro.
The virtual area of a hiperspace is available to programs that run under the TCB
that owns the hiperspace and is available, in some cases, to other programs. When
a TCB terminates, the system deletes any hiperspaces the TCB owns. The system
swaps a hiperspace in and out as it swaps in and out the address space that
dispatched the owning TCB. Thus, hiperspaces that are shared by programs that
run in other address spaces must be owned by TCBs in non-swappable address
spaces.
A hiperspace can remain active even after the creating TCB terminates. When a
program creates a hiperspace, it can assign ownership of the hiperspace to a TCB
that will outlive the creating TCB. In this case, the termination of the creating TCB
does not affect the hiperspace.
Because hiperspaces belong to TCBs, keep in mind the relationship between the
program and the TCB under which the program runs. For simplicity, however, this
chapter describes hiperspaces as if they belong to programs. For example, “a
program's hiperspace” means “the hiperspace that belongs to the TCB that
represents the program.”
Serializing the use of the storage in a hiperspace requires similar methods to those
you would use to serialize the use of virtual storage in an address space. Use the
ENQ and DEQ macros or establish your own protocol for serializing the use of the
hiperspace.
Standard Hiperspaces
Standard hiperspaces are available to all programs. The data in a standard
hiperspace is predictable; that is, your program can write data out to a standard
hiperspace and count on retrieving it.
The best way to describe how your program can scroll through a standard
hiperspace is through an example. Figure 6-1 on page 6-5 shows a hiperspace
that has four scroll areas, A, B, C, and D. After the program issues an HSPSERV
SREAD for hiperspace area A, it can make changes to the data in the buffer area
in its address space. HSPSERV SWRITE then saves those changes. In a similar
manner, the program can read, make changes, and save the data in areas B, C,
and D. When the program reads area A again, it finds the same data that it wrote
to the area in the previous HSPSERV SWRITE to that area.
area A
HSPSERV SREAD . . .
area B
HSPSERV SWRITE . . .
HSPSERV SREAD . . . area C
HSPSERV SWRITE . . .
area D
buffer area
You can extend the use of hiperspaces by supplying an ALET on the HSPSERV
macro. To learn the differences between non-shared and shared standard
hiperspaces and how you can extend their use, see “Accessing Hiperspaces” on
page 6-13.
If your application wants to save a permanent copy of the data from a standard
hiperspace, consider using the services of data-in-virtual. See “Using Data-in-Virtual
with Standard Hiperspaces” on page 6-44.
These actions cause the data in an ESO hiperspace to be volatile. Therefore, use
an ESO hiperspace only if you are prepared to handle unsuccessful read
operations. You can use this hiperspace to get quick access to the data there. But,
in a peak-use condition, when the system takes the expanded storage away from
the hiperspace, the program must be prepared to read data from a permanent
backup copy on DASD or recreate the data that was in the hiperspace.
When the system swaps the address space out, it discards the data in any
hiperspace that is owned by TCBs that are running in the address space. For this
reason, you might consider making such an address space non-swappable.
Creating a Hiperspace
To create a hiperspace, issue the DSPSERV CREATE macro with the
TYPE=HIPERSPACE parameter. MVS gives you contiguous 31-bit virtual storage
of the size you specify and initializes the storage to hexadecimal zeroes. The entire
hiperspace has the storage key that you request, or, by default, the key that
matches your own PSW key. Use the HSTYPE parameter to specify whether the
hiperspace is to be standard or ESO. If standard, you can use the SHARE
parameter to request either a non-shared standard (SHARE=NO, the default) or a
shared standard (SHARE=YES) hiperspace. If you omit both HSTYPE and SHARE,
you create a non-shared standard hiperspace.
Example 1
If PAY␣␣␣␣␣ is the name you supply on the NAME parameter and you code
GENNAME=YES, the system generates the following name:
nccccPAY
Example 2
If J␣␣␣␣␣␣␣ is the name you supply on the NAME parameter and you code
GENNAME=YES, the system generates the following name:
nccccJ
Note that the system has a supply of 99,999 names it can generate for data spaces
and hiperspaces for a single address space. If the system tries to generate a name
and finds that it has used up the supply of names, it rejects the program with a
return code of “08” and a reason code of “0012.” The system restores the supply of
names whenever the number of such data spaces and hiperspaces owned by the
address space goes to zero. Therefore, if your program is a batch job and it is
creating a hiperspace, do not:
Request that the system generate a name (through the GENNAME parameter)
and
Assign ownership to an initiator task or a task higher than the initiator task in
the TCB chain
Before you code BLOCKS, you should know two facts about the control an
installation has on the size of data spaces and hiperspaces.
An installation can set limits on the amount of storage available for each
address space for all data spaces and hiperspaces with a storage key of 8
through F. If your request for this kind of space would cause the installation
limit to be exceeded, the system rejects the request with a nonzero return code
and a reason code.
An installation sets a default size for data spaces and hiperspaces; you should
know this size. If you do not use the BLOCKS parameter, the system creates a
hiperspace with the default size. (The IBM default size is 239 blocks.)
If you create the hiperspace with a storage key of 0 through 7, the system does not
check the size against the total storage already used for data spaces and
hiperspaces. If you create the hiperspace with a storage key of 8 through F, the
system adds the initial size of the space to the cumulative total of all data spaces
and hiperspaces for the address space and checks this total against the installation
limit for an address space.
The BLOCKS parameter allows you to specify a maximum size and initial size
value.
The maximum size identifies the largest amount of storage you will need in the
hiperspace.
An initial size identifies the amount of the storage you will immediately use.
As you need more space in the hiperspace, you can use the DSPSERV EXTEND
macro to increase the size of the available storage, thus increasing the storage in
the hiperspace that is available for the program. The amount of available storage is
called the current size. (At the creation of a hiperspace, the initial size is the same
as the current size.) When it calculates the cumulative total of data space and
hiperspace storage, the system uses the current size of the hiperspace.
If you know the default size and want a hiperspace smaller than or equal to that
size, use BLOCKS=maximum size or omit the BLOCKS parameter.
If you know what size hiperspace you need and are not concerned about exceeding
the installation limit, set the maximum size and the initial size the same.
BLOCKS=0, the default, establishes a hiperspace with the maximum size and the
initial size both set to the default size.
If you do not know how large a hiperspace (with storage key 8 - F) you will
eventually need or you are concerned with exceeding the installation limit, set the
maximum size to the largest size you might possibly use and the initial size to a
smaller amount, the amount you currently need.
Use the NUMBLKS parameter to request that the system return the size of the
hiperspace it creates for you. You would use NUMBLKS, for example, if you did not
specify BLOCKS and do not know the default size.
Figure 6-4 on page 6-11 shows an example of using the BLOCKS parameter to
request a hiperspace with a maximum size of 100,000 bytes of space and a current
size of 20,000 bytes.
DSPSERV CREATE,. . .,BLOCKS=(HSMAX,HSINIT)
.
HSMAX DC A((1+495)/496) HIPERSPACE MAXIMUM SIZE
HSINIT DC A((2+495)/496) HIPERSPACE INITIAL SIZE
Maximum size
100,000 bytes
Current size
20,000 bytes Available for immediate
use by the program.
Figure 6-17 on page 6-43 shows how you can extend the available storage of the
hiperspace in Figure 6-4.
Figure 6-5 on page 6-12 shows an ESO hiperspace, HSX, with a storage key of 5,
owned by a subsystem. PGM1 with PSW key of 8 has access to the hiperspace;
however, its PSW key does not match the storage key of the hiperspace. Its ability
to access the hiperspace depends on how the creating program coded the FPROT
parameter on the DSPSERV macro.
If the creating program specified no fetch-protection (FPROT=NO), PGM1 can
fetch from (using HSPSERV CREAD) but not store into the hiperspace (using
HSPSERV CWRITE).
If the creating program specified fetch-protection (FPROT=YES), PGM1 can
neither fetch from nor store into the hiperspace.
In Figure 6-5, PGM1 has fetch and store capability to the hiperspace; the
subsystem provides a PC routine with a PSW key 5 in the common area. To
access the hiperspace, PGM1 can PC to the PC routine and have access to the
hiperspace through the HSPSERV read and write operations. In the same way,
other programs can PC to the PC routine and use the data in the hiperspace.
ESO hiperspace
PGM1 owned by
(PSW key 3)
subsystem
PC
STOKEN DC CL8 (storage key 5)
(FPROT=YES)
PC routine
(PSW key 5)
buffer area
Accessing Hiperspaces
The HSPSERV macro service controls the use of a hiperspace. HSPSERV
requires that the program that is accessing the hiperspace specify the STOKEN of
the hiperspace. The program could have received the STOKEN from DSPSERV or
received it from another program. HSPSERV considers the following factors before
it allows a program to access a hiperspace:
The authority of the caller
The type of hiperspace: non-shared standard, shared standard, or ESO
Whether the caller is in cross memory mode
Whether the caller gives an access list entry token (ALET) for the hiperspace to
HSPSERV
When you access hiperspaces, you are not required to use an ALET. However,
there are benefits to using ALETs with hiperspaces. By obtaining an ALET, a
program builds a connection between the program and a hiperspace. When the
program supplies the ALET on HSPSERV, the program can:
Access some hiperspaces that it could not otherwise access. See “How
Problem State Programs with PSW Key 8 - F Use Hiperspaces” and “How
Supervisor State or PSW Key 0 - 7 Programs Use Hiperspaces” on page 6-17.
Take advantage of faster or more efficient data transfer. See “Obtaining
Improved Data Transfer To and From a Hiperspace” on page 6-27.
An ALET is an index to an access list. An access list is a table where each entry
represents an address space, data space, or hiperspace that programs can access.
Each program has two access lists: a primary address space access list (PASN-AL)
and a dispatchable unit access list (DU-AL).
Each address space has one PASN-AL. It is available to any program that has
that address space as its primary address space.
Each TCB and SRB has one DU-AL. It is available to any program that the
TCB or SRB represents.
To use one of these access lists, the program needs the ALET that indexes the
access list. It uses the ALET as input on the HSPALET parameter on HSPSERV. It
is important to note that a program cannot obtain an ALET for a hiperspace
unless the processor has the move-page facility installed.
Chapter 3 describes ALETs for data spaces and address spaces; for an illustration
of a DU-AL and PASN-AL, see Figure 4-6 on page 4-11. Chapter 6 limits its
discussion to ALETs for hiperspaces.
Non-shared
standard
TCB1
PGM 1
DSPSERV . . .
By obtaining an ALET, a problem state program with PSW key 8 - F can obtain the
benefit of the move-page facility and also share a hiperspace with a subtask. For
example, suppose a problem state program obtains an ALET, attaches a subtask
using the ALCOPY parameter on the ATTACH macro, and passes the ALET and
STOKEN to the subtask. These actions allow the task and its subtask to share the
same non-shared hiperspace. Two problem state programs can share a
SCOPE=SINGLE data space in the same way. Turn to “How Problem State
Programs with PSW Key 8 - F Use Hiperspaces” on page 6-14 for an such an
example.
Example 1 shows how an entry on the PASN-AL allows all programs in the
address space, including unauthorized programs, to use either non-shared or
shared standard hiperspaces. An authorized program obtains the hiperspace,
places an entry on the PASN-AL, and obtains the ALET. The program then passes
the ALET and STOKEN to other programs in the address space. Even programs
that space-switch into the address space can use the hiperspace, providing they
receive the ALET and STOKEN. Figure 6-7 on page 6-16 illustrates this case.
Non-shared
standard
or
shared
AS1 standard
PGM 1
(authorized)
DSPSERV . . .
ALESERV . . .
ALI DC F
STI DC CLB
PGM 2
(unauthorized)
ALE1 DC F
SRO1 DC CLB
PGM 3
(unauthorized)
HSALET DC F
HSSTO DC CLB
Non-shared
DU-AL standard
PGM 1
ALESERV . . .
PC
HSSTOK DC CL 8 AS2
HSALET DC F
PCRTN
Figure 6-9. What Hiperspaces can Problem State Programs with PSW 8 - F Access?
If the program does not have an ALET: If the program has an ALET:
It can access a non-shared standard It can access a non-shared standard
hiperspace that it owns. It cannot be in hiperspace. It can be in cross memory
cross memory mode. mode.
It cannot access a shared standard It can access a shared standard
hiperspace. hiperspace. It can be in cross memory
mode.
It cannot access an ESO hiperspace.
The use of an ALET allows supervisor state or PSW key 0 - 7 programs to use
non-shared standard hiperspaces. The following section describes how this
program can:
Use a non-shared standard hiperspace
Use a shared standard and ESO hiperspace
Like the problem state program with PSW key 8 - F, the supervisor state program
in cross memory mode can use HSPSERV with an ALET to access a non-shared
standard hiperspace. For example, in Figure 6-11, PGM1 in AS1 can place an
entry for HS1 on the DU-AL and receive the ALET. PGM1 can then PC to AS2,
passing the STOKEN and ALET to PCRTN. PCRTN can access HS1.
AS1 HS1
DU-AL Non-shared
PGM 1 standard
DSPSERV . . .
ALESERV . . .
PC
STOK DS CLB
AL DS F
AS2
PCRTN
HSTOK DS CL8
HAL DS F
The supervisor state program using shared standard and ESO hiperspaces
Supervisor state or PSW 0 - 7 programs can access any shared standard or ESO
hiperspace, providing they have the STOKEN of the hiperspace. They are not
required to have an ALET.
Figure 6-12 illustrates two programs in two address spaces. Both of these
programs can access data in HS1 without using the HSPALET parameter. PGM1,
the creator of HS1, passes the STOKEN of HS1 to PGM2.
AS1 HS1
ESO or
shared standard
PGM 1
DSPSERV . . .
HSTOK DC CLB
AS2
PGM 2
DSPSERV . . .
HSSTOK DC CLB
With a little more effort, PGM1 and PGM2 in Figure 6-16 on page 6-29 could get
faster transfer of data to and from expanded storage; “Obtaining Improved Data
Transfer To and From a Hiperspace” on page 6-27 describes how to gain the
added performance. An example of PGM1 and PGM2 using ALETs on HSPSERV
is in that section.
Figure 6-13. Rules for Adding Access List Entries for Hiperspaces
Function Type of A problem state, key 8 - F program: A supervisor state or key 0-7
hiperspace program:
Add entries to Non-shared Can add entries for a hiperspace it Can add entries if the caller's and
the DU-AL standard owns. owner's home address space is the
same.
Shared standard Cannot add entries for the hiperspace to Can add entries. For ESO
and ESO its DU-AL. hiperspace, see Programming note
1.
Add entries to Non-shared Cannot add entries. Can add entries if caller's primary
the PASN-AL standard address space is the same as the
owner's home address space.
Shared standard Cannot add entries. Can add entries. For ESO
and ESO hiperspace, see Programming note
1.
Programming notes:
1. Do not add an entry for an ESO hiperspace to any access list that is available
to a problem state program with PSW 8 - F. In other words, do not add an
entry to a PASN-AL if unauthorized programs will be executing in the address
space. Do not add an entry to a DU-AL if its TCB will be representing an
unauthorized program.
2. Use ALESERV ADD with hiperspaces only if you have the move-page facility
installed.
3. The system rejects an ALESERV ADD request if the hiperspace is currently
defined as a data-in-virtual object.
Generally, when two programs in two address spaces share the data in the same
hiperspace, the programs must both use ALESERV to add entries to their access
lists.
Use ALESERV DELETE to delete an entry on an access list. The ALET parameter
identifies the specific entry.
Programs that share hiperspaces with other programs have another action to take
when they delete an entry from an access list. They should notify the other
programs that the entry is no longer connecting the ALET to the hiperspace.
Otherwise, those programs might continue to use an ALET for the deleted entry.
See “ALET Reuse by the System” on page 4-28 for more information.
If the program does not delete an entry, the entry remains on the access list until
the work unit terminates. At that time, the system frees the access list entry.
On the HSPSERV macro, the write operation transfers data from the address
space to the hiperspace. The read operation transfers the data from the
hiperspace to the address space. HSPSERV allows multiple reads and writes to
occur at one time. This means that one HSPSERV request can transfer the data in
more than one data area in a hiperspace to an equal number of data areas in an
address space. Likewise, one HSPSERV request can write data from more than
one buffer area in an address space to an equal number of areas in a hiperspace.
Figure 6-14 shows three virtual storage areas that you need to identify when you
request a data transfer:
The hiperspace
The buffer area in the address space that is the source of the write operation
and the target of the read operation
The data area in the hiperspace that is the target of the write operation and the
source of the read operation.
On the HSPSERV macro, you identify the hiperspace and the areas in the address
space and the hiperspace:
STOKEN specifies the STOKEN of the hiperspace.
RANGLIST specifies a list of ranges that indicate the boundaries of the buffer
areas in the address space and the data area in the hiperspace.
NUMRANGE optionally specifies the number of data areas the system is to
read or write. The default is one data area.
HSPSERV . . .
tion
e o p era
w ri t tion
d o p e ra
buffer area rea
HSPSERV has certain restrictions on these areas. Two restrictions are that the
data areas must start on a 4K byte boundary and their size must be in multiples of
4K bytes. Other requirements are listed in the description of HSPSERV in OS/390
MVS Programming: Authorized Assembler Services Reference ENF-IXG. Read the
requirements carefully before you issue the macro.
The system does not always preserve the data in the areas that are the source for
the read and write operations. Figure 6-14 tells you what the system does with the
areas after it completes the transfer. The sections Read and Write Operations for
Standard Hiperspaces and “Read and Write Operations For Expanded Storage
Only Hiperspaces” on page 6-26 describe how you use the HSPSERV macro.
After the read operation for standard hiperspaces, the system gives you a choice of
saving the source data in the hiperspace. If you will use the data in the hiperspace
again, ask the system to preserve the data; specify RELEASE=NO on HSPSERV
SREAD. Unless a subsequent SWRITE request changes the data in the source
area, that same data will be available for subsequent SREAD requests.
RELEASE=NO provides your program with a backup copy of the data in the
hiperspace.
See “Example of Creating a Standard Hiperspace and Using It” for an example of
the HSPSERV SREAD and HSPSERV SWRITE macros.
Figure 6-15 on page 6-25 shows the four-page area in the address space and the
two block area in the hiperspace. Note that the first two pages of the address
space virtual storage are unpredictable after the SWRITE operation.
PROG 1 TE
RI
DSPSERV . . . SW
HSPSERV SWRITE . . .
HSPSERV SREAD . . .
E AD
SR
You can request that the system preserve the source data in the address space
after it successfully completes the HSPSERV CWRITE operation. If your program
will use this same source data again, specify KEEP=YES on HSPSERV (or use the
default). KEEP=NO tells the system that you will not be using the source data
again. In this case, the system can reuse the pages that back the address space
buffer area. In most cases, KEEP=NO gives your program better performance than
KEEP=YES.
To use the HSPSERV macro for an ESO hiperspace, the buffer area that is the
source of the CWRITE and the target of the CREAD can be in the caller's home
address space as well as the caller's primary address space or the common
storage area (CSA). This flexibility means that the caller can use the HSPSERV
macro while in cross memory mode (that is, where PASN is not equal to HASN).
The following example shows a program transferring data to and from an ESO
hiperspace. The address space has one buffer area to receive the hiperspace data.
For an example of storing information into the range list, see “Example of Creating
a Standard Hiperspace and Using It” on page 6-24.
GENERATE DATA AND WRITE IT TO THE HIPERSPACE
.
BUILD RANGE LIST AND PLACE POINTER TO ADDRESS OF LIST IN RANGPTR
.
HSPSERV CWRITE,ADDRSP=HOME,STOKEN=HSSTOK,RANGLIST=RANGPTR, X
RETCODE=SRVRCODE,RSNCODE=SRSNCODE
.
READ FROM THE HIPERSPACE, IF EVERYTHING HAS BEEN SUCCESSFUL
.
HSPSERV CREAD,STOKEN=HSSTOK,RANGLIST=RANGPTR, X
RETCODE=SRVRCODE,RSNCODE=SRSNCODE
.
HSSTOK DS CL8 STOKEN RETURNED FROM DSPSERV CREATE
RANGPTR DC A(RANGLIST) ADDRESS OF RANGLIST PARM AREA
RANGLIST DS CL12
ASLOC DS AL4 ADDRESS OF START OF ADDRESS SPACE AREA
HSLOC DS AL4 ADDRESS OF HIPERSPACE AREA TO WRITE TO/FROM
NUMBLKS DS F NUMBER OF BLOCKS TO READ/WRITE
SRVRCODE DS F RETURN CODE
SRSNCODE DS F REASON CODE
Through the IOSADMF macro, a program can use ADMF to get more efficient data
movement between central and expanded storage. Data transfer with the ADMF
Programs that want to reduce processor time for buffer management, but that find
the response time associated with I/O buffering unacceptable, will find the
IOSADMF service particularly useful. However, IBM recommends that you design
programs that move data to use either the ADMF (IOSADMF macro) or the
move-page facility (HSPSERV macro) for the following reasons:
You cannot use IOSADMF to transfer data unless data already is stored in the
hiperspace. Therefore, under certain circumstances, you must use HSPSERV
before using IOSADMF to transfer data.
If the ADMF is not available, your program can attempt the data transfer again
by issuing HSPSERV.
If your program moves variable amounts of data, you might want to design your
program to determine which facility best matches each data transfer request.
Which facility best matches your request depends on the number of pages you
want to transfer. When the ADMF is available and the program issues IOSADMF to
move data, the system determines which facility is appropriate by comparing the
number of pages with a system-specific value. If you want to know what that value
is so your program can determine which facility to use, issue IOSADMF with the
CROSSOVER parameter, and the system returns the value to you.
AS1 HS1
PGM 1 ESO or
AS2
DSPSERV . . . shared standard
ALESERV . . .
PGM 2 DU-AL
HSPSERV with ALET
ALESERV . . .
HSTOK DC CL8
HSPSERV with
HALET DC F
ALET
HSSTOK DC CL8
HSALET DC F
Figure 6-16. Gaining Fast Data Transfer To and From Expanded Storage
Before you issue the HSPSERV macro with the HSPALET parameter, place the
address of a 144-byte work area in GPR 13 and zero in AR 13.
More than one IOSADMF request can be active for a hiperspace. When you have
more than one active IOSADMF request, keep track of the requests and ensure
that all data transfer is complete before deleting the hiperspace. If there are
outstanding active requests and you issue DSPSERV DELETE for a hiperspace,
your program will abnormally end and the hiperspace will not be deleted. If you
cannot determine whether all outstanding IOSADMF requests have completed, you
can issue IOSADMF APURGE to stop any outstanding requests.
IOSADMF APURGE should be used only as a last resort because of data integrity
concerns. IOSADMF APURGE immediately stops data transfer for every
outstanding IOSADMF request for the specified hiperspace, regardless of the state
of those data transfers, and abnormally ends any active operation to the
hiperspace. If a new request is subsequently started for the specified hiperspace,
the request will process.
If you have a single unit of work that creates the hiperspace, issues the IOSADMF
requests, and deletes the hiperspace, you do not have to be concerned about
The system increases the hiperspace by the amount you specify, unless that
amount would cause the system to exceed one of the following:
The hiperspace maximum size, as specified by the BLOCKS parameter on
DSPSERV CREATE when the hiperspace was created
The installation limit for the combined total of data space and hiperspace
storage with storage key 8 -F per address space. These limits are the system
default or are set in the installation exit IEFUSI.
If one of those limits would be exceeded, the VAR parameter tells the system how
to satisfy the EXTEND request.
VAR=YES (the variable request) tells the system to extend the hiperspace as
much as possible without exceeding the limits set by the hiperspace maximum
size or the installation limits. In other words, the system extends the hiperspace
to one of the following sizes, depending on which is smaller:
– The maximum size specified on the BLOCKS parameter
– The largest size that would still keep the combined total of data space and
hiperspace storage within the installation limit.
VAR=NO (the default) tells the system to:
– Abend the caller, if the extended size would exceed the maximum size
– Reject the request, if the hiperspace has storage key 8 - F and the request
would exceed the installation limits.
For example, consider the hiperspace in Figure 6-4 on page 6-11, where the
current (and initial) size is 20,000 bytes and the maximum size is 100,000 bytes. If
the creating program wanted to increase the current size to 50,000 bytes by adding
a 30,000 bytes to the current size, it would code the following:
DSPSERV EXTEND,STOKEN=HSSTOK,BLOCKS=HSBLCKS
.
HSDELTA EQU 3 3 BYTES OF SPACE
HSBLCKS DC A((HSDELTA+495)/496) NUMBER OF BLOCKS ADDED TO THE
HIPERSPACE
HSSTOK DS CL8 STOKEN RETURNED FROM DSPSERV CREATE
Hiperspace
Maximum size
100,000 bytes
Current size
50,000 bytes
If you use VAR=YES when you issue the EXTEND request, use NUMBLKS to find
out the size by which the system extended the hiperspace.
Deleting a Hiperspace
When a program doesn't need the hiperspace any more, it can delete it. A problem
state program with PSW key 8 - F can delete only the hiperspaces it owns, and
must have the PSW key that matches the storage key of the hiperspace. A
supervisor state program or a program with PSW 0 - 7 can delete a hiperspace if
its home or primary address space is the same as the owner's home address
space.
If you are not the owner of a hiperspace you are using, the hiperspace might
disappear if the owner terminates or deletes it. For example, a problem state
program can delete a hiperspace that a supervisor state program is using.
IBM recommends that you explicitly delete a hiperspace before the owning task
terminates. This frees up resources as soon as they are no longer needed, and
avoids excess processing at termination time. However, if you don't, MVS
automatically does it for you at termination time.
After the release, the released pages do not use expanded (or auxiliary) storage
until your program references them again. When such a page is referenced again,
these pages contain hexadecimal zeroes.
If your program is running disabled for I/O or external interrupts, use the
DISABLED=YES parameter on DSPSERV RELEASE. If your program is running
disabled and issues DSPSERV RELEASE without DISABLED=YES, the system
abends the program.
You can use standard hiperspaces with data-in-virtual as Figure 6-18 describes:
The task that represents the program that issues the DIV IDENTIFY owns the
pointers and structures associated with the ID that DIV returns. Any program can
use DIV IDENTIFY. However, the system checks the authority of programs that try
to use the other DIV services for the same ID. For problem state programs with
PSW key 8 - F, data-in-virtual allows only the issuer of the DIV IDENTIFY to use
subsequent DIV services for the same ID. That means, for example, that a problem
state program with PSW key 8 cannot issue the DIV IDENTIFY and another
problem state program with PSW key 8 issue DIV MAP for the same ID.
Problem state programs with PSW key 8 - F can use DIV MAP to:
Map a VSAM linear data set to a window in a non-shared or shared standard
hiperspace, providing the program owns the hiperspace.
Map an object in a non-shared hiperspace to an address space window,
providing:
– The program owns the hiperspace, and
– The program or its attaching task obtained the storage for the window
(through the STORAGE or GETMAIN macro), and
– The hiperspace has never been the target of an ALESERV ADD macro.
Figure 6-19 shows what data-in-virtual requires of the tasks that represent the
programs that issue the DIV macros. The table does not show the IDENTIFY
service because data-in-virtual does not have restrictions on this service.
Whether the hiperspace contains the window or is the object, the data-in-virtual
service will not create a local copy of the object (that is, you cannot use the
LOCVIEW=MAP parameter on DIV ACCESS).
The following two sections describe how your program can use data-in-virtual with
hiperspaces.
Your program can map a single data-in-virtual object to several hiperspaces. Or, it
can map several data-in-virtual objects to one hiperspace.
Program
DSPSERV . . .
Permanent Object
DIV IDENTIFY . . .
DIV ACCESS . . .
DIV MAP . . .
HSPSERV SWRITE . . .
HSPSERV SREAD . . .
HSPSERV SREAD
window VSAM linear
HSPSERV SWRITE data set
Initially, the window in the hiperspace and the buffer area in the address space are
both 4K bytes. (That is, the window takes up the entire initial size of the
hiperspace.) The data-in-virtual object is a VSAM linear data set on DASD.
CREATE A STANDARD HIPERSPACE
.
DSPSERV CREATE,TYPE=HIPERSPACE,HSTYPE=SCROLL,NAME=HS1NAME, X
STOKEN=HS1STOK,BLOCKS=(ONEGIG,FOURK),ORIGIN=HS1ORG
.
MAP THE HIPERSPACE TO THE OBJECT
.
DIV IDENTIFY,ID=OBJID,TYPE=DA,DDNAME=OBJDD
DIV ACCESS,ID=OBJID,MODE=UPDATE
DIV MAP,ID=OBJID,AREA=HS1ORG,STOKEN=HS1STOK
.
OBTAIN A 4K BUFFER AREA IN ADDRESS SPACE TO BE
USED TO UPDATE THE DATA IN THE HIPERSPACE WINDOW
.
DECLARATION STATEMENTS
.
HS1NAME DC CL8'MYHSNAME' HIPERSPACE NAME
HS1STOK DS CL8 HIPERSPACE STOKEN
HS1ORG DS F HIPERSPACE ORIGIN
ONEGIG DC F'262144' MAXIMUM SIZE OF 1G IN BLOCKS
FOURK DC F'1' INITIAL SIZE OF 4K IN BLOCKS
OBJID DS CL8 DIV OBJECT ID
OBJDD DC AL1(7),CL7'MYDD ' DIV OBJECT DDNAME
The program can read the data in the hiperspace window to a buffer area in the
address space through the HSPSERV SREAD macro. It can use the HSPALET
parameter to gain faster access to and from expanded storage. The HSPSERV
SWRITE macro can update the data and write changes back to the hiperspace. For
an example of these operations, see “Example of Creating a Standard Hiperspace
and Using It” on page 6-24.
Address Space
Program
DSPSERV . . .
Non-shared
DIV MAP . . . Standard Hiperspace
DIV SAVE . . . temporary
object
window
When the hiperspace is a data-in-virtual object, your program does not need to
know the origin of the hiperspace. All addresses refer to offsets within the
hiperspace. Note that the example does not have the ORIGIN parameter on
DSPSERV.
After you finish making changes to the data in the address space window, you can
save the changes back to the hiperspace as follows:
SAVE CHANGES TO THE OBJECT
.
DIV SAVE,ID=OBJID
The following macro refreshes the address space window. This means that if you
make changes in the window and want a fresh copy of the object (that is, the copy
that was saved last with the DIV SAVE macro), you would issue the following:
DIV RESET,ID=OBJID
When you finish using the hiperspace, use the DSPSERV macro to delete the
hiperspace.
DELETE THE HIPERSPACE
.
DSPSERV DELETE,STOKEN=HS2STOK
When you use the DSPSERV CREATE macro to create the hiperspace and assign
ownership, you must identify the TCB through the TTOKEN parameter. A TTOKEN
identifies a TCB. Unlike TCB addresses, TTOKENs are unique within the IPL; the
system does not assign this same TTOKEN to any other TCB until the next IPL. If
you know the TCB address, but not the TTOKEN for the task that is to receive
ownership, use the TCBTOKEN macro. The TCBTOKEN macro accepts the TCB
address and returns a TTOKEN. You then use this TTOKEN in the DSPSERV
When an SRB terminates, it can delete any hiperspaces it created. Use the
TTOKEN parameter on the DSPSERV DELETE macro to specify the address of the
TTOKEN of the hiperspace owner.
One way for a program to create an address space, without involving an MVS
operator, is by issuing a START command through the MGCR macro. The program
must have a procedure in SYS1.PROCLIB, representing the first program that will
execute in the created address space. The program can assign the dispatching
priority for the programs that will run in the created address space. The initialization
can include cross memory macros that establish a cross memory environment for
the created address space.
An easier way to accomplish the same objectives is to issue the ASCRE macro.
The ASCRE macro creates a address space that can start after the system is
initialized and receive the services of all MVS components. It can set up cross
memory linkages so that programs in the created address space can call programs
in the creating program's address space. It can set a dispatching priority for the
programs that run in the created address space and can specify that the address
space exist after the task that represents the creating program terminates. (For
simplicity, in this chapter the term “creating program” refers to the address space of
the program that is issuing the ASCRE macro. The term “new address space”
refers to the address space that the ASCRE macro creates.)
The system considers the new address space to be a system address space, and it
will show up as such when the operator issues a DISPLAY A command. Program
properties table (PPT) values and installation performance specification (IPS)
settings determine the attributes of the programs that execute in the new address
space.
This chapter describes how to use the ASCRE macro and two other macros that
assist in managing address spaces:
The ASDES macro terminates an address space that was created through the
ASCRE macro.
The ASEXT macro retrieves parameters that the creating program passes to a
program in the new address space.
For the syntax of the macros mentioned in this chapter, see one of the following:
OS/390 MVS Programming: Authorized Assembler Services Reference
ALE-DYN
OS/390 MVS Programming: Authorized Assembler Services Reference
ENF-IXG
OS/390 MVS Programming: Authorized Assembler Services Reference
LLA-SDU
OS/390 MVS Programming: Authorized Assembler Services Reference
SET-WTO.
The required parameters on the ASCRE macro are ASNAME or STPARM, INIT,
and ODA. Some comments about these parameters are:
Specify either ASNAME or STPARM.
– ASNAME specifies the address space name, which is also the name of the
procedure that identifies the first program to run in the new address space.
– STPARM specifies a parameter string that consists of parameters that you
would specify on the START command. This parameter string includes the
name of the address space.
An operator can use the name of the address space on the DISPLAY A
command to display information about the address space. For the syntax of the
DISPLAY command, see OS/390 MVS System Commands.
Output data from the macro appears at the location specified on the ODA
parameter. This data includes two identifiers of the new address space: the
ASCB and the STOKEN. The STOKEN is an identifier that is unique within the
lifetime of an IPL. The format of the output data area is a 24-byte area that the
macro IHAASEO maps as follows:
Issue the ASCRE macro in a supervisor state program that is executing in primary
or AR address space control (ASC) mode. The caller must be in enabled and
unlocked TCB mode and must not have an enabled unlocked task (EUT) functional
recovery routine (FRR) established. Issue the ASCRE macro only after system
initialization is complete.
If you do not need special DD statements for data sets, you can use the common
system address space procedure IEESYSAS. In the parameter data specified by
the STPARM parameter, specify IEESYSAS and the name of the first program to
run in the address space. The format of the parameter data is as follows:
IEESYSAS.x,PROG=y
where x is the name of the address space.
y is the name of the first program that
executes in the new address space.
Through IEESYSAS, you name the address space “x” and generate an EXEC
statement with PGM=“y.”
To request that the system create the RMA address space and identify FIRSTPGM
as the first program to execute in the new address space, code the following:
ASCRE STPARM=STRMA,...
where STRMA is the address of the parameter string
If you have data sets that need DD statements, you will have to write your own
procedure in SYS1.PROCLIB. Identify the procedure through the parameter string
that the STPARM parameter points to. The parameter string starts with a half-word
field that tells the length of the parameter string. It is followed by parameter data.
The AXLIST, TKLIST, and LXLIST parameters on ASCRE set up cross memory
linkages that allow programs in the new address space to be cross memory users,
but not cross memory service providers. The initialization routine is a good place to
use the cross memory macros that allow PC routines in the new address space to
be invoked from other address spaces.
The address space that ASCRE is to create might not need initializing beyond what
the macro provides. In this case, specify the dummy routine IEFBR14 on the INIT
parameter and ignore the following description of the initialization routine.
Figure 7-2 shows an example of a program creating a new address space that has
PC services. The caller of ASCRE does not want PC routines in the new address
space to be called from other address spaces before the cross memory
environment is initialized and able to handle those requests.
IBM recommends that your initialization routine post EAERIMWT and wait on
EAEASWT. If the initialization routine posts EAERIMWT, but does not wait on
EAEASWT, the system frees the ECBs prematurely. This action causes the system
to abend the caller of ASCRE.
Creating New
Address Space Address Space
Creating program Initialization
routine
ASCRE . . .
(set up cross
Wait on EAERIMWT memory
environment
for PC routines
Post EAEASWT in new address
space)
Post EAERIMWT
Wait on EAEASWT
Return to system
program
PC Routine
The initialization routine should use one of the following reason codes when it
returns to the system program:
0 — Continue with address space initialization
If the initialization routine is going to return to the system program with the return
code that requests that the new address space terminate, the routine should first
notify the caller of ASCRE to allow the system to continue processing. To notify the
caller:
The initialization routine can post EAERIMWT and wait on EAEASWT.
When the caller is posted, it can post EAEASWT to notify the initialization
routine. Control returns to the system program.
Creating New
Address Space Address Space
PROG1 PCRT1
PC PR
PROG2 PCRT2
PC PR
In this figure, programs PROG1 and PROG2 in the creating address space can use
the PC services PCRT1 and PCRT2 provided by the new address space.
To set up the cross memory linkages for this environment in Figure 7-3, cross
memory macros must be issued in the new address space. The initialization
routine, which runs in the new address space, is a good place to set up this
environment. For help in writing this initialization routine, see “Writing an
Initialization Routine” on page 7-5. Figure 7-2 on page 7-6 shows how you
synchronize the initialization process so that PC routines in the new address space
are not called before the cross memory linkages are in place.
The cross memory environment that ASCRE can set up is described in Figure 7-4.
Programs in the new address space (PGM1 and PGM2) can call PC routines
(PCRTN1 and PCRTN2) in the creating program's address space. (ASCRE cannot
set up the environment where programs in the creating program's address space
can call PC routines in the new address space.)
Creating New
Address Space Address Space
Creating program
ASCRE . . .
PGM1
PC
PCRTN1 PGM2
PR PC
PCRTN2
PR
Figure 7-4. An Example of Cross Memory Environment Set by the ASCRE Macro
There are three cross memory parameters on ASCRE. TKLIST and LXLIST can be
used to connect an entry table (or tables) of the creating program's address space
to the linkage table of the new address space. AXLIST can be used to set the
values in the authority table of the new address space so that programs in the
creating program's address space have PT and SSAR authority to the new address
space. The effect of the cross memory parameters is the same as if the new
address space issued the ATSET and ETCON macros, macros that require a
program to be in supervisor state or key 0 - 7.
The three cross memory parameters require that you provide the addresses of
three lists. The lists are:
The AX value (or values) of the creating program's address space
The linkage index (LX) value (or values) of the new address space's linkage
table
The token (or tokens) that represents the entry table (or tables) in the creating
program's address space.
The output of the AXRES and LXRES macros provides the input to the AXLIST and
LXLIST parameters. You must build the list that is input to the TKLIST parameter.
The following description of the parameters includes the format of the list you
provide the TKLIST parameter.
If the creating address space is to be a service provider for the new address space,
the creating program (or another program in the same address space) must have
issued the following cross memory macros before it issues the ASCRE macro:
AXRES macro, which reserves an AX value (or values)
AXSET macro, which sets an AX
LXRES macro, which reserves an LX value (or values)
ETCRE macro, which creates an entry table and returns a token that identifies
the table.
Figure 7-5 on page 7-10 shows the same cross memory environment that
Figure 7-4 on page 7-8 showed. The creating address space would give the
following input to ASCRE:
As input on AXLIST, the address of a list containing the AX value of the
creating address space. The AXRES macro returned the address.
The AXLIST parameter sets the authority table in the new address space so that
PC routines in the creating address space can have address space authorization to
the new address space. TKLIST and LXLIST connect the entry table in the creating
address space to the new address space's linkage table.
Creating New
Address Space Address Space
Creating program
AXRES . . .
AXSET . . . PGM1
LXRES . . .
ETCRE . . . PC
ASCRE . . .
Input to TKLIST
0 0 0 1
entry table token
PCRTN1
PGM2
PR
PCRTN2 PC
PR
entry table
linkage table
• •
•
AX value authority table
•
Figure 7-5. The Cross Memory Linkages Set by the ASCRE Macro
The AXLIST parameter is not always needed to set up the cross memory linkages.
If the address space to which the creating program needs access has only one AX
value and that value is 1, the system does not need to initialize entries in the new
address space's authority table. (An AX of 1 is a fully-authorized AX value that
permits the address space to issue PT and SSAR instructions to any active
address space.) If all AX values are 1, you can omit the AXLIST parameter.
To identify the terminating address space to the termination routine and pass data,
use the 64-bit area provided on the UTOKEN parameter. Specify the address of
this data area on the UTOKEN parameter.
The UTOKEN parameter provides a 64-bit area in which the creating program can
pass data to the termination routine. Use UTOKEN to:
Give the address space a unique name that the termination routine can use. If
your program has created more than one address space, the UTOKEN
parameter area can identify which address space is terminating.
Pass other data to the termination routine. Data might consist of the address
and ALET of a workarea containing the name of the address space.
The termination routine will not get control for either of the following two reasons:
The ASDES macro terminates the new address space.
The creating address space terminates before the new address space
terminates.
The NONURG and HIPRI parameters set the dispatching priority for programs that
execute in the new address space. Your installation can also set the dispatching
priority through:
Service definitions in the WLM policy if the address space is created in WLM
goal mode. See OS/390 MVS Planning: Workload Management.
ICS definitions if the address space is created in compatability mode. See
OS/390 MVS Initialization and Tuning Guide.
If you want the new address space to exist after the TCB of the creating program
terminates, use ATTR=(PERM).
Note that the termination routine that was optionally specified on the TRMEXIT
parameter on the ASCRE macro does not get control in this case.
In the following example, a supervisor state key zero program deletes an address
space that was created through the ASCRE macro. The address of the ASEO (ASE
output area), passed back from ASCRE after creating the address space, is passed
to this routine in general purpose register 1.
This chapter describes the concept of subspaces, when to use them, how to create
them, how to manage them, and how to delete them. It also describes
considerations for providing recovery for and diagnosing errors in programs that run
in subspaces.
What Is a Subspace?
A subspace is a specific range of storage in the private area of an address space,
designed to limit the storage a program can reference.
A program that is associated with a subspace cannot reference some of the private
area storage outside of the subspace storage range; the storage is protected from
the program. Whether a given range of private area storage is protected from a
program associated with a subspace depends on whether the storage is:
Eligible to be assigned to a subspace (or “subspace-eligible”)
Assigned to a subspace
Not eligible to be assigned to a subspace.
You control these storage “states” through the IARSUBSP macro. Storage outside
of the private area is not affected by subspaces.
A program running in an address space can reference all of the storage associated
with that address space. In this chapter, a program's ability to reference all of the
storage associated with an address space is called full address space
addressability. A program running with full address space addressability can
reference storage in any of the three states: eligible to be assigned to a subspace,
assigned to a subspace, or not eligible to be assigned to a subspace.
A program that runs in an address space that owns subspaces also has full
address space addressability, until it issues an instruction to limit the storage it can
reference. In an address space that owns subspaces, issuing the BSG instruction
controls whether a program runs with full or limited address space addressability. In
this chapter, a program running with limited addressability is said to be running in
a subspace.
A program running in a subspace can reference storage that is assigned to its own
subspace and storage that is not eligible to be assigned to a subspace. It cannot
reference storage that is eligible to be assigned to a subspace or storage that is
assigned to a subspace other than the one in which the program is running. In
other words, a subspace allows a program running in it to reference all of the
storage associated with the address space except the private area storage that is
eligible to be assigned to a subspace or assigned to another subspace.
An address space that owns subspaces is also called a “base space”. Figure 8-1
illustrates the concept of creating a subspace in base space ASID 23.
Subspace A
ASID 23 ASID 23 ASID 23 of ASID 23
Assigned to Assigned to
Subspace A Subspace A
PGM2
1 2 3 4
An address space can have many subspaces. Each application program running
simultaneously in an address space can run in its own subspace. The subspace
restricts a program running in it from referencing the storage assigned to other
subspaces. Figure 8-2 illustrates the concept of multiple subspaces by adding
another subspace to address space ASID 23.
Subspace A Subspace B
ASID 23 of ASID 23 of ASID 23
Assigned to Assigned to
Subspace A Subspace A
PGM2
Assigned to Assigned to
Subspace B Subspace B
PGM3
1 2 3
1. Running with full address space addressability, PGM1 creates and assigns
storage to Subspace B. PGM1 can reference the entire address space,
including storage assigned to Subspaces A and B, and subspace-eligible
storage (shaded).
A subspace is associated with only one address space and is owned by the task
that creates it. A task cannot pass addressability to its subspaces to its subtasks or
SRBs. An attached subtask or an SRB gets control with full address space
addressability.
A subspace has an access list entry (called an “entry” in this chapter) associated
with it. After a program creates a subspace, it adds the entry to the dispatchable
unit access list (DU-AL) associated with the task the program runs under. A
program does not have to be in AR mode to use a subspace, although it can be.
A program can toggle between running in a subspace and running with full address
space addressability by issuing the BSG instruction.
Using subspaces does require additional code in the server program. This
requirement is explained in detail in “Steps to Manage Subspaces” on page 8-6.
Benefits of Subspaces
The use of subspaces can protect the server and application programs in an
address space. In addition, subspaces can help you to identify where in the
address space an error has occurred.
Providing Diagnosis
An IPCS diagnostic report and trace functions can help you to identify where in the
address space an error has occurred.
An ABEND dump can help you to identify that an error resulted from a prohibited
storage reference. When requested by a program running in a subspace, an
ABEND dump contains only the storage that the program is allowed to reference.
Limitations of Subspaces
Subspaces have the following limitations:
They do not provide protection against deliberate attempts to overwrite code.
To ensure that subspace storage is protected, the system abnormally ends a
program that:
– Attempts to reference storage to which it does not have addressability
– Provides incorrect information on the IARSUBSP macro.
Therefore, you might need to code additional recovery routines for your
programs.
An unauthorized application program running in a subspace cannot add more
storage to the subspace. If an application program requires more subspace
storage, the server program must obtain subspace-eligible storage for the
application. This is explained in detail in “Requesting Additional Storage while
Running in a Subspace” on page 8-18.
The system allocates storage for its own use from subpool 255 when a program:
Makes storage eligible to be assigned to a subspace
Creates a subspace
Assigns more than 2 segments of storage below 16 megabytes to a subspace.
The system deallocates its storage when the program deletes the subspace or
makes the storage ineligible to be assigned to a subspace.
The amount of storage that the system requires for its own use depends on
whether the subspace storage is above or below 16 megabytes. The system
requires more storage to manage subspaces below 16 megabytes.
Use the following guidelines to plan for the system's storage requirements:
Figure 8-4 (Page 1 of 2). Steps for Creating, Using, and Deleting Subspaces
Step Minimum Performed by: Described
Authorization on page
Determine if the subspace is Problem state Testing a bit in 8-9
available on your system and any PSW the CVT
key
Obtain storage for subspaces Using the 8-9
GETMAIN or
STORAGE
macro
Make the storage eligible to be Supervisor Using the 8-11
assigned to subspaces state or PSW IARSUBSP
key 0 - 7 macro with
IDENTIFY
Create the subspaces Using the 8-14
IARSUBSP
macro with
CREATE
You can choose to manage subspaces in either of the following ways, or with a
combination of the two:
Create a number of subspaces prior to receiving requests for application
program services
Create one subspace at a time, in response to receiving a request for
application program services.
The method that you choose depends on whether your installation is more
concerned with storage constraints or performance of the application server.
Managing subspaces in this way is less costly than other designs in terms of
performance. The IDENTIFY and CREATE functions use more instructions than the
ASSIGN and UNASSIGN functions. By reserving a quantity of subspace-eligible
storage and creating subspaces that are reused for multiple invocations of the
application programs, the server program manages subspaces efficiently.
This design could cause storage constraints. When storage is subspace-eligible but
not assigned to a subspace, a program running in a subspace cannot reference it.
Subspace-eligible storage cannot be released until the server program makes it
ineligible to be assigned to a subspace. Furthermore, a program cannot pass
ownership of subspace-eligible storage to a subtask.
If storage constraints in the application server address space are a concern at your
installation, you might want to consider the alternate design described in “Managing
Subspaces when Storage Is a Priority.”
IARSUBSP ASSIGN Assign the range of storage that a program running in the
subspace can reference
Specify STOKEN, storage portion
In addition, be sure that you request enough storage to allow you to align the
storage on a megabyte boundary. To align the storage correctly, you might have to
request a good deal more storage than you plan to use.
When the STORAGE macro successfully obtains storage, it returns the length and
address of the storage. You supply the length and address of the obtained storage
in a range list when you invoke the IARSUBSP macro to make the storage eligible
to be assigned to a subspace. (Making storage eligible is described in detail in
“Making a Range of Storage Eligible to Be Assigned to a Subspace” on
page 8-11.)
Aligning Virtual Storage for a Subspace: After you obtain the storage for the
subspaces, you must align the storage on a megabyte boundary before specifying it
on an IDENTIFY request. See “Example of Managing Subspaces” on page 8-21,
which illustrates how to align the storage you've obtained.
Creating the Range List: The range list is a storage area containing up to 16
entries. Each entry consists of 2 words as follows:
First word The starting virtual address of the storage range that the system is
to make eligible to be assigned to a subspace. The starting
address must be on a megabyte boundary. A megabyte is
1,048,576 bytes long.
The range list must be addressable in the caller's primary address space. Each
range must reside in a single subpool.
You might not be able to obtain all of the subspace storage required by your
application programs in a single STORAGE macro request. If you cannot, add an
entry to the range list for each storage request. The STORAGE macro returns the
number of bytes of storage obtained in GPR 0. The second word of the range list
entry requires the number of pages obtained. To convert the number of bytes into
the number pages, divide the number of bytes returned in GPR 0 by 4096. Store
the quotient into the second word of the range list entry. Store the contents of GPR
1 into the first word of the range list entry.
A server program that attempts to release the storage before the storage has been
made ineligible to be assigned to a subspace will abnormally end with system
completion code X'A05', X'A0A', or X'A78'. To make the storage ineligible to be
assigned to a subspace, specify the storage range on the IARSUBSP macro with
the UNIDENTIFY parameter.
Task Hierarchy Restrictions: Your server program should run under the lowest
task in the task hierarchy that will need to make storage eligible to be assigned to a
subspace.
The first time a server program successfully issues the IARSUBSP IDENTIFY
request in an address space, the system identifies the task under which that
program runs as the lowest task in the task hierarchy that can make subsequent
IARSUBSP IDENTIFY requests. Additionally, that task or a higher task must own
the storage that is being made eligible to be assigned to a subspace.
The following examples illustrate the range list and how to use a register or a
fullword field as pointers to it.
The range list contains 3 entries and RANGLIST uses register notation:
NUMRANGE=3,RANGLIST=(5)
8 bytes
The range list contains 3 entries and RANGLIST uses a fullword pointer:
NUMRANGE=3,RANGLIST=RANGADDR
8 bytes
For the requirements of the range list for an ASSIGN or UNASSIGN request, see
“Requirements of the Range List for an ASSIGN or UNASSIGN Request” on
page 8-16.
Storage
01400000
Range List
01401000
Start addr amount
01400000 00000256
01402000
GPR 2
Start addr amount
01403000
. .
. .
. .
. .
014FD000
01402000
GPR 3
Be aware that, if you choose to let the system generate the subspace names for
you, you must still supply three characters for the system to use.
You also must supply the subspace STOKEN to associate and disassociate storage
with a subspace, and to delete the subspace after your application program has
run.
The ALESERV macro returns an ALET. Do not modify this ALET. Use the ALET as
an operand on the BSG instruction to switch to a subspace.
Use the IARSUBSP macro with the ASSIGN parameter to associate a subspace
with its storage. Either an authorized or unauthorized program can perform this
step. Specify a storage range from the storage you obtained, and the STOKEN
returned when you created the subspace.
One way to design your server program is to create a loop in the server program.
For each request to the server program for application program services, the
program loop:
1. Assigns a storage range to a subspace
2. Issues the BSG instruction to switch to subspace addressability
3. Passes control to the application program
4. Receives control after the application program finishes its processing
This design ensures that there is a subspace available for the application program
to run in. It also allows eligible storage to be reassigned to different subspaces as
needed, while preventing application programs from referencing the storage as it is
being reassigned.
If an entry in the range list does not conform to one or more of the range list
requirements, the system processes the range list entries up to the entry in error.
The system does not process the incorrect range list entry or any range list entries
that follow it. The system abnormally ends the IARSUBSP ASSIGN request with
system completion code X'3C6', and puts the address of the incorrect range list
entry in GPR 2. It puts the address of the storage range into GPR 3.
Branching to a Subspace
A server program branches to a subspace when it issues the BSG instruction with
the ALET that corresponds to the desired subspace, and its primary and home
address spaces are the same. The BSG instruction uses an ALET-qualified branch
address to switch to the subspace. Use the ALET returned by ALESERV ADD.
After issuing the BSG instruction, a program can reference the subspace while
running in primary, secondary, or AR modes. The program runs in a subspace until
it switches to:
Another subspace or full address space addressability, by issuing another BSG
instruction
Another address space, by issuing a space-switching instruction.
Here are some hypothetical actions and the results of those actions:
Aside from these restrictions, a program running in a subspace can reference the
same storage that a program running with full address space addressability can
reference.
A task that either deletes the entries or adds them specifying CHKPT=IGNORE is
responsible for rebuilding the subspaces and reestablishing the connections to
them. If a restart occurs after a successful checkpoint, the system does not rebuild
the subspaces or establish addressability to them.
After doing so, the server program can pass control back to the application
program, which can then use the additional storage.
Keep in mind that the server program should preserve the starting address and
number of pages of any additional storage that it obtains, to disassociate the
storage and make it ineligible to be assigned to a subspace when the application
program has finished processing, and to release the storage.
Additionally, the program must ensure that the MVS service has access to all
required parameter lists, data areas, and program exits, by keeping them in storage
that is assigned to the subspace or storage that can be referenced by all
subspaces. If the program cannot provide access to both of these storage areas, it
might have to switch to full address space addressability to use the MVS service.
Finally, the program must ensure that all necessary storage is available to an MVS
service across asynchronous operations.
If the storage range you specify is not assigned to the subspace you specify, the
system does not process that request but will continue to process the subsequent
valid range list entries. The system places return code 4 in GPR 0.
If an entry in the range list does not conform to one or more of the range list
requirements, the system processes the range list entries up to the entry in error.
The system does not process the incorrect range list entry or any range list entries
that follow it. The system abnormally ends the IARSUBSP UNASSIGN request with
system completion code X'3C6', and puts the address of the incorrect range list
entry in GPR 2. It puts the address of the storage range into GPR 3. See
Figure 8-7 on page 8-13 for an illustration of a range list error.
If the task that created the subspace ends before the subspace entry has been
deleted, the system will remove the entry from the DU-AL.
The program that deletes a subspace must be running under the same task as the
program that created the subspace. The program will abnormally end if it attempts
to delete a subspace that it, or any other program, is running in.
The system disassociates the storage from the subspace before deleting the
subspace, if the program has not already done so.
Deleting a subspace does not remove its associated entry from the DU-AL. See
“Removing the Subspace Entry from the DU-AL” for information about deleting the
entry.
The system disassociates the storage from the subspace before making the
storage ineligible to be assigned to a subspace, if the server program has not
already done so.
If an entry in the range list does not conform to one or more of these requirements,
the system processes the range list entries up to the entry in error. The system
does not process the incorrect range list entry or any range list entries that follow it.
The system abnormally ends the IARSUBSP UNIDENTIFY request, with system
completion code X'3C6', and puts the address of the incorrect range list entry in
GPR 2. It puts the address of the storage range into GPR 3.
Releasing Storage
A program cannot release the storage that was obtained for subspaces until it
issues the IARSUBSP macro with the UNIDENTIFY parameter. If it attempts to free
the storage before issuing IARSUBSP UNIDENTIFY, the program will abnormally
end with system completion code A05, A0A, or A78. See OS/390 MVS System
Codes for information about those codes.
Use the STORAGE macro with the RELEASE parameter to release the storage that
you obtained for the subspaces. You can also use the FREEMAIN macro, but
STORAGE has fewer requirements and restrictions and is easier to use.
Free the storage by specifying on the SP parameter the subpools you obtained for
your subspace storage.
You can plan for this by designing recovery routines that intercede when the
system abnormally ends your server program. System code X'3C6' in OS/390
MVS System Codes describes the IARSUBSP macro errors that cause your
program to abnormally end.
To set up a recovery routine for any program, you must understand the topics
presented in the recovery chapter in OS/390 MVS Programming: Authorized
Assembler Services Guide. To design recovery for programs running in subspaces,
you need additional information about the recovery routine's subspace
environment. The subspace environment is simply whether the routine is running
with full address space addressability or in a subspace, and, if it is running in a
subspace, which one? Like a mainline program, a recovery or retry routine can use
the BSG instruction to:
Change subspaces, by specifying the ALET of the desired subspace
Run with full address space addressability, by specifying ALET 0
Because SPIE and ESPIE routines cannot percolate, they always receive control in
the subspace environment that was in effect when the error occurred in the
mainline program. SPIE and ESPIE routines are explained in OS/390 MVS
Programming: Authorized Assembler Services Guide.
After an error in the mainline program, the first recovery routine to receive control
runs in the subspace that the mainline was running in at the time of error. If the
mainline routine was running in Subspace A, the recovery routine gets control in
Subspace A. If the mainline routine was running with full address space
addressability, the recovery routine gets control with full address space
addressability.
If the recovery routine percolates, the next recovery routine receives control in the
environment in effect when the previous recovery routine percolated. For example,
if the first recovery routine received control in Subspace A, issued the BSG
instruction to change to full address space addressability, then percolated, the next
recovery routine will receive control with full address space addressability.
When the current recovery routine processes successfully and returns to the correct
subspace, SSRESET=YES protection is no longer necessary. The next recovery
routine is no longer in danger of receiving control in the wrong subspace if the
current recovery routine abnormally ends. At this point, you can specify
SSRESET=NO in the current recovery routine. SSRESET=NO negates the earlier
specification of SSRESET=YES. If the current recovery routine abnormally ends
after specifying SSRESET=NO, the next recovery routine gets control as described
in “Subspace Environment at Entry to Recovery Routines” on page 8-25. See
OS/390 MVS Programming: Authorized Assembler Services Reference SET-WTO
for a description of the SETRP macro and the SSRESET parameter.
If the mainline program passes a user parameter area to the recovery routine, the
mainline routine should create the user parameter area in storage that can be
referenced by all subspaces. This ensures that, if the recovery routine changes the
environment in which it is running, it will still be able to reference the user
parameter area.
Requesting a Dump
If a program requests an SVC dump while running in a subspace, the system
dumps the entire address space.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may be
used instead. However, it is the user's responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you any
license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply to
you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those
Web sites. The materials at those Web sites are not part of the materials for this
IBM product and use of those Web sites is at your own risk.
Licensees of this program who wish to have information about it for the purpose of
enabling: (i) the exchange of information between independently created programs
and other programs (including this one) and (ii) the mutual use of the information
which has been exchanged, should contact:
IBM Corporation
Mail Station P300
2455 South Road
Poughkeepsie, NY 12601-5400
USA
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
If you are viewing this information softcopy, the photographs and color illustrations
may not appear.
Trademarks
The following terms are trademarks of the IBM Corporation in the United States or
other countries or both:
AnyNet
AT
BookManager
CICS
DB2
DFSMSdfp
DFSMSdss
DFSMShsm
DFSMSrmm
DFSMS/MVS
ESA/370
ESA/390
ESCON
FFST/MVS
Other company, product, and service names may be trademarks and service marks
of others.
Address space. A range of two gigabytes of Basic PC instruction. Transfers control to another
contiguous virtual storage addresses that the system program, the PC routine. The basic PC requires the
creates for a user. It contains user data and programs, service provider to save and restore the user's
as well as system data and programs, some of which environment. The PC routine can be in the same
are common to all address spaces. Instructions address space as the program that issues the PC
execute in an address space. instruction, or in a different address space.
Address/data space. Address space or data space Central storage. Program-addressable storage from
which instructions and other data can be loaded directly
ALET (access list entry token). A token that indexes into registers for subsequent execution or processing.
into an access list. When a program is in AR mode and
the ALET is in an AR with the corresponding GPR Control parameters. Parameters that a macro service
being used as a base register, the ALET indicates the routine uses.
address space or data space that the system is to
reference. An ALET can also identify a hiperspace. CPYA (copy access) instruction. Copies the
contents of one AR into another AR.
ALET-qualified address. An 8-byte address that
consists of an ALET (identifying a space) and an Cross memory mode. Cross memory mode exists
address (identifying an offset within the space). The when at least one of the following conditions are true:
ALET-qualified address might be contained in storage The current primary address space (PASN) and the
with the ALET in the first 4 bytes and the address in the current home address space (HASN) are different
last 4 bytes. Or, it might be contained in an AR/GPR address spaces.
pair. The current secondary address space (SASN) and
the current home address space (HASN) are
AR (access register) mode. The ASC mode in which
different address spaces.
the system uses both the GPR (used as the base
The ASC mode is secondary.
register) and the corresponding AR to resolve an
address in an address/data space. Data space. A range of up to two gigabytes of
contiguous virtual storage addresses that a program
AR/GPR. Access register and general purpose register
can directly manipulate through assembler instructions.
pair.
Unlike an address space, a data space can hold only
data; it does not contain common areas or system data
ASC (address space control) mode. The mode
or programs. Instructions do not execute in a data
(determined by the PSW) that tells the system where to
space.
find the data it is to reference. Three ASC modes are
AR, secondary, and primary.
Dispatchable unit. A TCB or SRB, sometimes called
work unit.
Authority table. Consists of entries that define the PT
and SSAR authority that other address spaces have
DU-AL (dispatchable unit access list). Access list
with respect to the cross memory user's address space.
associated with the dispatchable unit (or work unit).
Entries also define the EAX authority that a PC routine
has with respect to an address space. Each entry in the EAR (extract access) instruction. Copies the
table corresponds to a particular authorization index. contents of an AR into a GPR.
Authorization index (AX). Indicates the authority of a EAX (extended authorization index). An identifier
program that's running in one address space to issue that the system uses to determine the authority of a
EPAR (extract primary ASN) instruction. Place the MSTA (modify stacked state) instruction. Copies the
primary ASID into a GPR. contents of an even/odd GPR pair to the modifiable
area of the current linkage stack entry.
EREG (extract stacked registers) instruction. Loads
ARs and GPRs from the current linkage stack entry. MVCK (move with key) instruction. Moves data
between storage areas that have different protection
ESAR (extract secondary ASN) instruction. Place keys.
the secondary ASID into a GPR.
MVCP (move to primary) instruction. Moves data
ESO (expanded storage only) hiperspace. A from the secondary address space to the primary
hiperspace that is backed by expanded storage only. It address space.
is a high-speed buffer area or “cache” for storing data.
MVCS (move to secondary) instruction. Moves data
ESTA (extract stacked state) instruction. Obtains from the primary address space to the secondary
non-register information from the current linkage stack address space.
entry.
Non-shared standard hiperspace. A standard
Expanded storage. High-speed high-volume hiperspace that can generally be shared only with
electronic storage. The operating system transfers this programs that are dispatched in the owner's home
storage to and from central storage in 4K byte blocks. address space. However, a program not dispatched in
the owner's home address space and using an ALET,
GPR. General purpose register can access this non-shared standard hiperspace
through the owner's home PASN-AL.
Hiperspace. A range of up to two gigabytes of
contiguous virtual storage addresses that a program Normal linkage stack. Saves program status
can use as a buffer. Like a data space, a hiperspace information. The system uses this linkage stack until
can hold user data; it does not contain common areas entries are no longer available. It then presents a
or system data. Instructions do not execute in a "stack-full" program interruption.
hiperspace. Unlike an address space or a data space,
data is not directly addressable. To manipulate data in a PR (program return) instruction. Returns control to a
hiperspace, you bring the data into the address space program that issued a stacking PC or BAKR instruction.
in 4K byte blocks.
Primary address space. The address space whose
Home address space. The address space in which segment table is used to fetch instructions in primary,
the TCB or the SRB is initially dispatched. A TCB or secondary, and AR ASC modes. A program in primary
SRB represents a dispatchable work unit. When MVS mode fetches data from the primary address space.
initially dispatches a work unit the primary, secondary,
and home address spaces are the same address Primary ASC mode. The ASC mode in which the
space. system uses the GPRs, but not the ARs, to resolve an
address in an address space. In primary ASC mode,
IAC (insert address space control) instruction. the system fetches instructions and data from the
Indicates in a GPR which ASC mode is in effect. primary address space.
LAE (load address extended) instruction. Load a Processor storage. The combination of central and
specified ALET and address into an AR/GPR pair. expanded storage.
LAM (load access multiple) instruction. Load the Program call (PC) instruction. Transfers control to
contents of one or more ARs from a specified location. another program, the PC routine. The PC instruction is
either a stacking or a basic PC instruction. The PC
Linkage index (LX). Provides an index into the cross routine can be in the same address space as the
memory user's linkage table. program that issues the PC instruction, or, in the case
of a space-switching PC instruction, a different address
Linkage stack. An area that the system provides for a space.
BAKR or a stacking PC to save status information. It
SAC (set address space control) instruction. Standard hiperspace. A hiperspace that is backed by
Explicitly sets either the primary ASC mode, secondary expanded storage, and auxiliary storage, if necessary.
ASC mode, AR ASC mode, or home ASC mode. Through a buffer area in an address space, your
program can “scroll” through a standard hiperspace.
SAR (set access register) instruction. Place the
contents of a GPR into an AR. STOKEN (space token). An eight-byte identifier of an
address space, data space, or hiperspace. It is similar
Secondary address space. The address space to an address space identifier (ASID or ASN), with two
whose segment table the system uses to access data in important differences: the system does not reuse the
secondary ASC mode. STOKEN value within an IPL, and data spaces do not
have ASIDs. Macros that support AR mode callers often
Secondary ASC mode. The ASC mode in which the use STOKENs instead of ASIDs to identify address/data
system fetches instructions from the primary address spaces.
space and data from the secondary address space.
TTOKEN. A 16-byte identifier of a TCB. Unlike a TCB
Shared standard hiperspace. A standard hiperspace address, a TTOKEN is unique within an IPL.
that can be shared with programs that are dispatched in
any address space. User parameters. Parameters that a macro service
routine passes from the user of the macro to another
Space-switching PC instruction. A PC instruction routine.
that transfers control to a PC routine that is not in the
same address space as the program that issues the PC Work unit. A TCB or SRB, sometimes called a
instruction. dispatchable unit.
SSAR (set secondary ASN). Sets the secondary X-macro. Some macro services offer two macros, one
address space to a specified address space. for callers in primary mode and one for callers in AR
mode. The name of the macro for the AR mode caller is
Stacking PC instruction. Transfers control to another the same as the name of the macro for primary mode
program, the PC routine. The stacking PC uses the callers, except the macro that supports the AR mode
linkage stack for storing the caller's status. It provides caller ends with an “X.” The “X” version of the macro is
more options and more automatic function than the called an “X-macro.”
basic PC instruction. The PC routine can be in the
Glossary X-3
X-4 OS/390 V2R10.0 MVS Extended Addressability Guide
Index
add an entry to an access list
Numerics description 4-17
0C4 system completion code example 4-18, 4-19, 4-20, 6-20
with subspaces 8-26 add an entry to the DU-AL
0D3 system completion code rules for data spaces 5-6
with subspaces 8-15 add entry to an access list
12A system completion code rules for data spaces 5-6
with subspaces 8-11 add entry to the DU-AL
3C6 system completion code example 4-21, 5-21
IARSUBSP ASSIGN request 8-16 illustration 4-21
IARSUBSP IDENTIFY request 8-13 add entry to the PASN-AL
IARSUBSP UNASSIGN request 8-20 example 4-22
IARSUBSP UNIDENTIFY request 8-21 illustration 4-22
recovering from 8-24 rules for data spaces 5-6
ADD parameter on ALESERV macro 4-16
ADDPASN parameter on ALESERV macro 4-16
A address space
A05 system completion code
comparison with data space and hiperspace 1-1
with subspaces 8-21
creating through ASCRE 7-1
A0A system completion code
creating through ASCRE macro 7-15
with subspaces 8-21
example 7-13
A78 system completion code
deleting through ASDES macro 7-12
with subspaces 8-21
establishing access through ARs 4-7
ABEND macro used to dump data space
establishing attributes for 7-11
storage 5-37
getting EAX-authority 4-28
access data in a data space 5-4
naming 7-2
rules for 5-4, 5-6
procedures for obtaining EAX-authority 4-34
access list 4-17
terminating with ASDES macro 7-1
adding entry for address space 4-19
address space authorization for PC routines 3-11
adding entry for data space 4-18
purpose 3-11
adding entry for hiperspace 6-20
address space creation
definition 4-3
initialization routine 7-5
deleting hiperspace entry 6-21
synchronization of process 7-6
description 4-7
through ASCRE 7-1
illustration 5-2
address/data space
private entries 4-12
definition 4-2
public entries 4-12
addressability 8-1, 8-14
relationship with work unit 4-10
changing 8-17
size 4-9, 4-10
with subspaces 8-17
type 4-8, 4-12, 5-2
establishing 8-14
access list entry
to subspace 8-14
adding 4-7, 4-17
full address space 8-1
deleting 4-27, 6-21
addressability through DU-AL
example 4-18
example 4-21
limit 5-37
illustration 4-21
type 4-12
addressability through PASN-AL
access list entry token 8-15
example 4-22
See also ALET (access list entry token)
illustration 4-22
ACCESS parameter on ALESERV macro 4-17, 4-29
addressing mode
add an entry for primary address space to
compared to ASC mode 4-3
DU-AL 4-25
AKM (authorized key mask) 3-1
purpose 3-11
Index X-7
create cross memory mode (continued)
address space 7-1 compared to ASC mode 4-3
data space 5-1 cross memory recommendations 3-1
ESO hiperspace 6-13 accessing data from a PC routine 3-1
hiperspace 6-1 general register 13 initialization 3-37
standard hiperspace 6-12 loading PC routines 3-43
cross memory macro sequence 3-15
example of setting up 7-2 obtaining and releasing resources 3-39
setting up environment through ASCRE macro 7-2 type of PC to use 3-9
cross memory communication 3-1 use of ETDEF macro 3-21
accessing data from a PC routine 3-7 use of IHAETD mapping macro 3-21
accounting considerations 3-14 use of PCLINK macro 3-35
advantage 3-1 current entry in linkage stack
assembler instructions used for 3-4 definition 2-3
basic PC linkage, overview 3-6 current size of data space 5-9
considerations before using 3-13 current size of hiperspace 6-10
entry table 3-9 CVT (communications vector table) 8-9
environment 3-9 testing 8-9
environmental considerations 3-13 for subspace 8-9
establishing communication 3-14
EX (entry table index) 3-10
example 3-19, 3-30 D
execution time consideration 3-14 data movement
introduction 3-1 in AR mode 4-33
linkage conventions 3-35 data reference
linkage table 3-10 using ARs 4-1
LX (linkage index) 3-10 data space 5-11
macros used for 3-3 choosing the name 5-8
overview of cross memory communication 3-5 compared to address space 1-1
PC linkage 3-6, 3-30 compared with hiperspace 1-8
PC number 3-10 containing DREF storage 5-12
PC routine 3-1 creating 5-1, 5-7
characteristics 3-30 data manipulation 1-8
execution 3-6 data manipulation illustration 1-8
invocation 3-5 decision to use 1-7
overview 3-5 definition 5-1
requirements 3-34 deleting 5-3, 5-20
PKM (PSW key mask) 3-10 description 1-6
recovery considerations 3-43 dumps of storage 5-37
requirements 3-14 efficient use 5-37
requirements for PC routines 3-34 establishing access through ARs 4-7
resource management considerations 3-13 example 1-7, 1-11
restrictions 3-14 example of creating 4-18
services for all address spaces 3-15 example of moving data in and out 5-15
services for selected address spaces 3-17 extending current size 5-4, 5-19
stacking PC linkage, overview 3-6 identifying the origin 5-11
summary 3-9 managing storage 5-13
terminology 3-2 mapping data-in-virtual object into 1-6, 5-26
when to use 3-1 physical backing 1-10
cross memory data movement protecting storage 5-11
compared to AR mode data movement 4-33 PSW key 5-11
cross memory environment referencing data 5-2
example 7-8 releasing storage 5-29
illustration 7-7 restoring after a checkpoint/restart operation 5-13
cross memory mode saving before a checkpoint/restart operation 5-13
compared to AR mode 4-1 shared between two address spaces 4-24
Index X-9
EAX (extended authorization index) (continued) establish addressability (continued)
unauthorized 4-29 to an address space
with the value 0 4-29 definition 4-4
EAX-authority establish attributes for address spaces 7-11
checked by system 4-17 ESTAE-type recovery routine
checking 4-36 use of linkage stack 2-8
compared with SSAR authority 4-34 ET (entry table)
definition 4-13, 4-28 illustration 7-6
description 4-28 ETCON macro 3-1
illustration 4-30 example 3-24, 3-29
obtaining 4-28 purpose 3-4
procedures for obtaining 4-34 used to obtain EAX-authority 4-35
system checking for 4-30 ETCRE macro 3-1
EAX-checking example 3-20, 3-29
how to prevent it 4-30 purpose 3-4
how to request it 4-30 used for obtaining EAX 4-35
ECBs for initialization routine 7-5, 7-7 ETDEF macro 3-1
EKM (entry key mask) 3-1 example 3-20
purpose 3-11 purpose 3-4
relationship to PKM 3-11 used to change EAX 4-34
entry table 3-1 ETDES macro 3-1
connecting, example 3-24, 3-29 example 3-27, 3-30
example 3-29 purpose 3-4
example of how to define 3-20 ETDIS macro 3-1
illustration 7-6 example 3-27
ownership 3-20 purpose 3-4
purpose 3-9 EX (entry table index) 3-1
purpose of EX 3-10 purpose 3-10
structure 3-9 responsibility for maintaining 3-10
entry table index 3-1 example of moving data in and out of data
See also EX (entry table index) space 5-15
EREG instruction examples of cross memory usage 3-19, 3-30
description 2-5 provide services to all address spaces 3-28
example 2-5 address space authorization 3-29
ESO hiperspace cleaning up 3-30
backing 6-13 establishing access 3-29
compared with standard hiperspace 6-6 granting PT authority 3-29
creating 6-13 granting SSAR authority 3-29
definition 6-4 providing service 3-29
description 6-6 removing access 3-30
example of creating 6-13 setting up 3-28
read and write operation 6-26 system LX, obtaining 3-28
use 6-6 providing non-space switch service 3-30
ESTA instruction providing services to selected address spaces 3-20
description 2-5, 2-6 constructing a PC number 3-23
example 2-7 entry table create 3-20
establish establishing access 3-24
access for ARs 4-7 granting PT authority 3-24
cross memory environment granting SSAR authority 3-24
through ASCRE macro 7-2, 7-7, 7-8 PC routine definition 3-20
establish addressability removing access to PC routine 3-27
example 4-20 reserving an AX 3-20
to a data space 4-20 reserving an EAX 3-20
definition 4-4, 5-2 reserving an LX 3-20
example 5-13, 5-21 execution key mask 3-1
procedures 5-13 See also EKM (entry key mask)
rules 5-4, 5-6
Index X-11
IEANTRT callable service linkage stack 2-1
example of using 3-26, 3-27 adding entry 2-3
IEFUSI installation exit 5-14, 6-2 advantages of using 1-4, 2-1
IEZEAECB mapping macro 7-3, 7-5 assembler instructions that manipulate entries 2-2
IHAASEO mapping macro 7-2 default number of entries 2-7
IHAETD mapping macro 3-21 description 2-1
information field in linkage stack entry dumping the contents 2-8
definition 2-6 example 2-4
illustration 2-6 expanding 2-7
initial size of data space 5-9 format of information field 2-6
initial size of hiperspace 6-10 illustration 2-1
initialization routine for new address space 7-5 removing entry 2-3
description 7-5 use by ESTAE-type recovery routine 2-8
how to write 7-5 use by reentrant programs 2-1
requirement 7-3 linkage stack entry
specifying 7-2 assembler instructions that manipulate 2-2
installation limit contents 2-4
amount of storage for data space and linkage stack instructions
hiperspace 5-9 using 2-5
on amount of storage for data space and linkage table 3-1
hiperspace 5-14, 6-2, 6-9 illustration 7-6
on size of data space 5-14 purpose 3-10
on size of hiperspace 6-9 relationship to LX 3-10
on size of hiperspaces 6-2 LISTD parameter on SDUMPX macro 5-37
size of data space 5-9 load instruction in AR mode
instructions used for cross memory 3-4 example 4-6
instructions used to manipulate linkage stack LSEXPAND macro
entry 2-5 example 2-8
IOSADMF macro use 2-7
APURGE request 6-32 LX
AREAD and AWRITE request 6-32 reuse of 3-42
compared to HSPSERV macro 6-28 LX (linkage index) 3-1
efficient data transfer 6-32 owner 3-20
example of 6-33 purpose 3-10
IPCS (interactive problem control system) type 3-10
format and display AR information 4-43 LXFRE macro 3-1
IPS settings of new address space 7-1 example 3-27
purpose 3-4
LXLIST parameter on ASCRE macro 7-9
K LXRES macro 3-1
KEEP parameter on HSPSERV macro 6-27 example 3-20, 3-28
KEY parameter on DSPSERV macro 5-8, 6-8, 6-11 purpose 3-4
used for obtaining EAX 4-35
L
LAE instruction M
description 4-7 macros 3-1
example 5-33, 5-34 cross memory 3-1
LAM instruction requirements for issuing 3-15
description 4-7 summary 3-3
example 4-7, 4-18, 5-21, 6-20 issuing in AR mode 4-40
limit use of data space 5-14 passing parameters to in AR mode 4-43
limit use of hiperspace 6-2 manage data space storage 5-13
linkage index 3-1 manipulate data in a data space 5-21
See also LX (linkage index) manipulate data in hiperspace 6-1
Index X-13
PC number (continued) PC routine (continued)
purpose 3-10 MVCS instruction, using 3-7
PC routine 3-1 non-space switch, defined 3-6
accessing data 3-7 overview 3-5
authorization for problem state routines 3-10 recommendation for data access 3-1
available to all address spaces 3-15 requirements 3-34
address space authorization 3-16 space switch, defined 3-6
AX value used 3-16 stacking 3-1
basic PC routine linkage 3-16 addressing mode 3-32
entry table connect 3-16 ARR (associated recovery routine) 3-34
entry table create 3-16 ASC mode 3-33
linkage index 3-16 authorization for problem state programs 3-32
macros used 3-16 defined 3-6
PC routine 3-16 defining 3-31
PT authority 3-16 EAX (extended authorization index) 3-33
SSAR authority 3-16 linkage capability 3-30
available to selected address spaces 3-17 non-space switch 3-32
address space authorization 3-17 PKM (PSW key mask) 3-32
authorization index 3-17, 3-18 problem state 3-31
AX value 3-17 PSW key 3-34
entry table 3-18 requirements 3-34
linkage 3-18 SASN value 3-33
linkage index 3-17 space switch 3-32
macros used 3-17 supervisor state 3-31
PC number 3-18 use of access registers (ARs) 3-7
PC routine 3-18 used in obtaining EAX-authority 4-34
PT authority 3-17, 3-18 PCLINK macro 3-1
SSAR authority 3-17, 3-18 compared with linkage stack function 2-1
stacking AX value 3-18 purpose 3-4
stacking PC,address space authorization 3-18 physical storage
basic 3-1 comparison of data space and hiperspace use 1-10
addressing mode 3-32 PKM (PSW key mask) 3-1
authorization for problem state programs 3-32 purpose with PC routine 3-10
defined 3-6 relationship to AKM 3-10
defining 3-31 relationship to EKM 3-10
linkage capability 3-30 PPT values of new address space 7-1
linkage conventions 3-35 PR instruction
non-space switch 3-32 description 2-3
PKM (PSW key mask) 3-32 example 2-3
problem state 3-31 removing entry from linkage stack 2-3
requirements 3-34 primary address space
space switch 3-32 adding an entry to DU-AL 4-25
supervisor state 3-31 ALET for 4-13
comparison of linkage conventions 3-38 primary mode
defining 3-31 compared to AR mode 4-4
definitions, common to basic and stacking 3-31 compared with AR mode 4-3
execution 3-6 definition 4-2
IBM recommendation 3-31 description 1-4, 4-2
invocation overview 3-5 switching 4-3
invocation, example 3-25 private entry in access list
linkage capability 3-30 compared to public entry 4-30
linkage conventions 3-35 definition 4-12, 4-29
basic PC 3-35 illustration 4-30
stacking PC 3-36 problem state program
loading recommendations 3-43 use of data spaces and hiperspaces 1-8
MVCP instruction, using 3-7
Index X-15
set standard hiperspace
ASC mode through SAC instruction 4-3 compared with ESO hiperspace 6-6
set up creating 6-12
addressability to a data space 4-8, 4-16, 4-20, 5-2 definition 6-4
example 4-18 description 6-4
addressability to a hiperspace example of creating 6-12
example 6-20 example of scrolling 6-4
addressability to a subspace 8-14 examples of use by problem state programs 6-15
addressability to an address space 4-8, 4-16 illustration of scrolling 6-4
cross memory environment in new address read and write operation 6-23
space 7-9 use 6-5
set up EAX-authority to an address space 4-28 START parameter on DSPSERV macro 5-29, 6-44
SETLOCK macro STOKEN
example 5-33, 5-34 definition 5-2
use 5-33, 5-34 returned by DSPSERV macro 5-2
SETRP macro STOKEN (space taken)
SSRESET parameter 8-25 obtaining from DSPSERV 4-19
share data spaces obtaining from other programs 4-19
between two address spaces 4-24 passing to another program 4-19
shared data space STOKEN (space token)
between two problem state programs 5-24 compared with an ASID 4-8
shared standard hiperspace definition 4-8
definition 6-5 illustration of passing to another program 4-21
size of data space passing to another program 4-24
specifying 5-9 STOKEN parameter on ALESERV macro 4-17
size of hiperspace STOKEN parameter on ASCRE macro 4-17
specifying 6-9 STOKEN parameter on DIV macro 5-26
SMF installation exit IEFUSI 5-14, 6-2 STOKEN parameter on DSPSERV macro 4-17, 5-7,
SNAPX macro used to dump data space 6-7
storage 5-37 STOKEN parameter on HSPSERV macro 6-22
space switch PC routine storage 8-1, 8-9
definition 3-6 alignment 8-10
space-switching PC instruction for subspace 8-10
affect on addressability through access lists 4-11 assigning to subspace 8-15
special ALETs attributes 8-10
adding entry to the DU-AL 4-7 for subspace 8-10
definition 4-13 backing 8-10
illustration 4-13 for subspace 8-10
passing to other programs 4-20 eligible to be assigned to subspace 8-1
SRB (service request block) 5-33 isolation 8-1
example of using data space 5-34 within address space 8-1
use 1-3 making eligible for subspace 8-11
use of data space 5-30 managing data space 5-13, 5-17
use of hiperspace 6-49 managing hiperspace 6-2
SSAR authority obtaining 8-9
compared with EAX-authority 4-34 for subspace 8-9
SSRESET parameter obtaining storage in another address space 4-38
of SETRP macro 8-25 referenced by all subspaces 8-2
stacking PC 3-1 releasing after subspace 8-21
adding entry to linkage stack 2-3 required by system
available to all address spaces 3-15 with subspaces 8-5
available to selected address spaces 3-17 storage available for data space 5-14
overview 3-6 storage available for hiperspace 6-2
PC routine execution 3-6 STORAGE macro
STAM instruction OBTAIN request
description 4-7 example 4-38, 6-25
T
TCBTOKEN macro
TYPE parameter 5-33
use 5-33, 5-34
using to find TTOKEN 5-33
terminating address space with ASDES macro 7-1
termination routine for new address space 7-11,
7-12
terminology X-1
TESTART macro
use 4-36
testing
for subspace 8-9
TKLIST parameter on ASCRE macro 7-9
TRMEXIT parameter on ASCRE macro 7-11
Index X-17
Communicating Your Comments to IBM
OS/390
MVS Programming: Extended
Addressability Guide
Publication No. GC28-1769-05
If you especially like or dislike anything about this book, please use one of the methods
listed below to send your comments to IBM. Whichever method you choose, make sure you
send your name, address, and telephone number if you would like a reply.
Feel free to comment on specific errors or omissions, accuracy, organization, subject matter,
or completeness of this book. However, the comments you send should pertain to only the
information in this manual and the way in which the information is presented. To request
additional publications, or to ask questions or make comments about the functions of IBM
products or systems, you should talk to your IBM representative or to your IBM authorized
remarketer.
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute
your comments in any way it believes appropriate without incurring any obligation to you.
If you are mailing a readers' comment form (RCF) from a country other than the United
States, you can give the RCF to the local IBM branch office or IBM representative for
postage-paid mailing.
If you prefer to send comments by mail, use the RCF at the back of this book.
If you prefer to send comments by FAX, use this number:
1-(845)-432-9405
If you prefer to send comments electronically, use this network ID:
[email protected]
Overall, how satisfied are you with the information in this book?
Very Very
Satisfied Satisfied Neutral Dissatisfied Dissatisfied
Overall satisfaction
How satisfied are you that the information in this book is:
Very Very
Satisfied Satisfied Neutral Dissatisfied Dissatisfied
Accurate
Complete
Easy to find
Easy to understand
Well organized
Applicable to your tasks
When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments
in any way it believes appropriate without incurring any obligation to you.
Name Address
Company or Organization
Phone No.
Cut or Fold
Readers' Comments — We'd Like to Hear from You
IBM
Along Line
GC28-1769-05
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES
IBM Corporation
Department 55JA, Mail Station P384
2455 South Road
Poughkeepsie, NY 12601-5400
Cut or Fold
GC28-1769-05 Along Line
IBM
GC28-1769-5