Introduction

The system controls the flow of work through the computer so that all programs obtain a fair share of the processing. To make efficient use of the system, you must understand the services that the system provides and observe the programming conventions for their use.

Linkage Conventions — A program must follow register and save area conventions when it is called by another program or when it calls another program. These conventions ensure that the programs can successfully pass control to each other while preserving the register contents and the parameter data required for successful execution.

Subtask Creation and Control — Because the system can handle small programs easier than large ones, a large program might execute faster if you divide it into parts, called tasks. By following the appropriate conventions, you can break your programs into tasks that compete more efficiently for the resources of the system.

Program Management — Program residence and addressing modes are discussed in this chapter, as well as the linkage between programs. Save areas, addressability, and conventions for passing control from one program to another are also discussed.

Understanding 31-Bit Addressing — 31-bit addressing terms are defined in this chapter. Read this chapter before modifying existing programs to use 31-bit addresses.

Resource Control — Anything necessary for program execution, such as a table, a storage device, or another program, can be considered a resource. If a program depends on an event that occurs in another program, it might need to defer part of its execution until the event, which is considered a resource, is completed. Because many programs might need the same resource, and because some resources can only be used by one program at a time, synchronization is often necessary. Resource control helps to regulate access to the resources that your programs depend on for successful execution. By using the GQSCAN macro, you can obtain information about resources and their requestors.

Program Interruption Services — The system offers many services to detect and process abnormal conditions during system processing. Some conditions encountered in a program cause program interruptions or program exceptions. This topic includes how to specify user exit routines, using the SPIE or ESPIE macros, and function performed in user exit routines.

Providing Recovery — When your program encounters an error, the program might end abnormally unless you provide recovery. To recover from errors, you can write recovery routines that get control when the error occurs. These routines can attempt to correct the error and allow your program to resume normal processing. This topic explains recovery concepts and how to write recovery routines.

Dumping Virtual Storage (ABEND, SNAPX, and SNAP Macros) — If your program makes serious errors, the system terminates it. If you request it, the system generates a dump to accompany the termination, and the resulting dump is called an abend dump. You can also request another type of dump, called a SNAP dump. Programs can request a SNAP dump at any time, and they can specify the source, the format, and the destination of the information in the dump.

Reporting Symptom Records (SYMRBLD and SYMREC Macros) — An application can write a symptom record for each error to the logrec data set, the online repository where MVS™ collects error information. The unit of information stored in the logrec data set is called a symptom record. The data in the symptom record is a description of some programming failure combined with a description of the environment where the failure occurred. An application can build and write symptom records in the logrec data set by invoking either the SYMRBLD or SYMREC macro.

Virtual Storage Management — The system combines central storage and auxiliary storage to make the addressable memory appear larger than it really is. The apparent memory capacity is called virtual storage. By managing storage in this way, the system relaxes the size limit on programs and data. The storage that the system gives to each related group of programs is called an address space. As a program executes, its storage requirements might vary. Conventions described in this chapter allow a program to obtain any extra storage it might require, and to return storage that is no longer required.

Using the 64–bit Address Space — As of z/OS® Release 2, virtual storage addressing is extended to allow access to “chunks” of virtual storage called memory objects above 2 gigabytes. This chapter describes how to use the virtual storage addressing above 2 gigabytes and to control the physical frames that back this storage.

Callable Cell Pool Services — Callable cell pool services manage user-obtained areas of virtual storage efficiently, provide high performance service, and allow you to use storage in both address spaces and data spaces. This chapter describes callable cell pool services and helps you make the decision between using the CPOOL macro or callable cell pool services.

Data-In-Virtual — By using a simple technique that lets you create, read, or update external storage data without the traditional GET and PUT macros, you can write programs that use very large amounts of this type of data. The data, which is not broken up into individual records, appears in your virtual storage all at once. This technique also provides better performance than the traditional access methods for many applications.

Using Access Registers — If you need to access data in a data space, you need to use the set of registers called “access registers” and be in the address space control (ASC) mode called “AR mode”. This chapter helps you access data in data spaces and use the system services while you are in AR mode.

Data Spaces and Hiperspaces — If you need more virtual storage than a single address space allows, and if you want to prevent other users from accessing this storage, you can use data spaces and hiperspaces.

Window Services — Window services enable assembler language programs to access or create permanent or temporary data objects. By invoking the service programs provided by window services, a program can:

Sharing Application Data (Name/Token Callable Services) — Name/token callable services allow a user to share data between two programs running under the same task, or between two or more tasks or address spaces. This topic includes understanding what a name/token pair is, descriptions of the levels of name/token pairs, ownership and deletion of the pairs, using checkpoint/restart with name/token pairs, and an example of JCL that can link-edit a reentrant program with linkage-assist routines.

Processor Storage Management — The system administers the use of processor storage (that is, central and expanded storage) and directs the movement of virtual pages between auxiliary storage and central storage in page-size blocks. You can release virtual storage contents, load virtual storage areas into central storage, make virtual storage pages read-only or modifiable, and page out virtual storage areas from central storage. Reference pattern services allow programs to define a reference pattern for a specified area that the program is about to reference.

Sharing Data in Virtual Storage (IARVSERV Macro) — This topic describes the IARVSERV macro, which provides services that allow programs to share virtual storage in address spaces or data spaces. The topic also includes information for the IARR2V macro, which converts a central storage address to a virtual storage address.

Timing and Communication — The system has an internal clock. Your program can use it to obtain the date and time, or use it as an interval timer. You can set a time interval, test how much time is left in an interval, or cancel it. Communication services let you send a message to the system operator, to a TSO/E terminal, or to the system log.

Translating Messages — The MVS message service (MMS) enables you to display MVS or MVS-based application messages that have been translated from U.S. English into a foreign language. The service also allows application programs to store messages in and retrieve them from the MMS run-time message file.

Using Data Compression and Expansion Services — Data compression and expansion services allow you to compress certain types of data so that the data occupies less space while you are not using it. You can then restore the data to its original state when you need it.

Accessing Unit Control Blocks (UCBs) — Each device in a configuration is represented by a unit control block (UCB). This chapter contains information about scanning UCBs and detecting I/O configuration changes.

The Internal Reader — The internal reader facility is a logical device similar to a card reader, a tape drive, or a TSO/E terminal that allows you to submit jobs to JES. This chapter describes how to set up and use an internal reader, allocating the internal reader data set, opening and closing the internal reader data set, and sending job output to the internal reader.

Using the Symbol Substitution Service — This topic describes types of symbols you can use in application and vendor programs, and describes how to call the ASASYMBM service, which substitutes text for those symbols.

Using System Logger Services — System logger services allow an application to manage log data in a sysplex environment. This topic describes how to plan the system logger configuration, plan and set up a system logger application, and plan for recovery for system logger applications.

Appendixes — The appendix includes the following topics:
Note to reader
Note to reader The information uses the following terms:
End of Note to reader