Datamgmt Book
Datamgmt Book
Note Before using this information and the product it supports, read the information in Notices on page 23.
This edition applies to z/OS (product number 5694-A01). We appreciate your comments about this publication. Comment on specific errors or omissions, accuracy, organization, subject matter, or completeness of this book. The comments you send should pertain to only the information in this manual or product and the way in which the information is presented. For technical questions and information about products and prices, contact your IBM branch office, your IBM business partner, or your 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. IBM or any other organizations will only use the personal information that you supply to contact you about the issues that you state on this form. Send your comments through this Web site: http://publib.boulder.ibm.com/infocenter/zoslnctr/v1r7/index.jsp?topic=/com.ibm.zcontact.doc/webqs.html Copyright International Business Machines Corporation 2005, 2008. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Introduction to data and storage management on z/OS . . . . . . . . . v Chapter 1. The DFSMS software suite . . 1 Chapter 2. Data and storage management policies . . . . . . . . . 5 Chapter 3. DFSMS tools for data and storage management . . . . . . . . . 7
DFSMSdfp access methods . . . . . . . . . 7 Access Method Services (IDCAMS) commands . . . 8 DFSMSdfp callable services . . . . . . . . . 8 Data management utility programs . . . . . . . 9 Guide to z/OS utility program functions . . . . 9 Data set utilities . . . . . . . . . . . . 13 System utilities . . . . . . . . . . . . 19
Notices . . . . . . . . . . . . . . 23
Programming interface information . Trademarks . . . . . . . . . . . . . . . . . . 24 . 25
iii
iv
z/OS Basic Skills Information Center: Data and storage management on z/OS
vi
z/OS Basic Skills Information Center: Data and storage management on z/OS
DFSMSdfp
Storage management DFSMSdfp includes Interactive Storage Management Facility (ISMF), which lets you define and maintain policies to manage your storage resources. These policies help to improve the usage of storage devices and to increase levels of service for user data, with minimal effort required from users. Storage Management Subsystem (SMS) uses these policies to manage storage for the operating system. More specifically, the storage administrator uses SMS to define data classes, storage classes, management classes, storage groups, aggregate groups, copy pools, and automatic class selection routines. You can also use the NaviQuest tool under ISMF to migrate to SMS, maintain your SMS configuration, and perform testing, implementation, and reporting tasks in batch. Tape mount management Tape mount management is a methodology for improving tape usage and reducing tape costs. This methodology involves intercepting selected tape data set allocations through the SMS automatic class selection (ACS) routines and redirecting them to a direct access storage device (DASD) buffer. Once on DASD, you can migrate these data sets to a single tape or small set of tapes, thereby reducing the overhead associated with multiple tape mounts. Data management DFSMSdfp helps you store and catalog information on DASD, optical, and tape devices so that it can be quickly identified and retrieved from the system. DFSMSdfp provides access to both record- and stream-oriented data in the z/OS environment. Device management DFSMSdfp can be used when you define your input and output (I/O) devices to the system and in controlling those devices in the z/OS environment. Distributed data access Distributed data access allows all authorized systems and users in a network to use system-managed storage or automated storage management.DFSMSdfp uses the Distributed FileManager/MVS (DFM) or the z/OS Network File System to enable remote clients in a network to access data and storage resources on z/OS systems.
Copyright IBM Corp. 2005, 2008
z/OS UNIX System Services (z/OS UNIX) provides the command interface that interactive UNIX users can use. z/OS UNIX allows z/OS programs to directly access UNIX data. Advanced copy services Advanced Copy Services includes remote and point-in-time copy functions that provide backup and recovery of data. When used before a disaster occurs, Advanced Copy Services provides rapid backup of critical data with minimal impact to business applications. If a disaster occurs to your data center, Advanced Copy Services provides rapid recovery of critical data. Object access method Object access method (OAM) provides storage, retrieval, and storage hierarchy management for objects. OAM also manages storage and retrieval for tape volumes that are contained in system-managed libraries.
DFSMSdss
Data movement and replication DFSMSdss lets you move or copy data between volumes of like and unlike device types. If you create a backup in DFSMSdss, you can copy a backup copy of data. DFSMSdss also can produce multiple backup copies during a dump operation. Space management DFSMSdss can reduce or eliminate DASD free-space fragmentation. Data backup and recovery DFSMSdss provides you with host system backup and recovery functions at both the data set and volume levels. It also includes a stand-alone restore program that you can run without a host operating system. Data set and volume conversion DFSMSdss can convert your data sets and volumes to system-managed storage. It can also return your data to a non-system-managed state as part of a recovery procedure.
DFSMShsm
Storage management DFSMShsm provides automatic DASD storage management, relieving users from manual storage management tasks. Space management DFSMShsm improves DASD space usage by keeping only active data on fast-access storage devices. It automatically frees space on user volumes by deleting eligible data sets, releasing overallocated space, and moving low-activity data to lower cost-per-byte devices, even if the job did not request tape. Tape mount management DFSMShsm can write multiple output data sets to a single tape, making it a useful tool for implementing tape mount management under SMS. When you redirect tape data set allocations to DASD, DFSMShsm can move those data sets to tape, as a group, during interval migration. This methodology greatly reduces the number of tape mounts on the system. DFSMShsm uses a single-file format, which improves your tape usage and search capabilities.
z/OS Basic Skills Information Center: Data and storage management on z/OS
Availability management DFSMShsm backs up your dataautomatically or by commandto ensure availability if accidental loss of the data sets or physical loss of volumes should occur. DFSMShsm also allows the storage administrator to copy backup and migration tapes, and to specify that copies be made in parallel with the original. You can store the copies on site as protection from media damage, or offsite as protection from site damage. DFSMShsm also provides disaster backup and recovery for user-defined groups of data sets (aggregates) so that you can restore critical applications at the same location or at an offsite location.
DFSMSrmm
Library Management You can create tape libraries, or collections of tape media associated with tape drives, to balance the work of your tape drives and help the operators that use them. Shelf Management DFSMSrmm groups information about removable media by shelves into a central online inventory, and keeps track of the volumes residing on those shelves. DFSMSrmm can manage the shelf space that you define in your removable media library and in your storage locations. Volume management DFSMSrmm manages the movement and retention of tape volumes throughout their life cycle. Data set management DFSMSrmm records information about the data sets on tape volumes. DFSMSrmm uses the data set information to validate volumes and to control the retention and movement of those data sets.
DFSMStvs
DFSMS Transactional VSAM Services (DFSMStvs) allows you to share VSAM data sets across CICS, batch, and object-oriented applications on z/OS or distributed systems. DFSMStvs enables concurrent shared updates of recoverable VSAM data sets by CICS transactions and multiple batch applications. DFSMStvs enables 24-hour availability of CICS and batch applications. DFSMStvs is built on top of VSAM record-level sharing (RLS), which permits sharing of recoverable VSAM data sets at the record level.
z/OS Basic Skills Information Center: Data and storage management on z/OS
z/OS Basic Skills Information Center: Data and storage management on z/OS
Use BPAM to create and retrieve v PDS program and data libraries on DASD. v PDSE BPAM arranges records as members of v z/OS UNIX PDSs, PDSEs, or z/OS UNIX directories. Use BSAM to process data sets sequentially. You organize the records into blocks for retrieval. v v v v v Sequential data sets Extended-format data sets PDS members PDSE members z/OS UNIX files
Object access method (OAM)OSREQ interface Queued sequential access method (QSAM)
Use OAM to store, back up, and retrieve objects on DASD, optical, and tape storage. Use QSAM to process data sets sequentially. QSAM collects the records into blocks.
v Objects
v v v v v v v v v v
Sequential data sets Extended-format data sets PDS members PDSE members z/OS UNIX files Entry-sequenced data sets Key-sequenced data sets Linear data sets Relative record data sets HFS files
Use VSAM for direct or sequential processing of records on DASD. VSAM arranges records by an index key, by relative byte address, or by relative record number. VSAM catalogs data sets for easy retrieval.
DFSMS also supports the basic direct access method (BDAM) for coexistence with previous operating systems. You can use assembler language macro instructions to create, maintain, and process all the data set types supported by the access methods described in Table 1 on page 7. Macro instructions control data set allocation, input and output, and data security. Each compiler provides facilities to create, read, and write data sets. Your compiler documentation describes how to use the access method facilities. The following are a few of the functions that the macro instructions perform: v Control block macros generate information that the access method needs to process the data sets. v Request macros retrieve, update, delete, or insert logical records into data sets. v Checkpoint/restart functions establish checkpoints during a program and restart the job at a checkpoint or at the beginning of a job step.
z/OS Basic Skills Information Center: Data and storage management on z/OS
IGWARLS Obtains information about the record-level sharing attributes for a VSAM data set. IGWASMS Determines if a data set is system-managed, and returns the SMS class names and data set type. IGWASYS Determines the version, release, and modification level of DFSMS and the status of the SMS subsystem. IGWLSHR Determines the DFSMSdfp share attributes currently in use on the system.
to ship them for compatibility with older supported system levels. This guide lists the tasks for which you can use these utilities, and identifies which utility is especially suited to perform each task. You can use the DFSMS utility programs to perform a variety of tasks, as shown in Table 2. The Task column shows tasks that you might want to perform. The Options column more specifically defines the tasks. The Primary Utility column identifies the utility that is especially suited for the task. The Secondary Utilities column identifies other utilities that can be used to perform the task.
Table 2. Tasks and Utility Programs Task Add Options a member to a partitioned data set a password Alter in place Catalog Change a load module a data set in a catalog data set organization logical record length Clear Compare checkpointed members from a PDSE Primary Utility IEBUPDATE, IEBGENER IEHPROGM IEBCOPY IEHPROGM IEBUPDTE IEBGENER IEBCOPY IEBGENER, IEBPTPCH Secondary Utilities IEBDG
z/OS UNIX System Services (z/OS UNIX) files such as IEBCOMPR HFS files partitioned data sets sequential data sets PDSEs IEBCOMPR IEBCOMPR IEBCOMPR IEBCOPY IEBCOPY IEBCOPY
a partitioned data set a partitioned data set an unloaded PDSE containing program objects cannot be loaded into a PDS. An unloaded PDSE containing data objects can be loaded into a PDS but all extended attributes will be lost. sequential data sets a PDSE
IEBUPDTE
Convert to PDSE a partitioned data set an unloaded copy of a partitioned data set or PDSE sequential data sets Convert to sequential data set a partitioned data set or PDSE
IEBUPDTE IEBUPDTE
10
z/OS Basic Skills Information Center: Data and storage management on z/OS
Table 2. Tasks and Utility Programs (continued) Task Copy Options a load module or load module library a partitioned data set a volume of data sets (on tape or disk) job steps selected members of a partitioned data set sequential data sets Primary Utility IEBCOPY IEBCOPY IEHMOVE IEBEDIT IEBCOPY IEBGENER IEHMOVE IEHMOVE, IEBUPDTE, IEBPTPCH IEHMOVE Secondary Utilities
a PDSE a group of PDSE members selected members of a PDSE Create a backup copy of a partitioned data set or PDSE a character arrangement table module a copy modification module a 3800 or 4248 forms control buffer module a graphic character modification module a library character set module a library of partitioned members a member of a partitioned data set or PDSE a sequential output data set an indexed sequential data set an output job stream Delete a data set or member of a partitioned data set password catalog entries records in a partitioned data set or PDSE member Edit and convert a sequential data set to partitioned data set or PDSE Edit and copy a job stream a sequential data set Edit and list Edit and print Edit and punch Enter Exclude error statistics by volume (ESV) records a sequential data set a sequential data set a procedure into a procedure library a partitioned data set member from a copy operation a PDSE member from a copy operation Expand a partitioned data set or PDSE a sequential data set Generate test data
IEBCOPY IEBCOPY IEBCOPY IEBCOPY IEBIMAGE IEBIMAGE IEBIMAGE IEBIMAGE IEBIMAGE IEBGENER IEBGENER IEBDG IEBDG IEBEDIT IEHPROGM IEHPROGM IEHPROGM IEBUPDTE IEBGENER IEBUPDTE IEBUPDTE IEBDG, IEBUPDTE IEBGENER, IEBPTPCH
IEBEDIT IEBGENER IFHSTATR IEBPTPCH IEBPTPCH IEBUPDTE IEBCOPY IEBCOPY IEBCOPY IEBGENER IEBDG
Chapter 3. DFSMS tools for data and storage management
IEBUPDTE, IEBPTPCH
IEBGENER IEBGENER
IEHMOVE
11
Table 2. Tasks and Utility Programs (continued) Task Include Options changes to members or sequential data sets a partitioned data set member from a copy operation a PDSE member from a copy operation Indicate Insert records Label List Primary Utility IEBUPDTE IEBCOPY IEBCOPY IEBPTPCH IEHMOVE Secondary Utilities
double-byte character set string by supplying enclosing IEBGENER shift-out/shift-in characters into a partitioned data set or PDSE magnetic tape volumes a password entry a volume table of contents number of unused directory blocks and tracks partitioned data set or PDSE directories CVOL entries IEBUPDTE IEHINITT IEHPROGM IEHLIST IEHLIST IEHLIST IEHLIST IEBCOPY IEHMOVE IEBCOPY IEBCOPY IEBCOPY IEBCOPY IEBCOPY IEBCOPY IEBUPDTE IEHMOVE IEHMOVE IEHMOVE IEBUPDTE IEHPROGM IEHPROGM IEHPROGM IEHPROGM IEBPTPCH IEBPTPCH IEBPTPCH IEBPTPCH IEBPTPCH
IEBCOPY IEHPROGM
Load
an unloaded partitioned data set to a partitioned data set an unloaded data set an unloaded partitioned data set to a PDSE (for non-load modules only) an unloaded PDSE to a partitioned data set (for non-load modules only) an unloaded PDSE to a PDSE
Merge
IEHMOVE
Modify Move
a partitioned or sequential data set, or a PDSE a volume of data sets partitioned data sets sequential data sets
in a new or old member of a partitioned data set or PDSE add a password delete a password list passwords replace a password
sequential data sets partitioned data sets or PDSEs selected records mixed strings of double-byte and single-byte character set data double-byte character set data
IEBGENER, IEBUPDTE
IEBGENER IEBGENER
12
z/OS Basic Skills Information Center: Data and storage management on z/OS
Table 2. Tasks and Utility Programs (continued) Task Punch Options a partitioned data set member a sequential data set selected records mixed strings of double-byte and single-byte character set data Double-byte character set data Reblock a load module a partitioned data set or PDSE a sequential data set Re-create Rename a partitioned data set or PDSE member of a partitioned data set or PDSE a sequential or partitioned data set, or PDSE moved or copied members of a partitioned data set Renumber Remove Replace logical records indication of a double-byte character set string by stripping off enclosing shift-out/shift-in characters a password logical records records in a member of a partitioned data set or PDSE selected members of a PDSE selected members of a partitioned data set Scratch Uncatalog Unload data sets data sets a partitioned data set a sequential data set a PDSE Update in place a partitioned data set or PDSE Primary Utility IEBPTPCH IEBPTPCH IEBPTPCH IEBPTPCH IEBPTPCH IEBCOPY IEBCOPY IEBGENER IEBCOPY IEBCOPY IEHPROGM IEHMOVE IEBUPDTE IEBGENER IEHPROGM IEBUPDTE IEBUPDTE IEBCOPY IEBCOPY IEHPROGM IEHPROGM IEBCOPY IEHMOVE IEBCOPY IEBUPDTE IEHMOVE IEBUPDTE IEBUPDTE, IEHMOVE IEHPROGM IEBUPDTE IEBGENER IEBGENER Secondary Utilities
13
An access method defines the technique that is used to store and retrieve data. Access methods have their own data set structures to organize data, system-provided programs (or macros) to define data sets, and utility programs to process data sets. VSAM (Virtual Sequential Access Method) is an access method used for more complex applications. VSAM arranges records by an index key, relative record number, or relative byte addressing. Some users pronounce the name of this program as id-cams (two syllables) while others say I-D-cams (three syllables). A typical example of a simple use of IDCAMS is as follows:
//VDFNDEL JOB 1,LINDAJO,MSGCLASS=X //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD * //DATAIN DD DISP=OLD,DSN=LINDA.SORTOUT //SYSIN DD * DEFINE CLUSTER (NAME (LINDA.DATA.VSAM) VOLUMES(WORK02) CYLINDERS(1 1) RECORDSIZE (72 100) KEYS(9 8) INDEXED) REPRO INFILE(DATAIN) OUTDATASET(LINDA.DATA.VSAM) ELIMIT(200) /* //STEP2 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DELETE LINDA.DATA.VSAM CLUSTER /*
This sample job, named VDFNDEL, consists of two steps: One to define a VSAM data set; the other to delete it. The first step, STEP1 performs two functions: 1. Creates a VSAM data set through the DEFINE CLUSTER command. Note that IDCAMS uses dynamic allocation to create the necessary JCL for this new data set, so the sample does not include a DD statement for the new data set. v The DEFINE CLUSTER command is continued over three records; the continuation indicators are hyphens. v The VSAM data set is on volume WORK02, and uses one cylinder for primary space and one cylinder for secondary allocation. The average record size is 72 bytes and the maximum record size is 100 bytes. (VSAM data sets always use variable length records.) The primary key (for accessing records in the data set) is 8 bytes long and begins at an offset of 9 bytes into each record. v Records for loading a VSAM data set this way should already be sorted into key order. v The ELIMIT parameter specifies the number of error records that REPRO will ignore before terminating operation. An error record is usually due to a duplicate key value. 2. Loads the new data set through the REPRO command. The input loaded into the new data set comes from a sequential data set, which is identified through the DATAIN DD statement. The second step, STEP2, deletes the data set that is created STEP1. Many of IDCAMS functions can be entered as TSO commands. For example, DEFINE CLUSTER can be used as a TSO command. However, using IDCAMS in this manner is generally not recommended because these commands can be complex and the errors encountered can be complex. Entering the IDCAMS commands through a batch job allows the commands and resulting messages to be reviewed as often as necessary by using SDSF to view the output.
14
z/OS Basic Skills Information Center: Data and storage management on z/OS
This job will unload WAYNE.LIB.SOURCE (which we assume is a partitioned data set) and write it on tape. (The name TAPE is assumed to be an esoteric name that the local installation associates with tape drives.) By default, IEBCOPY copies from the data set defined by the SYSUT1 DD statement to the data set defined by SYSUT2 DD. For most utilities, SYSUT1 is the name used for the DD statement that defines the input data set, and SYSUT2 for the DD statement that defines the output data set. Notice that the data set name on tape is not the same as the data set name used as input (the same name could be used, but there is no requirement to do so). The following job could be used to restore the PDS on another volume:
//COPYJOB6 JOB 1,WAYNE,MSGCLASS=X // EXEC PGM=IEBCOPY //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD DISP=OLD,UNIT=TAPE,DSN=WAYNES.SOURCE, // VOL=SER=123456 //SYSUT2 DD DISP=(NEW,CATLG),DSN=P390Z.LIB.PGMS,UNIT=3390, // SPACE=(TRK,(10,10,20)),VOL=SER=333333
In this example, IEBCOPY will detect that the input data set is an unloaded partitioned data set, which we determined would fit in about 10 tracks and should have 20 directory blocks. Instead of using the DUMMY parameter on the SYSIN DD statement, you could substitute this JCL:
Chapter 3. DFSMS tools for data and storage management
15
The SELECT statement specifies the member names to be processed, with the OUTDD and INDD parameters specifying the DD names to be used for output and input, respectively. You would have to use this JCL if you used names other than SYSUT1 and SYSUT2 for the input and output DD statements. Restoring a partitioned data set from an unloaded copy automatically compresses (recovers lost space) the data set.
This job creates a new data set, CHRIS.TEST.DATA, with 90,000 records. Each record is 80 bytes, as specified in the DCB parameters in the DD statement. The control statements specify three fields that occupy the first 50 bytes of each record. By default, IEBDG fills the remaining bytes with binary zeros. The three fields are: v An alphabetic field (ABCDEF...), 30 bytes long. It is rippled (rotated left one byte) after each record is generated. v The second field contains 10 bytes with the fixed constant TEST DATA . v The third field contains 10 bytes with random binary data. The utility can generate more complex patterns, but this example is typical of simple usage. It also illustrates an estimate of the amount of disk space needed for data: v A 3390 track holds about 57 K, less whatever space is lost to inter-record gaps. v The data control block (DCB) parameters, which relate to the program that will use the test data, specify: A logical record length (LRECL) of 80 A block size (BLKSIZE) of 8000, and
16
z/OS Basic Skills Information Center: Data and storage management on z/OS
A record format (RECFM) of fixed block (FB) The space requirements (SPACE) for the data set are based on the following assumptions: v Approximately six blocks of 8000 each will probably fit on one track. v Each block contains 100 records of 80 bytes each, and each track contains 600 records. v A cylinder contains 15 tracks, therefore a cylinder will hold 9000 of these records. v Given these assumptions, 10 cylinders are needed to hold 90,000 records. So 10 cylinders is the primary space allocation specified in the JCL, with one cylinder as the secondary allocation increment. The secondary allocation is used only if the primary allocation is not sufficient space.
IEBGENER requires four data definition (DD) statements with the DD names shown in the example: v The SYSIN DD statement is used to read control parameters; for simple uses, no control parameters are needed and a DD DUMMY can be used. v The SYSPRINT statement is for messages from IEBGENER. v The SYSUT1 statement is for input and the SYSUT2 statement is for output. This example reads an existing data set and copies it to a new data set.
17
//SYSIN DD DATA ./ ADD LIST=ALL,NAME=MYJOB1 //STEP1 EXEC=SUZNX1 //PRINT DD SYSOUT=A // (more JCL for MYJOB1) //SYSUDUMP DD SYSOUT=* (last JCL for MYJOB1) ./ REPL LIST=ALL,NAME=LASTJOB //LIST EXEC PGM=SUZNLIST // (more JCL for this procedure) //* LAST JCL STATEMENT FOR LASTJOB ./ ENDUP /*
This example requires a few comments: v When a library is to be updated, then SYSUT1 and SYSUT2 both point to that library. (If they point to different libraries, the SYSUT1 library is copied to the SYSUT2 library and then updated.) v The SYSIN DD DATA format indicates that the data in the input stream contains // (two slashes) in columns one and two. The information in the input stream should not be interpreted as JCL. The end of the input stream is indicated by /*. v The IEBUPDTE utility uses control statements with the symbols ./ (a period and slash) in the first two columns. v A member named MYJOB1 is added to MY.PROCLIB; this member should not already exist in the library. v A member named LASTJOB is replaced with new contents. The IEBUPDTE utility also can add or replace statements in a member based on the sequence numbers in the statements. This capability is one of the few remaining uses for sequence numbers in JCL or source statements. Again, IEBUPDTE is typically used for program distribution and maintenance. For example, if a software vendors product adds 25 JCL procedures to a customers procedure library, the vendor might package the procedures as an IEBUPDTE job. One advantage is that all the material is in source format and the customer can easily review the contents before running the job.
v The z/OS job scheduler to check your JCL statements for syntax errors. v The initiator allocates the new data set defined by NEWDS (SMITH.LIB.CNTL) and keeps the data set when the job ends.
18
z/OS Basic Skills Information Center: Data and storage management on z/OS
v The initiator also deletes an old data set defined by OLDDS (SMITH.OLD.DATA) at the end of the job. The same functions to create one data set and delete another could be done through ISPF, for example, but these actions might be needed as part of a larger sequence of batch jobs. Note: This explanation of the name IEFBR14 might help you remember what this utility does... One IBM group writing early OS/360 code used the prefix IEF for all their code modules. In assembly language, BR means Branch to the address in a register. Branching to the address in general register 14 is the standard way to end a program.
System utilities
System utility programs are used to list or change information that is related to data sets and volumes, such as data set names, catalog entries, and volume labels. Most functions that system utility programs can perform are performed more efficiently with other programs, such as IDCAMS, ISMF, or DFSMSrmm.
19
20
z/OS Basic Skills Information Center: Data and storage management on z/OS
ending; the dump of storage provided as a result of the abnormal ending is a valuable diagnostic tool, because it shows the contents of storage at a predictable point during processing. v Using SPZAP to replace data directly on a direct access device, you can reconstruct VTOCs or data records that may have been destroyed as the result of an I/O error or a programming error. As an example of the first function, modifying a programming error, suppose your company has just purchased a new release of product XXX. The new release may have been sent on tape to hundreds or thousands of customers. After shipping all these tapes the product developers may have discovered a minor bug that could be fixed by changing a few instructions. Instead of creating new distribution tapes and shipping them to all the customers (a massive and expensive undertaking for a major software product), the developers could create an SPZAP solution and mail, fax, or ftp it to their customers. The SPZAP solution might look something like this:
//AMYS15 JOB 1,AMYS,MSGCLASS=X //STEP1 EXEC PGM=AMASPZAP //SYSPRINT DD SYSOUT=* //SYSLIB DD DISP=OLD,DSN=LANDER.LIB.LOAD //SYSIN DD * NAME QSAM1 VERIFY 004E 4780 REP 004E 4700 /*
In the example: v The EXEC statement identifies SPZAP as the program to run, using Superzaps program name (AMASPZAP). v The SYSLIB DD statement points to the data set containing the load module to be modified. v The SYSIN DD statement contains the control statements that tell SPZAP what actions to perform: The NAME control statement identifies the executable module (which is the PDS member name) to be altered. The VERIFY statement says to look at offset x004E in the module and verify that it contains x4780. If the verify is correct then change the module to contain x4700 at this same offset. This action changes a Branch Equal instruction to a No Operation and changes the logic of the program. An SPZAP patch like this is easily constructed when you have an assembly listing of the program and can see the exact offset within the module containing the instruction you want to change. Creating a patch is more difficult without a listing, although it can be accomplished by reading hexadecimal storage dumps and reconstructing machine language operation from the dumps. Note that the format of executable programs on disk is complex and is not a simple image of the program when it is loaded into memory. (Relocation data, external symbols, and an optimized disk loading format form part of the complexity.) SPZAP understands this disk format and allows users to zap an executable program as if it were a memory image.
21
22
z/OS Basic Skills Information Center: Data and storage management on z/OS
Notices
This information was developed for products and services offered in the U.S.A. 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 users 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 grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property Department in your country or send inquiries, in writing, to: IBM World Trade Asia Corporation Licensing 2-31 Roppongi 3-chome, Minato-ku Tokyo 106-0032, Japan 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. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. 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.
23
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. 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 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. The licensed program described in this document 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. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrate programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. If you are viewing this information softcopy, the photographs and color illustrations may not appear.
24
z/OS Basic Skills Information Center: Data and storage management on z/OS
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at http://www.ibm.com/legal/ copytrade.shtml UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, or service names may be trademarks or service marks of others.
Notices
25
26
z/OS Basic Skills Information Center: Data and storage management on z/OS
Printed in USA