Iesvge 70
Iesvge 70
SC34-2742-00
IBM z/VSE
VSE Central Functions
SC34-2742-00
Note !
Before using this information and the product it supports, be sure to read the general information under “Notices” on page
xiii.
This edition applies to Version 9 Release 2 of IBM VSE/VSAM, which is part of VSE Central Functions, Program
Number 5686-CF9, and to all subsequent releases and modifications until otherwise indicated in new editions.
This edition replaces SC33–8316–02.
Order publications through your IBM representative or the IBM branch office serving your locality. Publications are
not stocked at the addresses given below.
A form for readers' comments is provided at the back of this publication. If the form has been removed, address
your comments to:
IBM Deutschland Research & Development GmbH
Department 3282
Schoenaicher Strasse 220
D-71032 Boeblingen
Federal Republic of Germany
You may also send your comments by FAX or via the Internet:
Internet: [email protected]
FAX (Germany): 07031-16-3456
FAX (other countries): (+49)+7031-16-3456
When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
© Copyright IBM Corporation 1979, 2014.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . . ix Chapter 3. Operation and Job Control 23
IPL Command Specifications for VSE/VSAM . . . 23
Tables . . . . . . . . . . . . . . . xi Assigning a Device to the Master Catalog . . . 23
Defining the Lock File . . . . . . . . . . 23
Specifying the Number of Supervisor Buffers for
Notices . . . . . . . . . . . . . . xiii
Channel Programs . . . . . . . . . . . 24
Trademarks . . . . . . . . . . . . . . xiii
Volume Mounting . . . . . . . . . . . . 24
Accessibility . . . . . . . . . . . . . . xiv
Mounting a Volume Through Job Control
Using Assistive Technologies . . . . . . . xiv
Specifications . . . . . . . . . . . . . 24
Documentation Format . . . . . . . . . xiv
Mounting a Volume Through Automatic
Assignment . . . . . . . . . . . . . 24
About This Publication . . . . . . . . xv Use of z/VSE Job Control Statements for
Who Should Use This Publication . . . . . . . xv VSE/VSAM . . . . . . . . . . . . . . 25
How to Use This Publication . . . . . . . . xv Job Control Statements for Catalogs . . . . . 25
Where to Find More Information . . . . . . . xvi Job Control Statements for Files . . . . . . 27
// DLBL Statement. . . . . . . . . . . . 28
Abbreviations . . . . . . . . . . . xvii Format of the DLBL Statement . . . . . . . 29
File Disposition . . . . . . . . . . . . 32
Summary of Changes . . . . . . . . xxi // EXEC Statement. . . . . . . . . . . . 38
Note to Users of the VSE/VSAM Space
Management for SAM Function . . . . . . 38
Chapter 1. Introduction to IBM Format of the EXEC Statement . . . . . . . 39
VSE/VSAM . . . . . . . . . . . . . 1 // EXTENT Statement. . . . . . . . . . . 41
Overview . . . . . . . . . . . . . . . 1 Format of the EXTENT Statement . . . . . . 41
Advantages. . . . . . . . . . . . . . 1 Using Job Control for Catalog Definition . . . . 42
Functions of IBM VSE/VSAM . . . . . . . 2 Overview of Catalogs . . . . . . . . . . 42
Concepts of Data Organization . . . . . . . . 4 Specifying the Master Catalog . . . . . . . 43
File Types . . . . . . . . . . . . . . 4 Specifying a User Catalog . . . . . . . . 44
Elements of Organization . . . . . . . . . 5 Specifying a Job Catalog . . . . . . . . . 44
Catalogs with VSE/VSAM . . . . . . . . . 7 Search Sequence of Catalogs . . . . . . . . 46
Indexes with VSE/VSAM . . . . . . . . . 8
How to Communicate with VSE/VSAM . . . . . 9 Chapter 4. Tasks under VSE/VSAM. . . 47
IDCAMS Commands . . . . . . . . . . 9
Data and Space Management . . . . . . . . 47
VSE/VSAM Macros . . . . . . . . . . 11
About the VSE/VSAM Catalog . . . . . . . 47
Job Control Parameters to Access VSE/VSAM
Defining VSE/VSAM Data Spaces on a Volume 48
Files . . . . . . . . . . . . . . . . 12
Defining VSE/VSAM Files . . . . . . . . 48
z/VSE Interactive Interface . . . . . . . . 12
About Volumes and VTOCs . . . . . . . . 48
Work Files on Virtual Disk . . . . . . . . . 51
Chapter 2. Planning Information . . . . 15 Transporting Files between Systems . . . . . . 52
Compatibility with IBM VSE/VSAM Version 2 . . 15 Catalog and File Migration . . . . . . . . . 53
Overview of Environment and Requirements . . . 15 Definitions for Catalog Migration . . . . . . 54
What to Consider . . . . . . . . . . . . 15 Migrating Catalogs . . . . . . . . . . . 55
Partition Space for Non-SVA-Eligible Routines. . 16 Migrating VSE/VSAM Files to Another Device 56
Device Dependencies . . . . . . . . . . 16 NonVSAM Migration . . . . . . . . . . 57
Storage for VSE/VSAM . . . . . . . . . . 16 Space Allocation through Modeling . . . . . 57
Space for Running in Virtual Mode . . . . . 16 Using an Object as a Model . . . . . . . . . 58
Space for Running in Real Mode . . . . . . 16 About the MODEL Subparameter . . . . . . 58
Partition Requirement for Buffers and Control Explicit Allocation Models . . . . . . . . 59
Blocks . . . . . . . . . . . . . . . 16 Explicit Noallocation Models . . . . . . . 61
Storage for the VSE/VSAM Space Management for Implicit NOALLOCATION Models (Default
SAM Function . . . . . . . . . . . . . 19 Models) . . . . . . . . . . . . . . 61
Storage for the ISAM Interface Program (IIP) . . . 20 How VSE/VSAM Determines Which Parameters
Storage for IDCAMS Including the VSE/VSAM to Use . . . . . . . . . . . . . . . 62
Backup/Restore Function . . . . . . . . . . 20 Restrictions . . . . . . . . . . . . . 63
VSE/VSAM Backup/Restore Function . . . . 21 Default Volumes . . . . . . . . . . . . 66
Contents v
Attributes of an Open File . . . . . . . . 269 WRTBFR Macro Operands . . . . . . . . 332
Structure of the ATRB . . . . . . . . . 273 Parameter Lists for VSE/VSAM Macros . . . . 333
Examples: The SHOWCB Macro . . . . . . 274 The GENCB Parameter List. . . . . . . . 334
Example: Statistics on Use of LSR Buffer Pools 275 The MODCB Parameter List . . . . . . . 336
LSR Matrix . . . . . . . . . . . . . 276 The SHOWCB Parameter List . . . . . . . 338
Extent Matrix . . . . . . . . . . . . 279 The TESTCB Parameter List . . . . . . . 339
Example of an LSR Matrix Call . . . . . . 283 The BLDVRP Parameter List . . . . . . . 342
Example of an Extent Matrix Call . . . . . 285 The SHOWCAT Parameter List . . . . . . 343
The TCLOSE Macro . . . . . . . . . . . 286
The TESTCB Macro . . . . . . . . . . . 286 Appendix B. Invoking IDCAMS from a
Format of the TESTCB Macro . . . . . . . 287 Program . . . . . . . . . . . . . 345
Operands of the ACB, EXLST, and RPL Macros 288
Invoking Macro Instructions . . . . . . . . 345
Length of a Control Block or List . . . . . . 289
User I/O Routines. . . . . . . . . . . 347
Attributes of an Open File or Index . . . . . 289
The WRTBFR Macro . . . . . . . . . . . 291
Managing I/O Buffers . . . . . . . . . 291 Appendix C. Advantages of the ISAM
Deferring Write Requests . . . . . . . . 291 Interface Program (IIP) . . . . . . . 351
Relating Deferred Requests by Transaction ID 292 Comparison of VSE/VSAM and ISAM . . . . . 351
Writing Buffers Whose Writing Has Been Differences Between ISAM and VSE/VSAM . . 351
Deferred . . . . . . . . . . . . . . 292 VSE/VSAM Functions That Go Beyond ISAM 352
Format of the WRTBFR Macro. . . . . . . 293 Preparations and Using the ISAM Interface
Examples: ACB, EXLST, and RPL Macros . . . . 294 Program . . . . . . . . . . . . . . . 354
Specifying VSE/VSAM Control Blocks . . . . 294 Step 1: Consider Restrictions in the Use of IIP
JCL to Open and Process a File . . . . . . 296 and VSE/VSAM . . . . . . . . . . . 354
Examples of Request Macros . . . . . . . . 297 Step 2: Define a VSE/VSAM File . . . . . . 355
How to Retrieve a Record: GET Macro . . . . 298 Step 3: Load the VSE/VSAM File. . . . . . 356
How to Position for Subsequent Sequential Step 4: Changing ISAM Job Control Statements 356
Access: GET and POINT Macros . . . . . . 304 What the ISAM Interface Program Does . . . . 357
How to Chain Request Parameter Lists and
Terminate a Request: ENDREQ Macro . . . . 306 Appendix D. Compatibility With Other
How to Store a Record: PUT Macro . . . . . 309 Products . . . . . . . . . . . . . 359
How to Update a Record: GET and PUT Macros 313 Portability of VSE/VSAM Files to DFSMSdfp
How to Delete a Record: GET and ERASE VSAM . . . . . . . . . . . . . . . . 359
Macros . . . . . . . . . . . . . . 317 Compatibility of VSE/VSAM with DFSMSdfp
How to Use Extended User Buffering: GET and VSAM . . . . . . . . . . . . . . . . 361
PUT Macros . . . . . . . . . . . . . 319 Similarities between VSE/VSAM and ACF/VTAM 361
Current User Buffering Support . . . . . . 319
Extended User Buffering Support. . . . . . 319
Using Extended User Buffering . . . . . . 320
Appendix E. VSE/VSAM Labels . . . . 363
Return Codes of Request Macros . . . . . . . 320 Types of VSE/VSAM Labels . . . . . . . . 363
Return Codes from the Control Block Manipulation Location of Labels . . . . . . . . . . . . 364
Macros . . . . . . . . . . . . . . . 322 Volume Layouts . . . . . . . . . . . 364
List, Execute, and Generate Forms of the Control Label Information Area . . . . . . . . . 365
Block Manipulation Macros. . . . . . . . . 322 VTOC Label Processing . . . . . . . . . . 365
List and Execute Forms . . . . . . . . . 323 VSE/VSAM Data Spaces . . . . . . . . 366
Generate Form . . . . . . . . . . . . 323 VSE/VSAM Files . . . . . . . . . . . 366
Examples of the List, Execute, and Generate VTOC Labels for FBA Devices . . . . . . . 367
Forms . . . . . . . . . . . . . . . 323 VSE/VSAM Data Space . . . . . . . . . 367
VSE/VSAM Files . . . . . . . . . . . 369
Job Stream Examples . . . . . . . . . . . 371
Appendix A. Operand Notation and Example - Define Data Spaces . . . . . . . 371
Parameter Lists for VSE/VSAM Example - Define a File in a Catalog. . . . . 373
Macros . . . . . . . . . . . . . . 325 Example - Define a Unique File . . . . . . 373
Operand Notation for VSE/VSAM Macros . . . 325 Example - Process a File . . . . . . . . . 373
GENCB Macro Operands . . . . . . . . 326
MODCB Macro Operands . . . . . . . . 328 Appendix F. Diagnosis Tools . . . . . 375
SHOWCB Macro Operands . . . . . . . . 329 Catalog Check Service Aid (IKQVCHK) . . . . 375
TESTCB Macro Operands . . . . . . . . 329 In Case of Errors . . . . . . . . . . . 376
BLDVRP Macro Operands . . . . . . . . 332 How to Run a Check . . . . . . . . . . 376
DLVRP Macro Operands . . . . . . . . 332 Examples of Error Messages . . . . . . . 376
SHOWCAT Macro Operands . . . . . . . 332 Output of a Check. . . . . . . . . . . 378
Contents vii
viii VSE/VSAM V9R2 User’s Guide and Application Programming
Figures
1. KSDS File Format: Records Stored in Key Field 33. Request Macro Example 6: Keyed Positioning
Sequence . . . . . . . . . . . . . . 5 with POINT . . . . . . . . . . . . 304
2. VRDS File Format: Variable-Length Records 34. Request Macro Example 7: Switching from
Stored by Record Number . . . . . . . . 5 Direct to Keyed-Sequential . . . . . . . 305
3. VSE/VSAM File Type Structures . . . . . . 6 35. Request Macro Example 8: Chaining Request
4. Example: Two Alternate Indexes for a Parameter Lists . . . . . . . . . . . 307
Key-Sequenced File . . . . . . . . . . 8 36. Request Macro Example 9: Giving up
5. Relationship of Catalogs and Files . . . . . 42 Positioning for Other Request . . . . . . 308
6. Explicit Allocation Model . . . . . . . . 59 37. Request Macro Example 10: Keyed-Sequential
7. Specifying the MODEL Parameter at the Insertion . . . . . . . . . . . . . 309
CLUSTER Level Only . . . . . . . . . 60 38. Request Macro Example 11: Skip-Sequential
8. Explicit NOALLOCATION Model . . . . . 61 Insertion . . . . . . . . . . . . . 311
9. Implicit NOALLOCATION Models. . . . . 62 39. Request Macro Example 12: Keyed-Direct
10. The Four Compression States of a Compressed Insertion . . . . . . . . . . . . . 312
Cluster . . . . . . . . . . . . . . 69 40. Request Macro Example 13:
11. Sample IKQCPRED Output . . . . . . . 74 Addressed-Sequential Addition . . . . . 313
12. Classification of Data Space . . . . . . . 86 41. Request Macro Example 14: Keyed-Sequential
13. How VSE/VSAM Computes Physical Block Update. . . . . . . . . . . . . . 314
Size . . . . . . . . . . . . . . . 92 42. Request Macro Example 15: Keyed-Direct
14. Migration from SAM Control to VSE/VSAM Update. . . . . . . . . . . . . . 315
Control . . . . . . . . . . . . . 160 43. Request Macro Example 16:
15. Example of CA Format Using a VSE/VSAM Addressed-Sequential Update . . . . . . 316
Entry-Sequenced File . . . . . . . . . 184 44. Request Macro Example 17: Keyed-Direct
16. Example of Non-CA Format Using a SAM Deletion . . . . . . . . . . . . . 317
ESDS File . . . . . . . . . . . . . 185 45. Request Macro Example 18:
17. Comparison of a VSE/VSAM Block to a SAM Addressed-Sequential Deletion . . . . . . 318
Logical Block . . . . . . . . . . . 186 46. Examples of the List and Execute Form 324
18. Relationship of Catalog Entries . . . . . 202 47. Example of the Generate Form . . . . . . 324
19. GENCB Macro Examples . . . . . . . 238 48. Processor Invocation Argument List from a
20. MODCB Macro Examples . . . . . . . 242 Program . . . . . . . . . . . . . 346
21. Example of an RPL Chain Built by Specifying 49. Arguments Passed to and from a User I/O
the NXTRPL Operand. . . . . . . . . 249 Routine . . . . . . . . . . . . . 348
22. SHOWCB Macro Example . . . . . . . 275 50. Using the ISAM Interface Program . . . . 357
23. Example of a SHOWCB Call . . . . . . 275 51. Volume Layouts of VSE/VSAM Files 365
24. SHOWCB Macro Example . . . . . . . 276 52. Examples: Defining VSE/VSAM Data Spaces 372
25. TESTCB Macro Examples . . . . . . . 291 53. Example: Defining a VSE/VSAM File
26. Example of Specifying Control Blocks for a Suballocated from a Data Space . . . . . 373
File . . . . . . . . . . . . . . . 295 54. Example: Defining a Unique VSE/VSAM File
27. Example of JCL Needed to Open and Process (File-ID MSTRFILE) . . . . . . . . . 373
a File . . . . . . . . . . . . . . 297 55. Example: Processing a VSE/VSAM File with
28. Request Macro Example 1: Keyed-Sequential an Assembler Program . . . . . . . . 374
Retrieval . . . . . . . . . . . . . 298 56. Example: Key-Range Names not Matching 377
29. Request Macro Example 2: Skip-Sequential 57. Example: Incorrect Association Group
Retrieval . . . . . . . . . . . . . 299 Occurrence . . . . . . . . . . . . 378
30. Request Macro Example 3: 58. Example: Output from the Catalog Check
Addressed-Sequential Retrieval . . . . . 301 Service Aid (IKQVCHK) . . . . . . . . 379
31. Request Macro Example 4: Keyed-Direct 59. Example: SNAP Trace Output . . . . . . 385
Retrieval . . . . . . . . . . . . . 302 60. Display of IKQVDU Functions . . . . . . 387
32. Request Macro Example 5: Addressed-Direct
Retrieval . . . . . . . . . . . . . 303
IBM may have patents or pending patent applications covering subject matter 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 the IBM Director of
Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785, U.S.A.
Any pointers in this publication to non-IBM websites are provided for convenience
only and do not in any manner serve as an endorsement. IBM accepts no
responsibility for the content or use of non-IBM websites specifically mentioned in
this publication or accessed through an IBM website that is mentioned in this
publication.
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 Deutschland GmbH
Dept. M358
IBM-Allee 1
71139 Ehningen
Germany
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of
International Business Machines Corp., registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the web at "Copyright and
trademark information" at www.ibm.com/legal/copytrade.shtml.
Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered
trademarks or trademarks of Adobe Systems Incorporated in the United States,
and/or other countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Oracle and/or its affiliates.
Accessibility
Accessibility features help a user who has a physical disability, such as restricted
mobility or limited vision, to use software products successfully. The major
accessibility features in z/VSE enable users to:
v Use assistive technologies such as screen readers and screen magnifier software
v Operate specific or equivalent features using only the keyboard
v Customize display attributes such as color, contrast, and font size
Documentation Format
The publications for this product are in Adobe Portable Document Format (PDF)
and should be compliant with accessibility standards. If you experience difficulties
when you use the PDF files and want to request a web-based format for a
publication, you can either write an email to [email protected], or use the Reader
Comment Form in the back of this publication or direct your mail to the following
address:
IBM Deutschland Research & Development GmbH
Department 3282
Schoenaicher Strasse 220
D-71032 Boeblingen
Federal Republic of Germany
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.
VSAM for VM
http://www.ibm.com/systems/z/os/zvse/
You can also find VSE User Examples (in zipped format) at
http://www.ibm.com/systems/z/os/zvse/downloads/samples.html
Abbreviations xix
xx VSE/VSAM V9R2 User’s Guide and Application Programming
Summary of Changes
This publication has been updated to reflect enhancements and changes that are
implemented with VSE/VSAM 9.2. It also includes terminology, maintenance, and
editorial changes.
v Support of the CISIZE parameter of DLBL statement was added for VSE/VSAM
Implicit Cluster Definitions. Refer to “Format of the DLBL Statement” on page
29.
v Starting with z/VSE V5.1, the SHOWCB macro also provides the following
information:
– LSR (Local Shared Resources) matrix which contains string statistics
information, information about each buffer pool defined for the specified LSR
pool, and LSR string and buffer statistics for each cluster within a specified
share pool.
– Extent matrix which contains characteristics of physical devices where the
specified cluster and information about all extents for the specified cluster
resides.
Nine new keywords for the FIELDS parameter were added. For more details,
refer to “The SHOWCB Macro” on page 266.
v Resource Access Control Facility interface for IDCAMS commands has been
implemented to integrate VSAM into the overall z/VSE BSM concept. Access
control on the level of IDCAMS has been added. Refer to “IDCAMS Commands
Security” on page 128.
For a complete overview of the functions that are new with z/VSE 5.2, refer to the
z/VSE Release Guide, SC34-2636.
Overview
IBM VSE/VSAM is an access method for the indexed or sequential processing of
records on direct access devices. Records can be of fixed-length or variable-length.
Note: If you presently have SAM or ISAM files, you can convert such files to the
VSE/VSAM format.
Advantages
Central Control
You can centrally control all the VSE/VSAM files at your installation, because all
information about files and their storage space is collected in VSE/VSAM catalogs.
In the catalogs, you can define and delete files, and you can change information
about the files.
You can control the access to data by assigning passwords to various objects (for
example, to files and catalogs).
Also, you can protect your data from accidental loss or destruction by using the
VSE/VSAM Backup/Restore Function. This function allows you to easily store data on
tape or disk and call it back.
Device Independence
You simply set aside an area of space to be used exclusively by VSE/VSAM. From
this space, VSE/VSAM selects whatever space is needed for a file when it is
defined. Space allocation is dynamic; if a file or catalog must be extended,
VSE/VSAM allocates more space to it.
VSE/VSAM uses a record format that is common to the IBM operating systems
z/VSE and z/OS® 1. Therefore, but with some exceptions, VSE/VSAM files are
portable to MVS/VSAM. You can get full portability for files and volumes by
using only those commands, file types, devices, and programming interfaces that
are supported by all environments (z/VSE and z/OS). For information on
portability requirements, refer to Appendix D, “Compatibility With Other
Products,” on page 359.
To move files between different operating systems, you can use the
EXPORT/IMPORT commands of the IDCAMS utility program. Communication with
VSE/VSAM is essentially the same for the z/VSE and z/OS operating systems,
except for job control.
1. The principal component of z/OS is MVS; references to MVS in this publication should be understood as meaning the MVS
element of the z/OS operating system.
Use the function to convert a SAM file into a SAM ESDS file by placing the SAM
ESDS file into VSE/VSAM space. Then, the SAM ESDS files can be accessed by
SAM macros as well as by VSE/VSAM macros.
The VSE/VSAM Space Management for SAM Function allows you to:
v Define and delete a SAM ESDS file in VSE/VSAM space. Use IDCAMS
commands, or define/delete implicitly at OPEN/CLOSE time.
v Access a SAM ESDS file.
For files in CI-format, use DTFSD and DTFCP with DISK=YES.
For files that are either in CI-format or non-CI-format, use DTFPH for disk with
MOUNTED=SINGLE.
SAM access is provided for all CKD and FBA devices that are supported by
VSE/VSAM.
v Allocate dynamic secondary space during creation or extension of a SAM ESDS
file.
v Access a SAM ESDS file through the VSE/VSAM macro ACB (that is, native
VSE/VSAM) for files in CI-format.
An existing VSE/VSAM program that processes a VSE/VSAM ESDS file can
access a SAM ESDS without change (except for extending the file).
Note: You cannot process magnetic tape files that were created by the EXPORT
command with RESTORE, or magnetic tape files that were created by BACKUP
with the IMPORT command. REPRO files can only be processed by using REPRO.
File Types
IBM VSE/VSAM supports four types of physical file organization:
v ESDS (Entry-sequenced data set)
v KSDS (Key-sequenced data set)
v RRDS (Relative-record data set)
v VRDS (Variable-length relative-record data set)
These files differ in the record lengths they allow and in the sequence in which
they contain the records:
Formats of Files
The following figures show the file organization (or file format) for the different
file types:
Table 1. ESDS File Format: Records Stored as Received
First Record Second Record Third Record Forth Record Fifth Record ...
Table 2. RRDS File Format: Fixed-Length Records Stored by Record Number. RRDS
records are entered in one of two ways: Either you give the records a sequence number
explicitly, or you just enter them one by one and they get their sequence number
automatically.
Relative Relative Relative Relative
Record 1 Record 3 Record 4 Record 6
Elements of Organization
Data Space
For the data that you want to include in VSE/VSAM files, you have to define
VSE/VSAM data space. You define the space on a disk volume for exclusive use by
VSE/VSAM. From this space, VSE/VSAM selects whatever room (control area) is
needed for a file when it is defined. VSE/VSAM allocates space dynamically; that
is, if a file or a catalog must be extended, VSE/VSAM allocates the space as
required.
The VSE/VSAM data space you define is owned by a catalog. You establish the
ownership when defining a catalog or data space.
VSE/VSAM determines the CA-size for a file, but you can influence it through the
space allocation parameters of the IDCAMS command DEFINE CLUSTER.
Control intervals (CIs) are fixed-length parts of a CA. They are the unit of transfer
between processor and external storage. You specify a CI-size for the file in the
IDCAMS command DEFINE CLUSTER; however, if your specification is
inappropriate, VSE/VSAM determines the correct CI-size.
Spanned Records
Clusters
Every type of VSE/VSAM file has a cluster name and a data component name; the
cluster name must be different from the data component name.
VSE/VSAM Cluster
For a given environment, you have a master catalog, and you can have one or more
user catalogs. VSE/VSAM creates such catalogs from the information you provide
through IDCAMS commands.
Space Management
When you define a VSE/VSAM data space on a volume, you set up a relationship
between that data space and a catalog. The data space is owned by the catalog.
You can define other data spaces on that same or a different volume in the same
catalog.
Thus, a catalog describes where and how much data space is available, the number
and device characteristics of the volume, and other values. Whenever data space is
allocated to a file, VSE/VSAM automatically updates the data space information in
the catalog.
File Management
For each of your VSE/VSAM files, an entry must exist in a catalog. Making an
entry in a catalog for a file is called “defining the file”. Unless you have defined
the file, you cannot, for example, load records into the file.
The entry in the catalog describes the location and attributes (for example, record
size and key location) of the file.
Also kept in the catalog are dynamic statistics about the file (such as the number of
records inserted since the file was created), and the number of CIs that have been
split. This information provides you with the information you need in making a
decision to reorganize your files, or for changing the current type of processing so
as to improve performance.
As mentioned above, VSE/VSAM allows you to define several catalogs. This can
have significant advantages for performance as well as for data security. Every
catalog exists on a single volume; it is independent of other catalogs and controls
exclusively its own data spaces and files.
In an environment with several catalogs, one of the catalogs is the master catalog.
All other catalogs are user catalogs and are defined in the master catalog. By placing
information about your files and storage volumes into user catalogs, you
decentralize control and reduce the time required to search a given catalog. Note
that you can have only one user catalog per volume.
v Specify that one of the user catalogs is to be used as a job catalog. The job
catalog will then be used to reference all VSE/VSAM files in the current job. You
have the option of overriding the job catalog reference to a file through a
VSE/VSAM job control statement.
For KSDS and ESDS files, you optionally can specify that VSE/VSAM builds an
alternate index (AIX).
An alternate index provides you with another way of gaining access to the records
in a given KSDS or ESDS file. It eliminates the need for you to keep several copies
of the same information organized in different ways for different applications. For
example, you can take a KSDS payroll file that is indexed by employee name, and
using the same base data, index it according to department number or social
security number ( Figure 4). You can use any field in the records of the file as an
alternate-index key field, as long as the field has a fixed length and fixed position
in the record.
To gain access from an alternate index to the file with its prime index (base
cluster), you must define a path to it. The path sets up an association between the
alternate index and the base cluster ( Figure 4). The two alternate indexes shown
make the records of the base cluster available to you in different orders.
Base Cluster
Alternate Path 1 Path 2 Alternate
Index 1 Index 2
Indexed by Indexed by Indexed by
Department Employee Name Social Security
Number Number
Adams 3247 183...
3235 Newton Newton 3235 299... 015... Wright
3240 Wright Wright 3240 015... 183... Adams
3247 Adams . 299... Newton
. . .
. . .
. .
IDCAMS Commands
The IDCAMS utility program is part of IBM VSE/VSAM. Use IDCAMS commands
to define VSE/VSAM files, catalog such files, and request many other IDCAMS
functions:
v Establish catalog(s)
v Create data spaces
v Create VSE/VSAM files and load records into the files
v Build an alternate index for a file
v Create backup copies of files and their associated catalog entries
v Print, copy, or reorganize files
v Delete files, data spaces, and catalogs
v Alter file definitions and file attributes
v Print catalog entries
v Move catalogs and files from one system to another
v Convert nonVSAM files to VSE/VSAM files
v Map a VSE/VSAM cluster to a relational structure, and later maintain the
associated map or view
v Recover from damage to files or catalogs
v Copy entire volumes to support offline backup to tape from the target volume,
for example
v Verify command syntax
v Merge two VSE/VSAM files
For details on the IDCAMS utility program and its commands, refer to the
VSE/VSAM Commands, SC33-8315.
Functional Commands
The functional IDCAMS commands can be grouped according to the following
user tasks.
To Move Data
REPRO
to copy, convert, merge, and reorganize files.
EXPORT
to create a copy of a file on tape or disk for back up, or transport to
another system.
IMPORT
to read a copy of a file into a system, and make it available for use in that
system.
BACKUP
to create a backup copy of a file.
RECMAP
to map a VSE/VSAM cluster to a relational structure and later maintain
the associated map or view. For details on the RECMAP command, refer to
VSE/VSAM Commands, SC33-8315.
RESTORE
to restore a file backed up via the BACKUP command.
SNAP to snap (copy) a given set of source volumes within an IBM Enterprise
Storage Server (ESS).
To Print Objects
LISTCAT
to list entries from a catalog, or only certain information from every entry.
PRINT
to print all, or a specified range of records of a file. Several output formats
are available: every byte printed as a single character, or every byte printed
as two hexadecimal digits, or both side by side.
Modal Commands
The modal IDCAMS commands control command execution and establish options.
IF to test a condition code and run according to the results of the test. IF is
followed by THEN and ELSE clauses which specify alternative actions.
DO, END
to denote the beginning and end of a functional command sequence
(normally within a THEN or ELSE clause).
SET to change condition codes.
PARM to specify diagnostic aids and printed output options and change input
record margins. With PARM, you can verify the syntax of your IDCAMS
commands before running them.
VSE/VSAM Macros
Once you have defined your VSE/VSAM files with IDCAMS commands, you can
load data into the files and process the records. Use VSE/VSAM macros in your
programs to process VSE/VSAM files.
You can load the data by use of any programming language. The programs can use
VSE/VSAM, SAM, or ISAM macros, but only the assembler language supports all
VSE/VSAM functions.
For details on the macros, refer to Chapter 11, “Using VSE/VSAM Macros,” on
page 195 and Chapter 12, “Descriptions of VSE/VSAM Macros,” on page 207.
To Display Data
SHOWCAT
displays data from the catalog in a buffer you have supplied.
CLOSE
prepares the separation and disconnects a program from a file.
TCLOSE
prepares the separation but leaves program and file connected.
To Handle Records
GET retrieves a record from a file for processing.
PUT inserts a record in a file.
ERASE
deletes a record in a file.
POINT
positions control to a specific address in the file.
ENDREQ
ends processing of a GET or POINT request.
As most of the information normally coded with job control statements is available
to VSE/VSAM in the catalog, you need to specify only a minimum of job control
parameters with any one job. In most cases, only the DLBL statement has to carry
VSE/VSAM information.
To use the interface, start with the panel entitled z/VSE Function Selection. On this
panel select:
v Resource Definition if you want to manage files or catalogs.
v Operations if you want to back up or restore VSE/VSAM objects, or transfer files.
If you select Resource Definition and then File and Catalog Management, you can
make further selections to:
v Display or process a file
v Define a new file
v Define a library
v Define an alternate index (AIX) or name
v Display or process a catalog, or space
For example, if you select to define a new file, you can specify elements such as
the file ID and name, file organization (for example SAM ESDS organization), and
space allocation. You can then select how the job is to be run.
If you select Operations and then Backup/Restore VSE/VSAM Objects, you can make
further selections to export, import, back up, or restore VSE/VSAM files, and back
up or restore master and user catalogs.
What to Consider
Before IBM VSE/VSAM is used, you should plan for the storage needs of
VSE/VSAM. Consider storage requirements for:
v IBM VSE/VSAM routines loaded automatically into the SVA during IPL. The
routines occupy about 300KB in the SVA (shared virtual area).
v Routines that are not eligible for the SVA.
See “Partition Space for Non-SVA-Eligible Routines” on page 16, below. For
information on the ISAM Interface Program, see “Storage for the ISAM Interface
Program (IIP)” on page 20.
v Running VSE/VSAM in real mode.
See “Space for Running in Real Mode” on page 16.
v VSE/VSAM buffers and control blocks.
See “Partition Requirement for Buffers and Control Blocks” on page 16.
v The IDCAMS utility program.
See “Storage for IDCAMS Including the VSE/VSAM Backup/Restore Function”
on page 20.
The partition where the non-SVA-eligible VSE/VSAM routines are loaded must
have at least 128KB plus the partition GETVIS area. Add to this 28KB for the
IDCAMS root modules, plus the extra space for every IDCAMS command, which
varies between 2KB and 100KB depending on the command.
Device Dependencies
See Chapter 6, “Device Dependencies,” on page 77 for information on special
functions, restrictions, and exceptions when using certain devices.
Running programs in real mode in one partition can degrade the performance in
other partitions. For more information, refer to “Format of the EXEC Statement” on
page 39 (see REAL).
The size of the partition GETVIS area depends on the number of VSE/VSAM files
that are accessed, and on their CI sizes. The minimum requirement is 64KB.
For your files, you need to calculate the total required partition virtual storage. You
have to consider that:
v Every open catalog needs 14KB for basic buffers and control blocks.
v During open and close processing, an additional 50KB is required for open
control blocks and catalog check routines that are used in error analysis.
v Every file needs the partition virtual storage shown in:
Table 3 on page 17 if non-shared resources (NSR) is specified.
Table 4 on page 18 if local shared resources (LSR) is specified.
The following applies to both Table 3 on page 17 and Table 4 on page 18:
v To calculate the requirements for one file, add the values given in one column
(according to the applicable path/input/output conditions). Complete this
calculation for every file; then, add the individual results to obtain the total
requirements.
v The buffer space (n in the figures) depends on the CI size(s) and on the buffer
specifications. If upgrade is done, one set of buffers serves all alternate indexes
in the upgrade set. This set of buffers includes two data buffers and one index
buffer. (Buffer space can be specified in the IDCAMS command DEFINE, in the
DLBL statement, or in the VSE/VSAM macro ACB. For more information, see
“Buffer Specification” on page 97.)
v If data set name sharing is used, only the first cluster of a DSN structure uses the
partition GETVIS space as calculated in Table 3 or Table 4 on page 18.
All the subsequent opens to ACBs (for those clusters that are connected to the
existing DSN structure) need a minimum GETVIS space of 128 bytes per 28
ACBs.
If NSR is Specified
Table 3. Partition Requirements for Control Blocks and Buffers (with NSR)
No Path Specified Path Specified
Item Input Output Input Output*
Basic requirement 7KB 7KB 9KB 9KB
(minimum)
Upgrade set (minimum) 0 (u+1) x 2KB 0 u x 2KB
Buffers for base cluster n n n n
Buffers for alternate index 0 0 n** n**
Upgrade buffers*** 0 n 0 n
For every string (S - 1) x 1KB (S - 1) x 2KB
* The file must be opened for output only,
or for both output and input.
** Always two data buffers and one index buffer.
*** If there is an upgrade set.
Additional space is required for CCW areas for a) output files that use RECOVERY
mode, and b) KSDS files in case of CA split. The size can be calculated by this
formula:
(CI/CA)÷40
and rounded down to the next 2KB value
For example:
CI/CA = 450
450÷40 = 11.25
and rounded down = 10
If LSR is Specified
If LSR is used to share control blocks among some files, the requirement for the
VSE/VSAM resource pools must be taken into account. Refer also to “The
BLDVRP Macro” on page 219.
Table 4 shows the partition virtual storage requirements when LSR is used.
Table 4. Partition Requirements for Control Blocks and Buffers (with LSR)
No Path Specified Path Specified
Item Input Output Input Output*
Basic requirement 3.25KB 3.25KB 5.25KB 5.25KB
(minimum)
Upgrade set (minimum) 0 u x 2KB 0 (u-1) x 2KB
Buffers for base cluster 0 0 0 0
Buffers for alternate index 0 0 0 0
Upgrade buffers** 0 0 0 0
For every string (S - 1) x 1KB (S - 1) x 2KB
* The file must be opened for output only,
or for both output and input.
** If there is an upgrade set.
To these values, add the requirement for the LSR pool, which consists of:
n The total space specified for buffers.
72p The space for subpools, where p is the number of subpools.
104b The number of Buffer Control Blocks; b = number of buffers
s(920 + k) The space for ACB strings, where:
s = the number of strings.
k = the maximum key length for files
sharing the resource pool.
Round the result to the next page boundary. If you build a large resource pool, the
VSE/VSAM working set will be somewhat reduced when resource pool activity is
light.
Table 5 shows the buffer allocation relative to the 16MB line. If you have:
v NSR, refer to the entries for the ACB specifications.
v LSR, refer to the entries for the BLDVRP specifications.
Table 5. How VSE/VSAM Allocates Buffers
Allocation
Specification in ACB or
BLDVRP Object Below Any
ACB RMODE31=ALL All buffers X
ACB RMODE31=NONE All cluster/path NSR data buffers X X
All cluster/path NSR index buffers¹ X
All upgrade set NSR buffers¹
BLDVRP RMODE31=ALL All buffers X
BLDVRP RMODE31=NONE All cluster/path NSR data buffers X
All cluster/path NSR index buffers¹ X
All upgrade set NSR buffers¹ X
Note:
1. The buffers are not accessible by user applications.
The working set is the same as for unmanaged-SAM access. VSE/VSAM does not
need additional work storage for managed-SAM access.
If you specify REAL in the // EXEC statement, the system loads VSE/VSAM
modules that normally reside in SVA into your partition. Your partition must have
an additional 340KB to accommodate these SVA modules.
Running programs in real mode in one partition can degrade the performance in
other partitions. For more information, refer to “Format of the EXEC Statement” on
page 39 (see REAL).
When you run programs that issue SAM imperative macros to access
managed-SAM files, the default GETVIS size of 48KB is inadequate. For more
information, refer to “Note to Users of the VSE/VSAM Space Management for
SAM Function” on page 38.
For programs that are invoked by using the EXEC statement, you must specify the
SIZE parameter of the EXEC statement to provide adequate GETVIS storage.
For job control routines that process an INCLUDE statement when IJSYSLN has
been defined as a managed-SAM file, both the minimum partition size of 128KB
and the default GETVIS size of 48KB are too small. Proceed as follows:
1. Use the ALLOC command to adjust the partition size to provide the required
GETVIS space, plus 80KB non-GETVIS space for job control routines.
2. Set aside adequate default GETVIS space in the partition with the SIZE
command. GETVIS space for file OPEN and catalog handling is the same as for
VSE/VSAM. See “Storage for VSE/VSAM” on page 16.
The required partition GETVIS area can be provided by specifying the job control
statement:
// EXEC IDCAMS,SIZE=AUTO ...
At IPL, provide:
10 entries in the SDL
122KB of storage in the SVA
The VSE/VSAM Backup/Restore Function may be loaded into the SVA. Simply
store the following statements in the job control procedure for the background
partition (in procedure $0JCL):
SET SDL
IDCBP01,SVA
IDCBP03,SVA
IDCCDBP,SVA
IDCTSBP0,SVA
IDCRT01,SVA
IDCCDRT,SVA
IDCBPDNC,SVA
IDCBPDNT,SVA
IDCRTDDC,SVA
IDCRTDDT,SVA
/*
Note that you can use the skeleton SKJCL0 to update the job control procedure
$0JCL. For more information on $0JCL and skeletons, refer to the z/VSE
Administration, SC34-2627
The assignment is valid until the next IPL. The DEF command must follow the
(optional) SET and precede the DPD command.
The number of resources that can be locked by a lock file depends on the device
type on which the lock file resides. For detail information, refer to a description of
the DLF command in the publication z/VSE System Control Statements, SC34-2637.
where:
n = number of lock table entries (optimal upper limit).
C = number of catalogs open concurrently.
O = number of VSE/VSAM components that are open but not
accounted for by S3 and S4.
P = number of partitions.
S3 = number of share option 3 VSE/VSAM components
All these values should reflect the situation that exists when n is at its maximum
value. The value for n (calculated in the above manner) will cause sufficient space
to be reserved for the variable resources to be used. Depending on the application,
however, the number of resources actually required most of the time might be
much lower.
Note: If the value substituted for n is too small and the pool of named resources
gets exhausted, the VSE/VSAM partition is canceled and an error message is
displayed.
Volume Mounting
To access VSE/VSAM files, the appropriate volume or volumes must be mounted
on a device. There are two approaches that allow you to mount one or more
required volumes.
If the requested volume (except for a catalog volume) is not mounted on the
requested device, VSE/VSAM issues a message to inform you; then, you can
correct the situation.
For the automatic assignment to be successful, ensure that devices are up before
mounting volumes, and do not reserve devices unnecessarily. Refer to the z/VSE
System Control Statements, SC34-2637 for information about DVCUP, FREE, and
RESERV commands.
If the required volume is not yet mounted, VSE/VSAM prompts you to mount it.
If possible, VSE/VSAM recommends a device and reserves it while the mount is
pending.
If you choose to use a device other than the recommended device (or if
VSE/VSAM did not recommend one), you must ensure that the device you use is
up and operational, and that mounting the required volume does not interfere
with other users in the system.
To hold a device while a mount is pending, use the RESERV command. When the
volume is mounted, the device becomes ready and the reserved status is reset to
free. Your reply to the mount message allows VSE/VSAM to verify the volume
mount and continue processing the file.
For a detailed explanation of the z/VSE job control, refer to the z/VSE System
Control Statements, SC34-2637.
The // DLBL statement may be in the job stream, or in the system or partition
standard label area.
If the program accesses a file in a user catalog, you must supply a file // DLBL
statement for the VSE/VSAM file. You can refer to the user catalog by either:
v The CAT=filename parameter pointing to that user catalog,
Or
v A job catalog // DLBL IJSYSUC statement pointing to that user catalog.
Irrespective of which way you specify, you do not need to supply // EXTENT and
// ASSGN statements.
Note that if an application program accesses files in several catalogs, you must
supply a user catalog // DLBL for all files not in the job's default catalog.
IDCAMS Commands
From the job control that you specify to identify the catalog you are using, you
may omit // EXTENT and // ASSGN statements. VSE/VSAM handles the
distribution of logical units (LUs) to physical disk addresses in an optimized way.
You do not need to reserve one logical unit for every file. However, when you run
out of LUs, use // ASSGN statements, or cut the single job into several jobs.
For the master catalog (with filename IJSYSCT), you always require a // DLBL
statement. Include the statement in the job stream, or in the system or partition
standard label area.
For certain operations (for example, to alter file attributes in catalog entries), you
can omit the // DLBL statement. You can do so if you specify the name of the
catalog through IDCAMS commands. Depending on which IDCAMS command
you issue, you have to specify the CATALOG, WORKCAT, or MODEL parameter;
in the parameter, specify the name in the subparameter catname. Table 6 shows
when you must specify a // DLBL statement for a job catalog (IJSYSUC) and,
when applicable, for a user catalog (not a IJSYSUC).
Table 6. // DLBL Statement Required for Job Catalogs and User Catalogs
ALTER No job catalog // DLBL statement is required, but you must specify CATALOG(catname) in the
command if the catalog referenced is not the master catalog, or if a password is required.
BACKUP A job catalog // DLBL (IJSYSUC) is required if the catalog to be referenced is not the master catalog.
BLD- Location of
INDEX Alternate index = = > MCAT UCAT1 MCAT UCAT1 MCAT UCAT
Work file = = > MCAT MCAT UCAT1 UCAT2 none none
(**) Specify the WORKVOLUMES parameter, because it does not require a // DLBL for the work file. If you specify
the WORKFILES parameter, you must also specify CAT= in the // DLBL statement.
LISTCAT No job catalog is required, but you must specify CATALOG(catname) in the command if the catalog
to be referenced is not the master catalog, or if a password is required.
PRINT
INFILE in master catalog: Do not specify a user catalog // DLBL or a job
catalog // DLBL.
INFILE in user catalog: Specify either a user catalog // DLBL (CAT=parameter)
or a job catalog // DLBL (IJSYSUC).
INFILE is nonVSAM: A user catalog // DLBL or a job catalog // DLBL statement is
not applicable.
RECMAP No job catalog // DLBL is required, but you must specify CATALOG(catname) in the command.
REPRO
INFILE and OUTFILE in same catalog:
Master catalog: Do not specify a user catalog // DLBL or a job catalog // DLBL.
User catalog: Specify either a user catalog // DLBL(CAT=parameter) or a job catalog
// DLBL(IJSYSUC).
INFILE and OUTFILE in different catalogs:
Specify a user catalog // DLBL for every catalog that is not the default catalog.
RESTORE No job catalog // DLBL is required, but you must specify CATALOG(catname) in the command if the
catalog to be referenced is not the master catalog, or if a password is required.
SNAP A job catalog // DLBL (IJSYSUC) is required if the catalog to be referenced is not the master catalog.
VERIFY A job catalog // DLBL (IJSYSUC) is required if the catalog to be referenced is not the master catalog,
or if a password is required.
// DLBL Statement
To determine when you must supply a // DLBL statement, refer to “Use of z/VSE
Job Control Statements for VSE/VSAM” on page 25.
If you specify many // DLBL parameters, you may need to use a continuation
statement. If so, column 72 (on the first statement) must contain a continuation
character. The columns between the last comma and the continuation character
must be blank, and the continuation statement must start in column 16 (no // in
columns 1 and 2).
(1)
// DLBL filename,'file-id' , ,VSAM
date ,BUFDAT=RMODE31
,BUFND=n ,BUFNI=n ,BUFSP=n ,CAT=filename ,CISIZE=n
,DISP=(OLD,KEEP,KEEP)
,DISP= d1 ,RECORDS= n ,RECSIZE=n
(d1,d2) (n,n1)
(d1,d2,d3) ,BLK= n
(n,n1)
,CYL= n
(n,n1)
Notes:
1 This comma and the following comma are positional, they must be used even
if the operands are omitted.
BLK=n|(n,n1)
Indicates the number of blocks on an FBA device that are used for space
allocation. BLK is only valid for VSE/VSAM managed-SAM clusters. n
specifies the number of blocks used for the primary allocation, n1 the
number used for secondary allocation. VSE/VSAM accepts values up to
16,777,215 for n and n1.
BUFDAT=RMODE31
Indicates that data buffers will be allocated in the 31-bit GETVIS area of
the partition, if sufficient space is available. Otherwise, the 24-bit GETVIS
area of the partition will be used, without an error return code or message
being issued.
BUFND=n
Specifies the number of I/O buffers to hold control intervals containing
data records. Each buffer is the size of one data control interval. This
specification overrides the value given for BUFND in the ACB macro.
BUFNI=n
Specifies the number of I/O buffers to hold control intervals containing
index records. Each buffer is the size of one index control interval. This
specification overrides the value given for BUFNI in the ACB macro.
BUFSP=n
This operand specifies the number of bytes of virtual storage (0-9999999) to
be allocated as buffer space for a VSE/VSAM cluster. It overrides the
values specified for BUFSP in the ACB macro and for BUFFERSPACE in
the DEFINE command. See “I/O Buffer Space (Using Non-Shared
Resources)” on page 96 for further details on buffer spaces.
VSE/VSAM uses the maximum of the following:
v The BUFFERSPACE value specified in the IDCAMS command DEFINE
CLUSTER
If you use the parenthesis syntax, each keyword (but not the separating
commas) can be omitted. For example, the following three specifications
are equivalent:
v DISP=NEW
v DISP=(NEW,)
v DISP=(NEW,,)
Specifying DISP=(,) or DISP=(,,) is the same as if the whole DISP parameter
is omitted.
For additional information about these keywords, see “File Disposition” on
page 32.
‘file-id’
For VSE/VSAM, 'file-id' is mandatory when a file is being processed. The
file-id is identical to the name of the cluster that was specified in the
DEFINE command of IDCAMS and listed in the VSE/VSAM catalog. For
VSE/VSAM, the file-id must be coded according to the following rules:
v One to 44 characters long, enclosed in quotes (');
v Characters must be alphanumeric (A-Z, 0-9, @, $, or #) or hyphen (-) or
plus zero (+0);
v After each group of eight or fewer characters, a period (.) must be
inserted;
v No embedded blanks are allowed;
v The first character of the file-id and the first character following a period
must be alphabetic (A-Z) or @, $ or #.
For details on the VSE/VSAM partition/processor unique file-id (%%), see
“VTOC Label Processing” on page 365.
filename
This can be from one to seven alphanumeric characters, the first of which
must be alphabetic, @, # or $. This unique filename is identical to the
symbolic name of the program DTF that identifies the file.
Note: Do not use the same filename for both a DLBL and a TLBL
statement.
For VSE/VSAM, filename is identical to the DDNAME=filename
parameter of the access method control block (ACB) in the processing
program that identifies the cluster. If the DDNAME parameter is omitted,
the filename must be contained in the symbolic name (label) field of the
ACB.
RECORDS=n|(n,n1)
This operand is only valid for VSE/VSAM managed-SAM clusters. It
permits specification of the number of records for the primary and
secondary data set allocation. The operand can be specified in one of two
formats:
v RECORDS=n
v RECORDS=(n,n1)
where n indicates the number of records for the primary allocation, and n1
the number of records for the secondary allocation. n must not be zero; n1
can be larger or smaller than n. VSE/VSAM accepts values up to
16,777,215 for n and n1.
The RECORDS and RECSIZE operands must either both be specified or
both be omitted.
RECSIZE=n
This operand is only valid for VSE/VSAM managed-SAM clusters. It
specifies the average record length of the file. The value specified for n
must not be zero. The RECSIZE and RECORDS operands must either both
be specified or both be omitted.
VSAM
This parameter is required for all Virtual Storage Access Method clusters.
For details on the RECORDS and RECSIZE parameters, see “Defining a SAM ESDS
File” on page 162.
File Disposition
Disposition processing applies to reusable files only. Implicitly defined SAM ESDS
files are always reusable.
For VSE/VSAM access, the options available at OPEN and the disposition of the file
at CLOSE depend on the DISP parameter of the // DLBL statement or the
MACRF/CLOSDSP parameters of the ACB macro. Options specified for DISP
override those specified for MACRF/CLOSDSP. The default for the DISP
parameter depends on the file opened or closed. For VSE/VSAM access, the
default is:
DISP=(OLD,KEEP,KEEP)
where:
OLD is the default when the file is opened.
The first KEEP is the default when the file is normally closed.
The second KEEP is the default when the job is abnormally ended.
For managed-SAM access, the options available at OPEN and the disposition of the
file at CLOSE depend on the DISP parameter of the // DLBL statement and
options specified in the DTF.
Table 9 on page 34 through Table 13 on page 38 list the VSE/VSAM actions when
opening and closing different kinds of files. The following definitions apply to the
figures:
v Keep means to retain a file's data and accessibility.
v Reset means to set a file to empty and release its secondary extents.
v Deallocate means to set a file to empty and release its primary and secondary
extents.
v Allocate means to provide primary disk space, as specified by the user at
DEFINE time.
v Define means to place information describing the file into the VSE/VSAM
catalog.
v Delete means to remove all references to the file from the catalog, and release
the file's space.
OPEN Disposition
A file may appear in one of the following four states when it is opened for output:
Unallocated
All open options cause space to be suballocated for the file, providing enough
space is available. If enough space is not available, the open fails. The ACB user is
informed by an ACB return code; the DTF user's job is canceled.
The options DISP=NEW and/or MACRF=RST cause the file to be reset to its
primary allocation; its secondary extents are released. Although the file records are
not erased, the file is considered empty. The options DISP=OLD and/or
MACRF=NRS do not cause the file to be reset to empty and allow updating and
extension of the file.
All options of the DISP parameter cause the file to be implicitly defined. The
native VSE/VSAM user cannot implicitly define a file.
When a file with suballocated space is opened for input, the options DISP=NEW
and/or MACRF=RST are invalid, and the options DISP=OLD and/or
MACRF=NRS cause the file to be opened without resetting the file to empty.
Table 9 on page 34 shows the action performed by VSE/VSAM when you try to
open a file that is allocated for VSE/VSAM access.
Table 10 and Table 11 on page 35 show the action performed by VSE/VSAM when
you try to open a file that is allocated for managed-SAM access. For explanations to
the “See ( )” references in the two figures, refer to the explanations below the
tables.
Table 10. Managed-SAM Access: OPEN Disposition -- OUTPUT/INPUT
Files with REUSE Attribute
DISP on DLBL. See (B)
OPEN DISP is NOT
(DTF) File Status specified. See (A) NEW OLD
OUTPUT Unallocated SAM Allocate space for Allocate space for Allocate space for
ESDS file. See (1) the file. the file. the file.
(DISP=NEW)
Allocated for Reset the file. Reset the file. File is not reset.
SAM ESDS file. Position to the Position to the Position to the
See (1) (2) beginning of the beginning of the end of the file for
file. (DISP=NEW) file. extension.
See (B)
Undefined. Implicitly define a Implicitly define a Implicitly define a
SAM ESDS file. SAM ESDS file. SAM ESDS file.
(DISP=NEW)
INPUT Allocated for File is not reset. Invalid. File is not File is not reset.
SAM ESDS file. Position to the reset. Open fails. Position to the
beginning of the beginning of the
file for input. file for input.
(DISP=OLD)
Explanations
CLOSE Disposition
Close disposition takes effect only after the file has been successfully opened. If
you open a file but do not close it, close disposition takes effect during automatic
close at the end of the job step.
VSE/VSAM Access
If you specify a second close disposition in the // DLBL DISP parameter, this
specification takes over the function of the first close disposition if the job is
canceled by the operator or is ended abnormally for any other reason before the
file was closed.
Note: A nonzero job return code is not an abnormal end of job. This means:
v The first close disposition will be performed.
If, for example, you open a reusable file through a // DLBL statement with the
close disposition specified as ...DELETE,KEEP then this file is only deleted if the
job comes to a normal end. In any other case the file is not deleted and you can
rerun the job without reloading the file.
Table 12 shows the action performed by VSE/VSAM when you try to close a file
that is allocated for VSE/VSAM access.
Table 12. VSE/VSAM Access: CLOSE Disposition
Files with REUSE Attribute
DISP on DLBL or MACRF on ACB
Date
CLOSE (ACB) KEEP DELETE Expired Unexpired
File was explicitly defined Keep Deallocate Deallocate Keep
(NOALLOCATION)
REUSABLE (suballocated) Keep Reset Reset Keep
File was implicitly defined Keep Reset Reset Keep
Managed-SAM Access
If you specify a second close disposition in the // DLBL DISP parameter, this
specification takes over the function of the first close disposition if the job is
canceled by the operator or is ended abnormally for any other reason before the
file was closed.
Note: A job return code of not 0 is not an abnormal end of job. That means:
v The first close disposition will be performed.
v The second close disposition will not be performed.
If, for example, you open a reusable file through a // DLBL statement with the
close disposition specified as ...DELETE,KEEP then this file is only deleted if the
job comes to a normal end. In any other case the file is not deleted and you can
rerun the job without reloading the file.
Table 13 on page 38 shows the action performed by VSE/VSAM when you try to
close a file that is allocated for managed-SAM access.
(A) Do not specify the DISP parameter for IJSYSLN (SYSLNK file).
(1) DISP is DELETE if TYPEFILE=WORK and DELETFL is specified.
Additional Considerations
v Specifying DISP=NEW in the // DLBL statement overrides MACRF=NRS in the
ACB, such that the result is as if MACRF=RST were specified. Because
MACRF=RST is mutually exclusive with MACRF=IN and MACRF=LSR, open
fails if DISP=NEW is specified for a file opened through DTF TYPEFLE=INPUT,
or ACB MACRF=IN, or MACRF=LSR.
v If the close disposition specified for the file results in the resetting or
deallocation of the file, and if the file is password-protected, the ACB must
specify (or the operator will be prompted for) the update- or higher-level
password of the file at open. If the close disposition specified for the file results
in the implicit deletion of the file, there is no prompting for the entry password
because an implicitly defined file cannot be password-protected. If the catalog
itself is password-protected, the operator is prompted for the master password
of the catalog at CLOSE.
Using DISP could eliminate data inadvertently if the wrong parameter is
specified. You may want to use an entry password to protect against inadvertent
destruction of data. A catalog password may also provide protection for files
owned by the catalog. If the file is accessed through DTF, the password must be
supplied by the operator. If the file is accessed through ACB, the password may
be supplied in the ACB, by the operator, or through IDCAMS commands.
// EXEC Statement
To run a job or job step, enter the EXEC command with the SIZE parameter.
For example, to use 4 work files cataloged in the same user catalog, provide 40KB
(user catalog) + 40KB (master catalog) + 80KB (4 SAM ESDS files) = 160KB of
GETVIS space. This is in addition to the space for the program you intend to run
in that partition.
,SIZE= nK ,GO ,PARM='value'
mM
AUTO
(AUTO, nK )
mM
phasename
(phasename, nK )
mM
,DSPACE= nK ,TRACE
mM
For information about parameters not described here, refer to the description of the
EXEC statement in the z/VSE System Control Statements, SC34-2637.
PARM=‘value’
The parameter is optional. The syntax and meaning of the PARM
parameter are identical to that of the PARM IDCAMS command (modal
command) as described in the VSE/VSAM Commands, SC33-8315.
Follow IDCAMS syntax rules for coding ‘value’, but follow VSE/VSAM job
control rules for coding continuation statements. (Use a nonblank character
in column 72 and continue the statement in column 16.) The maximum
number of characters between the quotes is 100 and consists of all data in
columns 16 - 71, including blanks. IDCAMS treats this data as one
100-character line. Do not code the IDCAMS continuation dash.
Examples:
16 72
| |
V V
// EXEC IDCAMS,SIZE=AUTO,PARM=’GRAPHICS(CHAIN) X
MARGINS(10 80)’
// EXTENT Statement
To determine when you must supply a // EXTENT statement, refer to “Use of
z/VSE Job Control Statements for VSE/VSAM” on page 25.
, ,
sequence_number relative_track_number number_of_tracks
block_number number_of_blocks
logical_unit
Specifies a six-character field indicating the logical unit (SYSxxx) of the
volume on which this extent resides. VSE/VSAM does not require this
parameter; if you do not specify a LU, VSE/VSAM will assign one.
If you specify this parameter, you must supply full job control statements
(// DLBL, // EXTENT, and // ASSGN) for all volumes (including
candidate volumes) for the file and its associations.
number_of_tracks│number_of_blocks
This parameter indicates the number of tracks (CKD), or number of blocks
(FBA) to be allocated to the file or space. You must specify it when a file
with the UNIQUE option is created (DEFINE or IMPORT command).
This parameter is ignored when a VSE/VSAM file is created within an
existing data space, because VSE/VSAM suballocates the space for the file
from direct-access extents it already owns. This parameter is not required
for VSE/VSAM input files, because the extents are obtained from the
VSE/VSAM catalog.
For an implicitly defined SAM ESDS file that does not specify RECORDS
(and RECSIZE), or CYL or BLK (on the // DLBL statement), VSE/VSAM
uses the number of tracks│blocks parameter to determine the primary
allocation size. A secondary allocation size equal to 20% of the primary
size is used.
This parameter and the relative track│block parameter must either both be
present or both be omitted.
relative_track_number│block_number
This parameter indicates the number of the track (CKD), or number of
block (FBA) on which the extent is to begin. You must specify it when a
file with the UNIQUE option is created (DEFINE or IMPORT command).
This parameter is not required (and is ignored) if it is specified for a
VSE/VSAM file that is created within an existing data space. In this case,
VSE/VSAM suballocates the space for the file from direct-access extents it
already owns. You are not required to specify this parameter for a
VSE/VSAM input file, because the extents are obtained from the
VSE/VSAM catalog.
This parameter and the number of tracks│blocks parameter must either
both be present or both be omitted.
sequence_number
This parameter is ignored for VSE/VSAM users, but if it is specified
incorrectly, it is flagged by job control.
serial_number
VSE/VSAM users are required to specify the serial number of the volume
this extent is on. For data integrity reasons, do not have two volumes with
the same serial number in your system (even if one of the volumes
contains no VSE/VSAM space).
type For VSE/VSAM, a value of 1 is assumed.
Overview of Catalogs
VSE/VSAM catalog(s) are central information points for files and volumes. A
catalog contains the information VSE/VSAM needs to allocate space for files,
verify authorization to gain access to files, compile use statistics on files, and relate
relative byte addresses (RBAs) to physical locations. Each VSE/VSAM catalog also
contains entries that describe the catalog itself. Figure 5 shows the relationship
between a master catalog and user catalogs, as well as their relationships with
VSE/VSAM and nonVSAM files.
Master Catalog
Master Catalogs
This type of catalog is mandatory. A master catalog must be defined in your
system. Defining a master catalog is the first job that needs to be done after you
have installed VSE/VSAM in your system. You can have several master catalogs at
your installation; however, only one can be connected to the system at a time.
The master catalog volume must always be mounted whenever a VSE/VSAM file
or catalog is to be processed. If the VSE/VSAM file to be processed is defined in a
user catalog, the user catalog volume must be mounted also.
The master catalog volume is connected to the system at IPL (initial program load)
by the DEF SYSCAT=cuu command. It is always on a LU named SYSCAT.
User Catalogs
This type of catalog is optional. A user catalog has the same structure and function
as the master catalog. If defined, a user catalog is pointed to by the master catalog.
One or more user catalogs can be defined in your system. They are used to
increase data integrity and security, improve performance, and provide volume
portability.
Catalog Volumes
Several catalogs can own space on a volume, but with the restriction that only one
catalog can reside on a volume.
If a VSE/VSAM file resides on several volumes, every one of those data spaces
must be owned by the same catalog.
Note that information requests to a catalog might be answered more quickly if the
information is distributed across several catalogs. For example, if the master
catalog primarily contains pointers to user catalogs, which in turn contain entries
for most files and volumes, catalog search time can be reduced, and the effect of an
inoperative or unavailable catalog is minimized.
The following discussion (except where noted) pertains to the accessing of a file.
You can omit the master catalog // DLBL statement from the job stream if you
place the statement in the system or partition standard label area. You do this by
preceding it with one of the following job control statements:
// OPTION STDLABEL=ADD
// OPTION PARSTD=ADD
Another way of referring to the master catalog (after its initial specification) is by
coding the CAT=filename parameter in a VSE/VSAM file's // DLBL statement. For
further explanation to the CAT=filename parameter, see below.
You specify a job catalog by coding the filename, IJSYSUC, in the // DLBL
statement that specifies the user catalog; for example:
// DLBL IJSYSUC,'JOBCAT',,VSAM
When you specify a job catalog, VSE/VSAM will always use that one catalog for
all catalog and file access in the current job, unless it is specifically overridden by:
v The CAT=filename parameter of a VSE/VSAM file's // DLBL statement.
v The CATALOG or WORKCAT parameter of an IDCAMS command.
Example:
Assume that you want to process a file, but the file is not cataloged in the job
catalog. In this case, you can override the job catalog by using either:
v The // DLBL CAT=filename parameter, or
v The CATALOG parameter of an IDCAMS command.
Example:
VSE/VSAM locates the entry of file PAY (b) in the job catalog as before because, in
this case, you have not overridden the job catalog specification.
The // DLBL CAT=filename parameter is used with the PRINT and REPRO
commands. (Each of these commands is used to access data.) The // DLBL
CAT=filename parameter can also be used for VSE/VSAM application program
access.
A master catalog // DLBL statement is always required. You may include it in the
job stream or in the partition or standard label area.
User Catalog
CATALOG (catname/password)
The default catalog is the catalog that VSE/VSAM searches if you do not specify
CAT=filename in the // DLBL statement, or if you do not use the CATALOG
parameter in an IDCAMS command.
Normally, the default catalog is specified by the // DLBL IJSYSUC statement (also
referred to as job catalog). If not specified, the default catalog is the master catalog
(// DLBL IJSYSCT).
Table 14. // DLBL Specifications and Search Sequence of Catalogs
CATALOG
// DLBL IJSYSUC // DLBL Parameter Specified? Catalog to be
specified? CAT=filename See (1) Searched
Yes None No Job Catalog
Yes Filename of User No User Catalog
Catalog // DLBL
Yes ’IJSYSCT’ No Master Catalog
Yes ’IJSYSUC’ No Job Catalog
Yes None Yes CATALOG(catname)
No None No Master Catalog
No Filename of User No User Catalog
Catalog // DLBL
No ’IJSYSCT’ No Master Catalog
No ’IJSYSUC’ No Master Catalog. See
(2)
No None Yes CATALOG(catname)
Note:
1. For more information on the CATALOG parameter, see Table 6 on page 26.
2. If the filename for the job catalog is specified but not a job catalog, VSE/VSAM
defaults to the master catalog.
Explains the relationship between a catalog, the data space on a volume, and
VSE/VSAM files.
The index part of the catalog allows VSE/VSAM to find the cluster entry through
its 44-byte name (file-ID), and to find the volume entry through the volume serial
number.
Except for clusters that have been defined with the UNIQUE attribute, VSE/VSAM
can allocate and deallocate space for files on cataloged volumes that are not
mounted.
Note that the volumes that will contain VSE/VSAM files must be mounted.
When you define VSE/VSAM files, you normally do not need any // DLBL and
// EXTENT statements. This is because VSE/VSAM automatically allocates space
for the files from existing data spaces.
When you define a file with the UNIQUE attribute (to enable the file to be
allocated a space of its own), you do not define the data space beforehand. Instead,
you provide extent information. You do this through // DLBL and // EXTENT
statements in the IDCAMS job stream that defines that file. The data space is then
set up at the same time as the entry for the file is created. The volume(s) must be
mounted, as in defining a data space.
Note that you can also identify nonVSAM files in a VSE/VSAM catalog, but you
cannot suballocate nonVSAM files within VSE/VSAM data space.
The VSE/VSAM data space occupied by VSE/VSAM files is recorded in the volume
entries in a catalog. The ownership of the volume, and the use of VSE/VSAM data
space on a volume are indicated by label entries in the VTOC of the volume.
VSE/VSAM volume ownership does not affect nonVSAM files that reside on the
volume. NonVSAM files can exist on a volume owned by a catalog but can be
cataloged as nonVSAM entries in a catalog that does not own the volume.
(NonVSAM files do not have to be defined in a VSE/VSAM catalog.)
The data secure file bit in the format-1 VTOC (identifier) label of every VSE/VSAM
data space on the volume is set to indicate both read and write protection.
The ownership bit in the format-4 VTOC label is set to 1 if the volume contains a
VSE/VSAM data space, or if the volume is a candidate volume for a VSE/VSAM
object. The ownership bit indicates that the volume is owned by one or more
catalogs, but does not identify the volumes.
Every catalog contains a volume entry for every volume it owns. The volume entry
describes:
v The characteristics of the direct-access volume
v Every extent of the VSE/VSAM data space
v Every VSE/VSAM object that uses the space of the volume
Note that volumes with duplicate volume serial numbers cannot be owned by the
same catalog.
Handling Ownership
Removing Volume Ownership
To remove a volume ownership from a catalog, you must delete all VSE/VSAM
objects and data spaces owned by that catalog on the volume.
If you cannot use the DELETE command because IDCAMS can no longer access
the volume (due to the damage that resulted from a system or hardware failure),
you can reset the ownership bit by using the IKQVDU program.
Note: Do not use IKQVDU if more than one catalog owns space on the volume.
This is because IKQVDU resets the ownership bit even if other catalogs own space
on the volume. For more information on the IKQVDU program, see “Maintaining
VTOC and VOL1 Labels on Disk (IKQVDU)” on page 385.
To release space from ownership by a catalog, you must delete all VSE/VSAM
objects that reside in that space. The catalog contains a volume entry, which
describes the volume and its VSE/VSAM data spaces.
After deleting the VSE/VSAM objects, you must issue the DELETE SPACE
command. The DELETE SPACE command deletes the VSE/VSAM data spaces
owned by that catalog, removes the volume entry from the catalog, deletes the
format-1 label, and revises the format-4 label in the VTOC (if no other catalogs
own space on that volume).
The following fields in the format-4 VTOC label are reset only when all catalogs
have released their VSE/VSAM space on the volume:
Offset Length Description
77 8 VSE/VSAM time stamp 1 is set to the system’s time of day
when VSE/VSAM acquires volume ownership in a catalog. This
time stamp is modified whenever physical space allocated to
VSE/VSAM is acquired, either by allocation of an extent
or any time VSE/VSAM physical space is returned to the
VTOC by VSE/VSAM catalog management routines.
85 1 VSE/VSAM indicators:
Bit 0 set to 1 = One or more VSE/VSAM catalogs owns space
on the volume.
where:
n=2 if no catalog resides in the data space
n=4 if a user catalog resides in the data space
n=6 if the master catalog resides in the data space
aaaaaaabbbbbbb is the time stamp value
v For a unique data space (defined as a data space that cannot contain more than
one cataloged VSE/VSAM object), the VSE/VSAM-generated name is:
VSAMDSET.DFDyyddd.Taaaaaaa.Tbbbbbbb
where:
yyddd is the date (year and Julian day)
aaaaaaabbbbbbb is the time stamp value
Time Stamps
Every volume owned by a catalog contains a time stamp that is written in the
VTOC when the volume is first cataloged. Both time stamps, the one in the VTOC
and the one in the volume entry in the catalog, are updated whenever the catalog
is updated in response to the following IDCAMS commands:
DEFINE SPACE
DEFINE CLUSTER (with UNIQUE attribute)
DEFINE ALTERNATEINDEX (with UNIQUE attribute)
DEFINE MASTERCATALOG
DEFINE USERCATALOG
DELETE SPACE
DELETE CLUSTER (with UNIQUE attribute)
DELETE ALTERNATEINDEX (with UNIQUE attribute)
DELETE MASTERCATALOG
DELETE USERCATALOG
EXPORT PERMANENT a cluster or alternate index with the UNIQUE attribute.
(The cluster or alternate index is deleted.)
IMPORT a cluster or alternate index with the UNIQUE attribute. (Any old copy,
if present, is deleted, and a new version is defined.)
If the time stamp of the volume is earlier than the time stamp of the catalog, the
volume is considered down-level. IDCAMS will not open a file on a down-level
volume.
Virtual disk processing should only be used in conjunction with temporary work
files, because the information in a z/VSE data space is lost whenever the system is
restarted.
For information on these commands, refer to the z/VSE System Control Statements,
SC34-2637.
Restrictions
Because all VSE/VSAM files must be cataloged, moving a file from one system (or
set of systems if in a disk sharing environment) to another requires that catalog
information be moved along with it or that the copy of the file moved be cataloged
in the receiving system. If the catalog information is copied with the file, it must be
in a format that both systems can process.
Use EXPORT and IMPORT to copy VSE/VSAM files and their catalog information
to DFSMSdfp VSAM (which uses the Integrated Catalog Facility - ICF). The only
way you can move MVS files cataloged with the new catalog format to
VSE/VSAM is to export those files to tape while running on DFSMSdfp VSAM.
Then you can import the tape files to VSE/VSAM. You cannot mount a DFSMSdfp
VSAM format volume on a z/VSE system. VSE/VSAM cannot process DFSMSdfp
ICF catalog information.
Do not use BACKUP and RESTORE to transport files from z/VSE to MVS, because
MVS does not have BACKUP and RESTORE commands.
Use EXPORT and IMPORT to transfer files and their catalog information between
systems. Files and volumes are portable between VSE/VSAM and MVS/VSAM
“old” catalog format systems.
You can use BACKUP and RESTORE to back up MVS “old” catalog format files on
z/VSE and restore them on z/VSE. This procedure is recommended only for a
one-time move of files from MVS to z/VSE. The only way you could move the
files back to MVS is to use EXPORT/IMPORT, because MVS does not support
BACKUP and RESTORE.
The description under “Transporting Files between z/VSE Systems” also applies to
transferring files between z/VSE and MVS “old” catalog format systems.
You can move individual files and user catalogs from one z/VSE system to another
by using the EXPORT and IMPORT commands. When you move a user catalog
from one system (or set of systems) to another, its VSE/VSAM volume ownership
moves along with it. Thus, a VSE/VSAM volume (without compressed data sets) is
portable between systems together with all VSE/VSAM data spaces and files
contained on the volume(s). Any VSE/VSAM volume including compressed data
sets is portable between z/VSE systems.
The entire VSE/VSAM master catalog and the VSE/VSAM volumes owned by the
master catalog can be moved from one z/VSE system (or set of systems) to
another.
To use a VSE/VSAM master catalog from another system, you need only assign it
by use of the DEF SYSCAT=cuu command during initial program load. All
VSE/VSAM volumes owned by that catalog are then available to the receiving
system. In addition, a // DLBL statement for the master catalog must be provided
either in the job stream or in the label area.
There are two ways to migrate objects and their catalog information from one
device type to another. The simpler method is to use the VSE/VSAM
Backup/Restore Function, but there are some restrictions; the other way is to use a
combination of EXPORT/IMPORT and DEFINE commands. For a description of
the methods, refer to “Migrating Catalogs” on page 55.
The following applies to both master and user catalogs. Whenever you use
BACKUP/RESTORE or EXPORT/IMPORT for migration, you must first define the
catalog that will own the VSE/VSAM objects after migration.
Convert the number of tracks or cylinders into the number of bytes, using
LISTCAT to determine the number of bytes per track and tracks per cylinder.
Divide the number of bytes by 512 to determine the BLOCKS value. Adjust it
accordingly if you want more or less space allocated.
You may wish to change other subparameters of MCAT or UCAT (for instance, the
volume serial number), but there are no special considerations for FBA devices.
Specify the actual space to be suballocated for your catalog using the BLOCKS or
RECORDS subparameters of DATA and INDEX. Do not try to directly convert a
CKD catalog size definition to a fixed block definition. Instead, calculate the
desired values; refer to the instructions in the VSE/VSAM Commands, SC33-8315. To
avoid an overly small, inefficient CA size, make the secondary allocation value at
least as large as the desired CA size.
The considerations for data space definition are essentially the same as for catalog
definition. Differences are:
v A catalog is not suballocated from the data space.
v Both BACKUP/RESTORE and EXPORT/IMPORT assume that you have already
defined a VSE/VSAM data space on the new volume.
If CANDIDATE is specified with DEFINE SPACE, fixed block data space definition
is the same as CKD data space definition.
Because these files (or their components) are suballocated from VSE/VSAM data
spaces, there are no job control considerations for FBA devices. For FBA devices,
you must convert the TRACKS or CYLINDERS subparameters to BLOCKS or
RECORDS. (The RECORDS subparameter does not require conversion.) This
conversion is the same as described above for catalog conversion.
For every unique component (data and, if present, index), you must convert
EXTENT statement parameters and the TRACKS│CYLINDERS subparameters. Both
conversions are required because a unique component occupies its own
VSE/VSAM data space. If the component is to be on more than one volume,
specify a new EXTENT statement for every volume.
Migrating Catalogs
Catalog Migration Using BACKUP/RESTORE
You cannot actually back up and restore catalogs under BACKUP/RESTORE, but
when you back up and restore objects (including empty objects), their catalog
information is backed up and restored too. This makes it possible for you to use
BACKUP and RESTORE to copy objects and their catalog information into a
different catalog. If the new catalog already contains an entry name for the object
restored, the original object is deleted, and the restored object is added to the new
catalog.
1. Using EXPORT, create portable copies of all files that are to be in the new
catalog (procedure described below).
2. Delete or disconnect the previous user catalog entry unless it is owned by a
different master catalog.
3. Define the new user catalog (procedure described above).
4. Define any VSE/VSAM data spaces required for the volumes. (You need not
delete files and catalogs belonging to another catalog.) Note that the define
catalog operation has already defined a data space on the catalog volume. Any
space to be occupied by unique files should be left unallocated.
5. Using IMPORT, copy VSE/VSAM files to volumes belonging to the new
catalog. (For considerations on moving to a different device type, refer to
“Migrating VSE/VSAM Files to Another Device.”)
Note: VSAM will tolerate the use of IDCAMS BACKUP/RESTORE for migration
from a non-SCSI device to a SCSI device, or vice versa. However, not every cluster
can be migrated in this manner. In these cases, IDCAMS EXPORT/IMPORT must
be used instead. EXPORT/IMPORT is the recommended method of data migration.
The VSE/VSAM Backup/Restore Function can back up the following objects and
their catalog information onto tape or disk volumes:
v Key-sequenced data sets (KSDS)
v Entry-sequenced data sets (ESDS)
v Relative-record data sets (RRDS)
v Variable-length relative record data sets (VRDS)
v Alternate indexes (AIX)
v SAM ESDS files in CI format
Empty objects can be backed up and restored. An empty object is an object that
was defined using the NOALLOCATION parameter, an object that has never been
loaded with data, or an object that has not been loaded since reset. Although they
cannot be specified in the command, paths are backed up and restored
automatically when their respective path entry clusters are backed up or restored.
You can back up and restore multiple objects with a single command. If you
specify BACKUP (*), all objects defined in a specific catalog will be backed up. If
you specify RESTORE (*), all objects residing in a specific backup file are restored.
You can also specify generic names representing groups of related objects to be
backed up or restored. Because the generic specification may include objects you
do not want backed up or restored, you can exclude objects by specifying either
their entry names or other generic names. For information on the use of generic
names for back up and restore, refer to the VSE/VSAM Commands, SC33-8315
under:
v “Using BACKUP and RESTORE”
v “Generic Names”
To copy objects from one volume to another volume of a different device type,
specify the volser representing the new volume in the RESTORE command.
NonVSAM Migration
Catalog entries can be moved also into catalogs on FBA devices (as described
above) through DEFINE NONVSAM and DELETE, but they cannot have fixed
block specified as their device type.
For further information about modeling, see “Using an Object as a Model” on page
58.
Modeling permits you to set your own parameter defaults to override system
defaults. Once defaults are established, you need not specify them every time you
define new objects. An explicit parameter specification, however, overrides defaults
established by you (through modeling) and by the system.
With explicit modeling, you have to specify the name of the model you wish to use.
With implicit modeling, VSE/VSAM chooses a default model based on the kind of
object you are trying to define.
Using the MODEL parameter, you can easily define files that are identical, except
for their names and security attributes. When you use the MODEL parameter,
ensure that your job is not terminated because of allocation problems when you
explicitly do any of the following:
v Specify a different type of device with the VOLUMES parameter.
v Change the length or position of the keys with the KEYS parameter.
v Change the size of records, buffer space, or CIs with the RECORDSIZE,
BUFFERSPACE, or CONTROLINTERVALSIZE parameters.
v Change the type of cluster (that is, entry-sequenced, key-sequenced, or
relative-record), the type of alternate index (that is, key-pointer or RBA-pointer),
or the allocation-type of the object (that is, unique or non-unique).
v Change the unit of allocation with the BLOCKS, TRACKS, CYLINDERS, or
RECORDS parameters.
When you explicitly specify any of the above parameters for your to-be-defined
object, you might have to make corresponding changes to other related parameters.
MODEL (entryname)
Figure 7 on page 60 shows how parameters are merged from a Model Cluster and
an Explicit Specification into New Cluster. Once the merge is completed, New Cluster
contains a new list of cluster parameters which VSE/VSAM uses to create a cluster.
In the figure, it is assumed that MODEL is specified at the cluster level in the
DEFINE CLUSTER command. It is also assumed that MODEL is not specified at
the data component level and index component level of the command.
Note that attributes specified for every step (n) override the attributes specified by
the previous step.
Attributes specified for every step override the attributes specified by the previous
step.
Explicit
Model Cluster Specification
DEFINE CLUSTER
Cluster X Command
(1) (3)
(2)
(4)
New Cluster (5)
Cluster Level
Data Component
Level
Note: The DATA and INDEX component levels have similar rules; for simplicity,
only the DATA component is shown in this figure.
Figure 8 is an explicit model because you must specify MODEL(entryname) for the
cluster you wish to use as a model. It is a NOALLOCATION model because no
storage is allocated to it.
MODEL (entryname)
NOALLOCATION
When you define the model, specify the entryname subparameter of the NAME
parameter as one of the following:
DEFAULT.MODEL.KSDS
(key-sequenced file)
DEFAULT.MODEL.ESDS
(VSAM entry-sequenced file)
DEFAULT.MODEL.ESDS.SAM
(managed-SAM file)
DEFAULT.MODEL.RRDS
(relative-record file)
DEFAULT.MODEL.VRDS
(variable-length relative record file)
DEFAULT.MODEL.AIX
(alternate index)
Every catalog may have six implicit models, one of every type.
NOALLOCATION INDEXED
DEFINE CLUSTER DEFINE CLUSTER
NAME (DEFAULT.MODEL.ESDS) NAME (entryname)
NOALLOCATION NONINDEXED
NOALLOCATION NONINDEXED
NOALLOCATION NUMBERED
NOALLOCATION NUMBERED
RECORDSIZE (a<m)
NOALLOCATION
4. If none of the above apply, VSE/VSAM uses the system default (if one exists).
Restrictions
The following restrictions exist for modeling of VSE/VSAM objects.
v If you specify DEFINE CLUSTER or DEFINE ALTERNATEINDEX and the
cluster name begins with DEFAULT.MODEL., VSE/VSAM assumes that you are
establishing a model. The rest of the name must be KSDS, ESDS, ESDS.SAM,
RRDS, VRDS or AIX. It is not possible to open a file or component whose name
begins with DEFAULT.MODEL.. DEFINE CLUSTER and DEFINE
ALTERNATEINDEX ignores user-specified DATA and INDEX component names
for clusters that have the DEFAULT.MODEL. prefix. Instead, these components
are implicitly assigned a name constructed from the cluster or alternate index
name with the additional qualifier of DATA or INDEX. A message will tell you
any data/index names that have been generated in this way.
v If space parameters (CYLINDERS, TRACKS, RECORDS, or BLOCKS) are
specified at any level of DEFINE CLUSTER or DEFINE ALTERNATEINDEX,
they override any modeled defaults.
v You can model the USECLASS parameter only if one of the following is true:
– If space parameters (CYL, TRK, REC, BLK) are not specified
– If space parameters are specified at a different level
You cannot model USECLASS if both specifications, USECLASS and space
parameter, are at the same level (that is, both specifications are at cluster, data,
or index level). If you do specify the same level, VSE/VSAM cannot model from
a default model.
However, you can, for example, model the USECLASS at cluster level if space
parameters are specified at the data or the index level.
v You cannot rename (through ALTER NEWNAME or IMPORT NEWNAME) any
catalog entry such that the name is changed to or from DEFAULT.MODEL.xxxx.
An attempt to do so causes the command to terminate with an error message.
v When a file is defined implicitly (through managed-SAM access) and if you have
not provided volume information in an EXTENT statement, VSE/VSAM
attempts to construct a volume list of up to 16 volumes from the
DEFAULTVOLUMES parameter in a managed-SAM ESDS default model
(DEFAULT.MODEL.ESDS.SAM). No other parameters from the SAM ESDS
default model are used for an implicit define.
v When a VRDS has to be defined through a default model, and to indicate a
VRDS, you have to define the recordsize (a<m). If recordsize is not defined, an
RRDS is assumed.
v The use of this utility in a VSE/VSAM environment requires special
considerations, because both the volume VTOC and the catalog contain space
mapping information about the volume which has to be synchronized to insure
accessibility and to avoid damage to data.
Table 15 on page 64 lists the various DEFINE parameters and shows for each one
if it can be modeled explicitly with 'MODEL(entryname)' and implicitly with
'DEFAULT.MODEL.xxxx'.
(*) To implicitly model this parameter, the object must be defined with at least one password, and the master
catalog password must be specified in the CATALOG parameter.
Default Volumes
Default volume lists are derived from the volumes list of a default model that is of
the same type as the object defined. For example, if a VSE/VSAM ESDS cluster is
defined without a VOLUMES parameter, an ESDS default model
(DEFAULT.MODEL.ESDS.DATA) is used to build the volumes list for the ESDS.
Because volume selection from the default volume list is done randomly for every
component, the data and index components of a KSDS or AIX could reside on
different volumes and even different device types. You can eliminate the possibility
of different device types by including devices of only one type when defining the
KSDS or AIX model.
When a file is defined implicitly (through managed-SAM) and if you have not
provided volume information in an EXTENT statement, VSE/VSAM attempts to
construct a volumes list of up to 16 volumes from a managed-SAM ESDS default
model (DEFAULT.MODEL.ESDS.SAM). No other information is used (from the
SAM ESDS default model) for an implicit define.
These sources are listed in order of precedence. 1 overrides 2, and 3 takes effect if 1
and 2 are missing. If only 2 and 3 are present, however, specifying
DEFAULTVOLUMES causes the volumes list in 2 to be bypassed in favor of the
volumes list in 3. You cannot specify the DEFAULTVOLUMES parameter to bypass
2 if 3 does not exist. (At least one of these options (1, 2, or 3) must be specified or
modeled.)
The compression facility compresses and expands data using a dictionary. This
dictionary contains the information which substrings of the data are to be encoded
and how to expand the encoded strings. When data is loaded into a compressed
cluster, VSE/VSAM attempts to build a dictionary that can compress that data. As
soon as this dictionary is built, all records written to the file are compressed using
this dictionary, and all records read from the file are expanded using this
dictionary. The information on what the dictionary looks like is stored in the
VSE/VSAM Compression Control Data Set (CCDS), which needs to exist in each
catalog that holds compressed data sets.
Advantages
Working with compressed files has several advantages. The reduction in DASD
space is the most obvious one, but not the only one:
v Since records in a compressed file are smaller, the resulting relative byte address
(RBA) is smaller. While the maximum size of a VSE/VSAM data set (excluding
extended-addressed KSDS data sets) is still 4GB (x'FFFFFFFF'), more user data
can be stored within a single data set.
v More data can be stored per control interval or buffer. The advantages are:
– For sequential workloads, a new buffer is required less often. This reduces the
number of I/O requests.
– For random access workloads, the control interval size might be decreased,
which in turn might speed up the data transfer time.
Dictionary Creation
Unfortunately there is no dictionary that is able to compress all kinds of data
effectively. The dictionary is data-dependant and needs to be constructed by the
actual data, or, to be more precise, by a subset of data that should be
representative for the total data. On the other hand, the vast majority of data
would actually consists of certain elements that are likely to re-occur. Thinking of
an English text, such elements could be English suffices (-ion, -ing) or character
sequences such as a comma followed by a space. Of course there are many and not
just text-related elements that are likely to re-occur, and hence might be good
candidates for a compression. For each of these elements it is known how to
compress them, this information is contained in a data structure called dictionary
building block (DBB). Each DBB can be viewed as a small, very specialized
dictionary. VSE/VSAM has several hundred of them.
If the interrogation and sampling phase successfully ends with the creation of a
dictionary, then all records written subsequently to the file are compressed with
this dictionary. The dictionary remains associated ('mated') with the cluster for the
lifetime of the cluster.
The information about which DBBs make up the dictionary is stored in the CCDS.
Each record in the compression control data set identifies one compressed cluster
and holds information about the compression state of the cluster, and usually
which DBBs constitute the dictionary for the cluster.
Compression States
A compressed cluster always assumes one of four possible compression states, as
outlined in Figure 10. These states are reported in the LISTCAT output.
States Explanation
CMPPENDING
If a compressed cluster is newly defined by the IDCAMS command
DEFINE CLUSTER 1, nothing is known about the data that will be
loaded into it. When records are loaded into the file, VSE/VSAM
interrogates the data in order to create a dictionary for it.
CMP-ACTIVE
If VSE/VSAM has successfully determined how to compress the data 2,
the compression state changes to ACTIVE. From now on all records written
to the file are compressed.
CMP-REJECT
If VSE/VSAM cannot compress the data, the compression state is changed
to REJECTED 3. You can access a cluster in this state just like any other
compressed cluster; the only difference is that the records are not
compressed. Possible reasons for rejection are:
v The data is already in some compressed format.
v You closed the file before the interrogation phase completed, that is you
did not write enough data during the initial load mode.
CMP-UNDET
If the information how to compress and expand a cluster is lost 4, then
the compression state is undeterminable. In this case the compression
control data set might be deleted or become inaccessible.
Offset Hex
Dec Hex Bytes Digit Description
0 0 1 Flags
X'40' Record is compressed
1 1 2 Length of expanded record (nonspanned)
1 1 4 Length of expanded record (spanned)
1. The non-compressed part of the record. This applies only to files with a key, it
is the first part of the record, up to (and including) the prime key.
2. The compressed part of the record.
The "Define a New User Catalog" dialog of the z/VSE Interactive Interface defines
a CCDS for each newly defined catalog.
You can also define a CCDS manually using the IDCAMS DEFINE CLUSTER
command, as outlined below. Once the compression control data set is defined,
compressed clusters can be defined or restored.
// JOB DEFINE CLUSTER
// EXEC IDCAMS,SIZE=AUTO
DEFINE CLUSTER -
(NAME(VSAM.COMPRESS.CONTROL) - 1
VOLUME(volser) - 2
RECORDS(200 100) - 3
KEYS(44 0) -
RECSZ(128 500) -
SHR(4 4) - 4
NOREUSE -
) -
DATA (NAME(VSAM.COMPRESS.CONTROL.@D@)) -
INDEX(NAME(VSAM.COMPRESS.CONTROL.@I@)) -
CAT(catalog.id) 5
/*
/&
Explanation:
1 The name identifies this cluster as a compression control data set.
2 The compression control data set should reside on the same volume as the
catalog to which it is defined.
3 The compression control data set contains one record per compressed
The following types of data sets cannot be defined with the COMPRESSED
attribute:
v Alternate index files
v Relative Record Data Sets (RRDS)
If you would like to use VSE/VSAM data compression with your existing
relative record data sets, you could attempt the following approach: change the
DEFINE CLUSTER for the RRDS to specify a maximum record size that is larger
than the average record size. This actually defines a VRDS rather than a RRDS,
but the VRDS is eligible for data compression and offers a user interface that is
almost identical to the user interface of a RRDS.
v SAM ESDS files
v ESDS files defined for use as virtual tapes.
Restrictions
The following restrictions apply to compressed data sets:
1. In a compressed file, you cannot update existing records using addressed access
(RPL OPTCD=ADR). This implies that records of an entry-sequenced file
cannot be replaced.
2. An application must not compute record positions (RBA) itself. Rather use
SHOWCB RPL=...,FIELDS=(RBA),... instead.
3. A compressed file cannot be opened in control interval mode (MACRF=CNV in
the ACB), except if the ACB also specifies MACRF=CMP. In this case all data
passed to the application and expected from the application is in compressed
(not expanded) format.
A measure for compressibility is the compression ratio, which is the ratio of the
length of the data in uncompressed format to the length in compressed format.
IKQCPRED can compute the anticipated compression ratio for one or more data
sets residing in the same VSE/VSAM catalog on a z/VSE or VSE/ESA Version 2
system.
Using IKQPRED
Invoke IKQCPRED with the following JCL statement:
(1)
'catalog_id/cluster_specification '
/LIMIT=m
Notes:
1 The last or only character of cluster_specification can be the wild-card character
*, indicating all clusters with a matching name up to the asterisk.
The parameters for IKQCPRED are specified on the PARM parameter of the
EXEC IKQCPRED statement, and are separated by slashes(/):
v The first parameter is the target catalog name. This is mandatory, and must be
fully qualified.
v The second parameter is the cluster specification. You can specify cluster names
generically with an asterisk (*). IKQCPRED can process up to 400 clusters.
v The third, optional parameter LIMIT=m, where m is an integer greater than 0,
specifies an upper limit (in megabytes) to the amount of data to be examined
per cluster.
Where m is 0, no upper limit is set, and each cluster is examined completely.
IKQCPRED Examples
Here are some typical uses for IKQCPRED, with examples of the control
statements you could use, and a short description of what these statements would
result in:
v Examine all files in a catalog
Method of Operation
IKQCPRED works internally in three phases:
1. IKQCPRED searches the specified catalog, and selects all cluster entries
matching the specification on the PARM statement.
2. Clusters with inappropriate data-set attributes, such as NOCIFORMAT files
(VSE libraries), are excluded from examination.
3. Each of the remaining data sets is opened, and each record fed into the
VSE/VSAM data compression routines for interrogation and compression. The
process ends at the end of a data set, or when the threshold specified in
LIMIT=m is exceeded.
The length of time required for this step depends on the amount of data to be
scanned.
IKQCPRED prints the results for each examined cluster to SYSLST. The output is
described in “Interpreting IKQCPRED Results.”
// EXEC IKQCPRED,PARM=’VSESP.USER.CATALOG/TST.*/LIMIT=5’
Cluster Name Type CmpStatus Ratio AvgLRECL # Records Open FDBK Close (HU-)RBA
TST.KSDS1 KSDS CmpActive 1.38 256 3949 00/00 000000 00/00 0024C000
TST.SAM.ESDS1 SAMESDS CmpActive 7.88 256 12067 00/00 000000 00/00 0035E000
TST.ESDS1 ESDS CmpActive 1.01 256 300 00/00 000000 00/00 00015800
TST.ESDS2 ESDS CmpActive 7.42 256 12067 00/00 000000 00/00 0035E000
TST.ESDS3 ESDS-CMP CmpActive 8.69 256 12107 00/00 000000 00/00 00056000
TST.ESDS4 ESDS CmpReject .92 80 875 00/00 000000 00/00 00011800
TST.KSDS2 KSDS-CMP CmpActive 1.30 256 1236 00/00 000000 00/00 00150000
TST.SAM.ESDS.IMPLICIT SAMESDS CmpActive 2.69 256 120 00/00 000000 00/00 00009000
TST.VRDS VRDS CmpActive 12.36 256 * 00/00 000000 00/00 00E38000
Message IKQ5000I tells you which catalog was examined. Message IKQ5003I, as
shown in the example, states that the processor supports the CMPSC instruction
(hardware data compression).
If the processor does not support this instruction, you will see the message:
IKQ50004I This processor does not support hardware data compression
This indicates that software emulation has been used instead of hardware data
compression. Performance is slower than on a processor that supports hardware
data compression.
The results of the data compression prediction tool, arranged into several columns,
show:
Cluster Name
The names of the clusters that were examined. Only cluster entries can be
examined; other objects, such as AIXs, are not eligible for VSE/VSAM data
compression.
Type The type of the data set being examined. The following types may appear:
Type Remarks
ESDS Entry sequenced (flat) file. ESDS files are eligible for VSE/VSAM
data compression, but with one restriction: Existing records must
not be updated. When you have compressed an ESDS, you can
only append new records to it.
KSDS Key sequenced (indexed) file. Only the part of the record following
the prime key can be compressed, and only if it has a length of at
least 40 bytes. Consequently, placing the key near the beginning of
the record allows optimum compression.
RSDS Relative record (numbered) file. RSDS files are NOT eligible for
VSE/VSAM data compression. IKQCPRED examines them because
it might be possible to define them as VRDS files, which can be
compressed.
SAMESDS
CIFORMAT SAM file in VSE/VSAM managed space. SAMESDS
files are NOT eligible for VSE/VSAM data compression.
The larger the value of Ratio, the better the file will compress. In other
words, the file is expected to shrink to 1/Ratio of the size of the
uncompressed file.
Because of rounding effects and the way the records happen to fit into the
control intervals, the computed compression ratio may differ from the
compression ratio that could actually be achieved. However, this effect
should be significant only for SPANNED data sets with relatively short
records. Each record in a spanned data set begins in a new control interval.
AvgLRECL
The average record length of the file. This is the actual average record
length, not the value specified on the DEFINE CLUSTER command.
# Records
The number of records in the data set. This column shows an asterisk (*) if
data interrogation ended at the threshold specified by LIMIT=m.
Open The VSE/VSAM return and reason code, if an OPEN error occurred. It
would be normal to see some errors in this column. For example, 08/6E
would indicate that this cluster is empty, or 08/A8 would indicate that the
cluster cannot be opened because it has been opened from another
partition.
FDBK The VSE/VSAM feedback information, if a record management error
occurred while reading the data set. Under certain circumstances, record
management errors can be tolerated when processing SAM files in
VSE/VSAM managed space. This is the case when, for example, the SAM
files have been written using non-VSAM (that is, DTFSD) access.
Close The VSE/VSAM return and reason codes, if a CLOSE error occurred
(HU-)RBA
This column normally shows the hexadecimal number of bytes in the
high-used-RBA of the data set. However, if a record management error
occurred, it shows the current RBA for which the error indicated in the
FDBK column was posted.
The IKQCPRED return code is the highest return code encountered during
processing. If, for example, one or more data sets could not be examined because
they were empty, the return code would be 4.
IBM System Storage® DS8000® / DS6000™ 64K cylinder support: z/VSE 4.1 is
designed to exploit the Large Volume Support (LVS) of IBM System Storage
DS8000, DS6000, and TotalStorage ESS. z/VSE 4.1 will support disks that are
defined as 3390 ECKD with a size of up to 64K cylinders.
If you try to define a VSE/VSAM catalog or space on a DASD volume that exceeds
the limit of 10017 cylinders without the parameter FATDASD, then you will receive
the following message:
IDC0055I VOLUME SPACE EXCEEDS MAXIMUM VSAM CAPABILITY. MAXIMUM WILL BE USED.
BIG-DASD implementation does not change the mapping of free and used tracks
of the space map in the catalog. However, using BIG-DASD, the number of space
map segments and catalog records used will increase. One catalog record can hold
one segment of the space map, which describes 3520 tracks. For Small DASD, the
maximum number of space map segments is 19 (this means that 19 catalog records
are required to map 65535 tracks on one disk). For the IBM 3390 Model 9, which
has 10017 cylinders and 150255 tracks, the catalog will map the tracks of this disk
device type with 43 catalog records.
FAT-DASD implementation does change the mapping of free and used tracks of
the space map in the catalog. One catalog record can hold one segment of the
space map, which describes 3520 cylinders instead of tracks.
The above commands internally check the disk capacity. They use either:
v The "Small DASD" model: using up to 65535 tracks of the disk (the support
prior to Large DASD) when:
– the disk has up to 65535 tracks, or
– the current catalog owns VSAM space on this disk and it was defined before
VSE/ESA 2.6.
v The "Large DASD" model:
– BIG-DASD uses up to 10017 cylinders of the disk, when the disk has more
than 65535 tracks, and the current catalog does not own VSAM space on that
disk, that was defined before VSE/ESA 2.6.
– FAT-DASD: uses up to 65520 cylinders of the disk, when the disk has more
than 65535 tracks, the parameter FATDASD is explicitly specified and the
current catalog does not own VSAM space on that disk, that was defined
before z/VSE 4.1.
For an IBM 3390-9 or other Large DASD, this means that either:
v VSAM space was already allocated on this disk for the current catalog from a
previous VSE/ESA release. The disk will therefore not have Large DASD
support, and will only be supported as a “64K track disk”.
v Space was not used by VSE/VSAM before VSE/ESA 2.6. The disk will therefore
have Large DASD support, and in addition to the “Large DASD” in the Catalog
Volume Record, a new flag bit will indicate a “FAT DASD” and the volume (up
to 64K cylinders) could be used by VSAM.
Any file defined with IMBED option cannot be restored to or defined on a Large
DASD.
If you want to use files that have been defined with a CI size of 512 on a Large
DASD, you must follow these general steps:
1. Restore the files that have a CI size of 512, to a previously supported Small
DASD type. You use the IDCAMS RESTORE command to do this.
2. Export the files from the previously supported Small DASD type using the
IDCAMS EXPORT command.
3. Import the files to a Large DASD using the IDCAMS IMPORT command.
For further details about using the above IDCAMS commands, refer to VSE/VSAM
Commands, SC33-8315.
Where possible, a VSE/VSAM KSDS on a Large DASD will have a control area
size of one cylinder. Primary and secondary allocations are rounded up to cylinder
multiples and cylinder boundaries, even if they have been defined as TRACKS or
RECORDS. To also get a control area size of one cylinder for long keys (up to 255
bytes), VSE/VSAM calculates the minimum data control interval size (CI size) of a
KSDS and increases it where required. The following key lengths require the
following minimum control interval sizes:
Table 16. Minimum CI Sizes Depending on Key Length
Key Length in Bytes Minimum CI Size
7 - 35 1024
36 - 55 2048
> 55 4096
BUFFERSPACE Parameter
The BUFFERSPACE parameter could force a smaller data control area size, and
must have a size that is at least two data control intervals plus one index control
interval. It is recommended not to use this parameter with DEFINE CLUSTER.
Large DASD support ensures that the BUFFERSPACE parameter will not reduce
the CA size.
User-written programs use VSE's existing Fixed Block Architecture (FBA) support
(512 byte blocks) to access SCSI disks. User programs cannot use SCSI commands
directly. z/VSE 3.1 is designed to support SCSI disk volume sizes from 8 MB to 24
GB. Because z/VSE itself uses the first 4 MB for internal purposes, the available
user space is equal to the defined size of the disk minus 4 MB. z/VSE 3.1 limits
VSE/VSAM to the first 16 GB of any SCSI volume.
z/VSE SCSI-FCP disk support complements SCSI support in z/VM® Version 5 and
Linux for zSeries. The individual z/VSE maximum SCSI volume size limits do not
apply to z/VM minidisks backed by SCSI disks. When operating as a guest under
z/VM (using SCSI disks not directly attached to z/VSE), z/VM presents SCSI
disks as 9336-20 FBA disks. In this case, z/VSE sees them as FBA, not SCSI disks.
The maximum size of a z/VSE 3.1 FBA volume is 2 GB. Of course, multiple 2 GB
minidisks can be assigned within the limits of a single physical SCSI disk volume
controlled by z/VM. For SCSI disks directly attached to z/VSE under z/VM, the
normal z/VSE limits described above apply.
Technical Considerations
VSE/VSAM extends the existing FBA logic to support SCSI disks. VSAM
implements a SCSI disk as a generic FBA device and uses its own "virtual
characteristics" for mapping and building channel programs for optimized VSAM
performance and space utilization.
Except as noted, all commands, parameters, and requirements for FBA devices are
valid for SCSI as well.
Several FBA configurations are supported. The generic FBA model is used to:
v simulate an FBA device in virtual storage; for example, the user can defined in
CP:
CP DEF VFB-512 AS 152 BLK 100000
This virtual disk will be presented to the user under VSE as an FBA disk after
the initialization with ICKDSF:
volume 152
AR 0015 CUU CODE DEV.-TYP VOLID USAGE SHARED STATUS CAPACITY
AR 0015 152 90 9336-10 FBA001 UNUSED 99960 BLK
AR 0015 1I40I READY
v access a VM minidisk (as part of a real SCSI device). VSAM can address only 2
GB. (z/VM 5.1 and later releases allows defining VM FBA minidisks with a
larger size, but VSE/VSAM can only handle a 2 GB FBA disk in this case.)
The nature of this 2 GB limit can be explained as follows: VSE/VSAM supports
so-called Generic FBA Devices with a virtual FBA disk device characteristic of 64
FBA blocks per track and 15 tracks per cylinder, that is: 960 FBA blocks per
cylinder = 4,194,240 bytes per cylinder.
A space map in the catalog maps each track of a particular disk device with 1 bit
(0 = track used, 1 = track free). Additional catalog fields and control blocks map
the number of tracks and the start/end track of data spaces and data set extents
in 2-byte-fields, which limits the maximum capacity of one DASD device to
X'FFFF' = 65,535 tracks (64K - 1).
Therefore, the current maximum FBA disk capacity is 65,535 tracks * 64 FBA
blocks = 4,194,240 FBA blocks = 2,147,450,880 bytes = 2 gigabytes.
v directly access the SCSI device as an FBA-SCSI device (via FCP). The limit for an
FBA-SCSI device is 24 GB, and VSAM can use up to 16 GB on this device by
using a different device model (different min-CA and max-CA) as shown in the
following table:
The new device model for SCSI significantly improves the performance (due to
fewer CI/CA splits, for example) but requires the system programmers to review,
re-calculate, and possibly adapt the space definitions of the JCLs (for example, the
minimum size for a catalog (6 min-CAs) and the size for space sub-allocation are
different).
Restrictions
The following notes and restrictions apply to VSAM structures on SCSI disks:
v The minimum CA (min CA) is 512 blocks, which implies that the minimum file
size for VSAM on such a device is 512 blocks. Space specifications will be
rounded up to a multiple of 512 blocks (for example, 10000000 blocks will
effectively become 10000384).
Note: Due to different rounding values (different min CA values on FBA and
SCSI), it is not guaranteed that the same JCLs will run on generic FBA and SCSI
devices.
v The absolute minimum space specified for primary allocation is 2561 blocks,
which is rounded to 3072.
v If the ORIGIN option is used during cluster definition, the minimum specified
must be 3072, because rounding will not be performed in this case.
v The maximum CA (max CA) on a SCSI disk is 30720 (60*512) blocks, i.e., the
min CA per max CA is 60.
v Any cluster defined in blocks with a key length >38 requires a minimum CISIZE
of 1024.
v If no key length is specified, the default will be used, which in most cases is 64.
In this case, any cluster definition with a CISIZE of 512 (smallest possible value
under VSAM) will be rejected by VSAM with a corresponding error code
v Migration to any cluster defined on a SCSI device must be done using REPRO
or EXPORT/IMPORT. The use of IDCAMS BACKUP/RESTORE is not
recommended for long-term recovery or data migration and is not supported.
v VSAM data can be transferred to SCSI using IDCAMS BACKUP/RESTORE. For
certain files that cannot be restored with IDCAMS RESTORE because of file
definition restrictions for SCSI, IDCAMS REPRO should be used. This includes,
but is not limited to, all files defined with the SPANNED option and some files
defined with very small allocations or CI sizes.
v The parameters IMBED, REPLICATE, and RECOVERABLE are no longer
supported and are either ignored or rejected with an error message.
Migration of older clusters defined with any of these options should be
performed using IDCAMS REPRO.
v The entire SCSI device can be made available to VSAM if SPACE is defined with
option DEDICATE. Otherwise, up to X'FFFFFF' (16,777,215) blocks can be
specifed (this is the same restriction as for the current RECORDS parameter).
v The hardware architecture of Large DASD and SCSI devices imposes minimum
allocation requirements in VSAM device support (1 cylinder, 512 block minimum
CA size).
VSAM detects and reports the SCSI disk as device type 'FBA' on LISTCAT output:
CHARACTERISTICS
BLKS/MIN-CA----------512 DEVTYPE---------FBA
BLKS/MAX-CA--------30720 VOLUME-TIMESTAMP:
Virtual Tapes
Local virtual tapes are implemented as standard VSAM ESDS files. One restriction,
however, is that they must not be compressed. Information on using virtual tapes
is provided in z/VSE Planning, SC34-2635.
For an outline on file statistics that are available to you for evaluating possible
performance improvements, refer to “Performance Measurement” on page 123.
Most of the options are specified in the IDCAMS command DEFINE when creating
a file, and in the VSE/VSAM macros ACB and GENCB when a processing
program prepares to open a file.
Because of the great number of variables, not everything presented in this chapter
is true for all installations and under all conditions.
A large number of files in a single catalog (for example, a thousand files) can
significantly increase the run time for most IDCAMS functions. This includes
DEFINE, DELETE, and LISTCAT functions. It also impacts open and close
performance.
The exact number of files at which the impact on performance becomes noticeable
depends on several factors (for example, DASD access speed and file name
pattern). As the number of files in a single catalog increases, you should carefully
monitor the performance of the indicated IDCAMS functions.
After you have assigned a value to a data space, you can request that it will be
available for suballocation to an alternate index or cluster (or their components).
Make the request in the USECLASS parameter of the command DEFINE
CLUSTER, DEFINE ALTERNATEINDEX, or IMPORT.
Figure 12 illustrates the classification of data space and the use of classified data
space.
DEFINE CLUSTER(-
NAME(CLUST1)-
VOLUME (222222)-
.
.
.
Explanation:
1. Class─1 data space defined
2. Class─7 data space defined
3. Class─1 data space suballocated to the data component of CLUST1
The definition of VSE/VSAM catalogs involves the implicit allocation of data space
and the suballocation of some (or all) of that data space to the catalog itself.
Because of this, you need only specify the CLASS parameter if you want to assign
a catalog's data space to a certain performance class. You do not have the option of
specifying the USECLASS parameter. The catalog is automatically suballocated
from the same data space and the same performance class.
You can request a new class through the USECLASS parameter in the IMPORT
command when an object is implicitly defined through this command.
For the DEFINE command, you must specify USECLASS concurrently (at the same
level) with the space parameters (TRACKS, BLOCKS, and so on). For example, if
you specify USECLASS in DEFINE CLUSTER at the data level, you must also
specify CYLINDERS, TRACKS, BLOCKS, or RECORDS at the data level. If you do
not do so, the USECLASS specification will be ineffective. The following are the
three possible combinations of levels at which space may be specified for DEFINE
CLUSTER or DEFINE ALTERNATEINDEX:
(a) Cluster level only or alternate index level only
(b) Data component level only
(c) Data component and index component levels
Therefore, these are also the levels that are effective for USECLASS.
In case (a), the USECLASS specified (or defaulted to) is also applied to the data
and index components.
In case (b), the USECLASS specified, defaulted to, or modeled for the data
component level is also applied to the index component level. This permits you to
apply the same class of data space to both components while leaving the
calculation of the index allocation to VSE/VSAM.
In case (c), the data and index components may be assigned (or modeled or
defaulted) to a separate or to the same class of data space, depending on the
values chosen.
For FBA devices, however, the terms tracks and cylinders (as used for CKD) are not
meaningful, because FBA devices store data on fixed-size blocks (where the blocks
are not associated with tracks or cylinders).
The terms of minimum CA and maximum CA, however, are common to both CKD
and FBA devices.
For applicable values for the various IBM CKD and FBA devices, refer to Table 18
on page 89 and Table 19 on page 90.
Performance Implications
In the case of a key-sequenced file, the size of a CA can affect the size of the CI of
the index component. If there is not enough room for index entries in the sequence
set record, VSE/VSAM increases the CI size to accommodate more entries.
IDCAMS checks the smaller of the primary and secondary space values against the
maximum CA (cylinder) size of the specified device. If the smaller space quantity
is less than or equal to the device's maximum CA (cylinder) size, the size of the
CA is set equal to the smaller space quantity. If the smaller space quantity is
greater than the device's maximum CA (cylinder) size, the CA size is set equal to
the maximum CA (cylinder) size.
You specify space in number of tracks, cylinders, blocks, or records; the system
then preformats space in CAs (except for DEFINE CLUSTER/AIX SPEED). By
calculating the size of a CA as it does, IDCAMS is able to meet your primary and
secondary space requirements without over committing space for this file.
An index record must be large enough to address all of the CIs in a CA. The more
CIs an index record addresses, the fewer reads for index records are required for
sequential access. Generally, the greater the size of the CA, the better the
performance and space utilization.
VSE/VSAM treats the IBM 3995 Model 151 Optical Library Dataserver as an IBM 3390
Model 2 direct access storage device.
Table 19 on page 90 lists values for minimum and maximum CA, and 512-byte
blocks for IBM FBA devices.
Table 19. Disk Storage Sizes for IBM FBA (and SCSI) Devices
IBM FBA Max CA per Min CA per Blocks* per Blocks* per
Device Volume Max CA Min CA Max CA Total Blocks
0671 See (1) 8 63 504 See (1)
3370-1 750 12 62 744 558,000
3370-1 958 712,752
9332-1 (2) 1,233 4 73 292 360,036
9332-2 (3) 1,900 4 73 554,817
9335 1,890 6 71 426 805,140
Other FBA (4) See (1) 15 64 960 See (1)
SCSI (5) See (1) 60 512 30720 See (1)
Note:
1. Configuration or device dependent.
2. Models 200, 400, 402.
3. Models 300, 600, 602.
4. For example, IBM 9336 and virtual disk.
5. Appears as device type FBA.
(*) 1 block = 512 bytes.
How to Specify
You can let IDCAMS select the size of a CI for a data or index component, or you
can specify CI size in the DEFINE command. CI size should be specified at both
DATA and INDEX levels. If the CI size is specified at the CLUSTER or
ALTERNATEINDEX level, this size applies to the data component and also to the
index component.
The CI size you specify is checked for being within acceptable limits. IDCAMS tries
to modify an unacceptable value. If it cannot, the DEFINE fails. If you specify a CI
size that is not a proper multiple, IDCAMS increases it to the next multiple. For
example, 2050 is increased to 2560.
Figure 13 on page 92 shows how VSE/VSAM computes physical block size, using
DEFINE attributes and device type. The following explains the numbers shown in
the figure:
1. Maximum record size can be specified as 1 through 32761; the default is 4089
bytes.
2. The CONTROLINTERVAL size of the data component can be specified as 512
through 32768; the default is:
v 2048 bytes if RECORDSIZE is specified
v 4096 bytes if RECORDSIZE is not specified
3. The control area size chosen by VSE/VSAM is never larger than one max CA
(cylinder).
4. BUFFERSPACE(size) must provide enough space to accommodate:
v two control intervals, and
v one index control interval if the file is key-sequenced.
This is also the default. If you specify less than the default, the command is
terminated.
5. The physical block size chosen by VSE/VSAM depends on the device type that
is being used, and on the size of the control interval. The physical block size
chosen by VSE/VSAM is:
v For CKD devices:
– 512 bytes up to 8,192 bytes
– 2048 bytes from 8,193 bytes to 30,720 bytes
v For FBA devices: always 512 bytes.
v1 v2 v3
RECORDSIZE CONTROLINTERVALSIZE
(average,maximum) (size) Control Area Size
BUFFERSPACE
(size) Device Type
(4) (5)
For nonspanned records, the CI must be at least seven bytes larger than the largest
record in the data component.
For spanned records, the CI must be at least ten bytes larger than the average
record in the data component.
CI size affects space utilization because of the way VSE/VSAM chooses physical
block sizes on CKD devices. (There are no similar considerations for FBA devices.)
For a given CI size, VSE/VSAM chooses the physical block size that results in the
most efficient use of track capacity.
Note: A file with a data physical block size or index CI size other than .5, 1, 2, or
4KB cannot be directly processed by MVS. (File portability between VSE/VSAM
and MVS via EXPORT/IMPORT is not impacted by data physical block size, but it
does require an MVS-compatible CI size.)
Table 20 shows the physical block size that VSE/VSAM uses for a data CI, and the
number of KB (kilobyte) of user data that can be accommodated on the track (the
values depend on the specified CI size and the device that is used). For example,
given a CI size of 6KB on a 3380, VSE/VSAM chooses a physical block size of 6KB
that results in 42KB (plus overhead) of data on a 43008-byte track.
VSE/VSAM treats the IBM 3995 Model 151 Optical Library Dataserver as an IBM
3390 Model 2 direct access storage device.
Table 20. Relationship of CI Size to Physical Block Size for Data Component
Physical Block Size (in KB) Track Space Used (in KB)
CI Size 3375 3380 3390 9345 3375 3380 3390 9345
0.5 0.5 0.5 0.5 0.5 20 23 24.5 20.5
1 1 1 1 1 25 31 33 28
1.5 1.5 1.5 1.5 1.5 27 34.5 39 31.5
2 2 2 2 2 28 36 42 34
2.5 2.5 2.5 2.5 2.5 30 37.5 42.5 35
3 3 3 3 3 30 39 45 36
3.5 3.5 3.5 3.5 3.5 31.5 38.5 45.5 38.5
4 4 4 4 4 32 40 48 40
4.5 4.5 4.5 4.5 4.5 31.5 40.5 45 36
5 5 5 5 5 30 40 45 40
5.5 5.5 5.5 5.5 5.5 27.5 38.5 49.5 38.5
6 6 6 6 6 30 42 48 36
6.5 6.5 6.5 6.5 6.5 32.5 39 45.5 39
7 3.5 7 7 7 31.5 42 49 42
7.5 7.5 7.5 7.5 7.5 30 37.5 45 37.5
8 8 8 8 8 32 40 48 40
10 5 10 10 10 30 40 50 40
12 4 6 12 4 32 42 48 40
14 3.5 14 7 14 31.5 42 49 42
16 16 8 16 8 32 40 48 40
18 4.5 6 18 18 31.5 42 54 36
20 4 20 10 20 32 40 50 40
22 2 22 5.5 22 28 44 49.5 44
24 8 6 24 8 32 42 48 40
26 6.5 6.5 26 6.5 32.5 39 52 39
28 4 14 7 14 32 42 49 42
30 7.5 6 10 10 30 42 50 40
32 16 8 16 8 32 40 48 40
Performance Considerations
For performance improvement, consider the following rules.
v The larger the data CI, the better the sequential performance. EXPORT and
IMPORT are sequential applications.
v As the size of your nonspanned data records increases, you may need larger data
CIs.
v As data and index CI size increases and record size remains unchanged, more
buffer space is required in storage for every CI.
v Free space will probably be used more efficiently as data CI size increases
relative to data record size, especially with variable-length records.
Free space in a nonspanned data CI is not used if there is not enough free space
for a complete data record. In any event, free space in the last CI of a spanned
record is never used for any other record, even if there is room enough to hold a
complete data record.
v Direct processing is less sensitive to data CI size. But smaller data CIs generally
improve performance.
v When you process input that already has been sorted, on the other hand, large
data CIs may be better.
v If you have a choice between a large index CI or a large data CI for direct
processing, choose the combination that yields the smallest buffer space value.
This combination needs the least active storage and the least data transfer time.
IDCAMS might adjust your specifications. To find the values actually set in a
defined file, you can issue the IDCAMS LISTCAT command or, while your
program is executed, the SHOWCB macro.
Considerations
Generally, you should specify the smallest index CI size that still is adequate.
You may want to specify the smallest value, that is 512. To find out if a 512-byte
index CI size is adequate, do the following experiment:
v Use your chosen data CI size and a 512-byte index CI.
v Do not allow free space.
v Load enough records to equal one CA.
v At the end of the run, perform a LISTCAT.
If there is only one level of index, a 512-byte index CI is large enough. For n
CAs, there should be two levels of index with the number of index CIs equal to
n + 1.
A smaller data CI may require a large index CI. The sequence set index CI contains
pointers to the data CIs in a CA. If the data CI is made smaller (when the CA stays
the same size), there will be more data CIs per CA, and therefore more entries in
the sequence set. As an example, assume a one cylinder CA size on an IBM 3380.
Using 4096-byte data CIs, one CA can contain 150 data CIs. If the data CI size were
changed to 1024 bytes, the CA could contain 465 data CIs. The sequence set would
now require 465 pointers instead of 150.
where:
v DCI = number of data CIs per CA
v AES = average entry size:
If the result of the calculation is an odd value, VSE/VSAM rounds it to the next
higher even value.
After IDCAMS determines the number of CIs in a CA (see “Control Area (CA)
Size” on page 88), it estimates whether one index CI is large enough to handle all
of the data CIs in a CA. If the index CI is not large enough, its size is increased, if
possible. If not possible, the number of CIs in a CA is decreased. This calculation
may result in IDCAMS overriding the specified index CI size. For example, for a
file without an index, if CI size space is not specified and the maximum record
size is specified to be 200 bytes, IDCAMS sets the data CI size to 2048 bytes. For a
key-sequenced file, IDCAMS additionally sets the index CI size to 512 bytes.
If spanning is not specified and the maximum data record size specified in
RECORDSIZE is 2500 bytes, and 2500 is also specified for the data CI size, the
system adjusts the 2500-byte CI size to the next higher multiple of 512: 2560.
Key Compression
The following information relates to the KEYRANGES parameter/subparameter of
the IDCAMS commands DEFINE and IMPORT.
VSE/VSAM increases the number of entries that an index record can hold by key
compression. Compression makes an index smaller by reducing the size of the keys
in the index entries. VSE/VSAM eliminates from the front and back of a key those
characters that are not needed to distinguish it from the adjacent keys. For
example, the keys in the sequence 1110, 1230, 1450 would compress to 11, 23, 45
respectively.
Front compression works best when the keys of the last records of every CI run in a
series (for example, 100, 101, 102, 106). When several high keys have the same
leading characters, those characters can be compressed.
Rear compression works best when adjacent keys have large differences at the back
of the key.
If keys compress poorly, more room is required in the index CI to store the
compressed key. The index CI may be too small for the data. If it is too small,
more CAs are needed. When VSE/VSAM has no more room to insert compressed
keys from the data CIs into the index CI, it continues to load data into the next
CA, using its associated sequence set CI. The previous CA contain fewer “filled”
data CIs than if the index CI had been adequate.
Single field keys do compress well. Larger keys (20 - 30 bytes) can compress to 8 or
9 bytes (including control information). Smaller keys (5 - 15 bytes) can compress to
3 - 5 bytes (including control information).
If you do not specify buffer space, VSE/VSAM allocates buffer space for two data
CIs and (if the file is indexed) one index CI. You may not specify less space, but to
optimize performance, you may want to provide additional buffer space.
Considerations
Sequential Processing
Increasing the space to hold three or more data CIs generally improves
performance due to I/O command chaining. More than four or five data buffers
may cause excessive paging.
If there is an index component, the buffer space must be large enough to hold an
index CI also.
Direct Processing
Any remaining buffer space beyond that required for two data CIs is used for
index CIs. To optimize performance, specify enough buffer space to accommodate
one index CI for every level of index. If the index CI size or the number of index
levels is not known, specify 2KB of buffer space for the index (default
BUFFERSPACE, which rounds to a 2KB boundary, may in some cases accomplish
this for you), and check the result with LISTCAT output. Make adjustments with
ALTER, if necessary.
Buffer Specification
You can specify buffer space through the:
v IDCAMS command DEFINE,
v ACB macro, or
v // DLBL statement.
The buffer space entry in the catalog was either specified or defaulted to when the
cluster was defined or modified with the ALTER command.
To use the ACB buffer space, the value selected must be larger than the catalog
entry buffer space. The use of ACB parameters is explained under “Buffer
Allocation” on page 98.
If STRNO = 2 (that is, you require concurrent file positioning), the minimum buffer
space required for output is three data CIs and two index CIs.
Examples
1. Specifying Buffer Space
You can specify buffer space through the use of the // DLBL statement:
// DLBL filename,’file-ID’,,VSAM,BUFSP=size
To be effective, the value specified for the DLBL buffer space must be larger
than the catalog entry buffer space.
VSE/VSAM rounds the buffer space value (obtained from the DLBL, ACB, or
DEFINE) so that it is a multiple of either the index CI size or the data CI size,
whichever is smaller.
If the amount of buffer space specified is greater than the minimum required,
VSE/VSAM uses the remainder for additional index buffers (direct processing)
or additional data buffers (sequential or skip sequential processing).
2. Specifying Number of Buffers
You can specify the number of buffers through the use of the // DLBL
statement:
// DLBL filename,’file-ID’,,VSAM,BUFND=m,BUFNI=n
Note that BUFND and BUFNI represent the total number of buffers,
independent of the number of strings. That is, if the value for BUFND,
respectively BUFNI, is lower than the required minimum, the default values are
used.
Buffer Allocation
The following explains how VSE/VSAM allocates buffer space according to ACB
specification. The following ACB parameters relate to buffer allocation:
ACB MACRF=(IN│OUT,SEQ│DIR│SKP)
STRNO=n
BUFSP=n
BUFND=n
BUFNI=n
If you specify:
MACRF=(...,IN,...)
If you specify:
MACRF=(...,OUT,...)
Index Buffers
If the number of index buffers is the greater of BUFNI or STRNO, then OPEN
calculates the remainder as follows:
Remainder = BUFSP - ((NDB*DCI) + (NIB*ICI))
Note that you get no indication if the BUFSP used for the minimum allocation is
greater than that specified in DEFINE, DLBL, or ACB.
If Remainder > 0
1. MACRF=(...,SEQ,OUT,...)
VSE/VSAM allocates data buffers until there is a remainder that is less than the
data CI size; then it allocates more index buffers. (This is only possible when
the index CI size is less than the data CI size. If the index CI size is larger, see
item 2 below.)
Example:
BUFSP=13824
data CI size=4096
index CI size=512
STRNO=1
MACRF=(...,SEQ,OUT,...)
2. MACRF=(...,DIR,OUT,...)
VSE/VSAM allocates more index buffers until there is a remainder that is less
than the size of one index CI; then it allocates more data buffers. (This is
possible only when the data CI size is less than the index CI size.)
Example:
BUFSP=13824
data CI size=4096
index CI size=512
STRNO=1
MACRF=(...,DIR,OUT,...)
3. MACRF=(...,SEQ,DIR,OUT,...)
VSE/VSAM increases the number of index buffers to twice STRNO. (If this is
not possible, VSE/VSAM uses the procedure described in item 2 above.) If
there is still a remainder, VSE/VSAM uses the procedure described in item 1
above to allocate the remainder.
Example:
BUFSP=13824
data CI size=4096
index CI size=512
STRNO=1
MACRF=(...,SEQ,DIR,OUT,...)
If the path entry is not a member of the upgrade set, buffers are allocated in the
same manner as for a normal KSDS. Your ACB is used for the path entry.
If the path entry is a member of the upgrade set, then buffers are allocated as for a
normal KSDS, but minimum allocations are increased by one for both the number
of data buffers and the number of index buffers. Your ACB is used for the path
entry.
Buffer Allocation for Path Entry when the Base Cluster is a KSDS
Buffers are allocated in the same manner as for a normal KSDS with the following
ACB specifications:
BUFND=0
BUFNI=0
STRNO=number of strings specified in the ACB
You can influence buffer allocation only through the BUFFERSPACE parameter of
DEFINE CLUSTER or through DLBL BUFSP= ,BUFND= ,BUFNI=.
If you open the path for input only, the base cluster uses MACRF=(...,DIR,IN,...). If
you open the path for output, the base cluster uses MACRF=(...,DIR,OUT,...).
You can influence buffer allocation through the path DLBL BUFND=, BUFNI=. If
the base cluster is a KSDS, the minimum index buffer allocation is one buffer per
index level per string.
The buffer allocation is always two data buffers and one index buffer. You cannot
influence buffer allocation for the upgrade set.
For more information, refer to “Sharing Resources Among Files and Displaying
Catalog Information” on page 203.
v The path length does not depend upon the number of buffers (therefore the
search time is independent of the buffer pool size).
"Simple" in this case means that the values of this example were simplified to
decimal values (not hexadecimal) to give a better understanding of the technique.
1. Let us assume that we have an LSR pool with 10 buffers. The Hash Table will
have (2 * 10 -1) = 19 entries. Therefore:
DIM = 19
2. A VSAM GET operation reads a data record from a certain VSAM data set with
the internal data set identifications DSD1 and DSD2 into a data buffer.
Therefore:
DSID1 = 220, DSID2 = 32
The BCB pointing to that data buffer is at storage location '640000'. The RBA
(Relative Byte Address) of the VSAM data buffer is 800. Therefore:
RBA = 800
3. The hash algorithm X = remainder of (RBA/2 + DSID1/2 + DSID2/2) / DIM
therefore calculates the following index for the hash table:
(800/2 + 220/2 + 32/2) /19 = 27, remainder = 13 = X
"13" will be used as index into the hash table.
4. The BCB pointer '640000' will be stored in the 13th position of the hash table.
Chapter 7. Optimizing the Performance of VSE/VSAM 103
Performance: Buffer Space LSR
5. Whenever another request is searching for a data buffer with RBA 800 from this
certain dataset, the hash algorithm can calculate easily the index of 13 into the
hash table and use the BCB at address '640000' and its related data buffer
without a long pool search. This hashing technique also works, of course, with
very large buffer pools (for example, 32767 buffers).
Your processing program gets exclusive control of a buffer (CI) whenever you issue
a GET for update (RPL option OPTCD=UPD) to retrieve a record from that buffer.
You are responsible for preventing a deadlock by releasing as soon as possible the
buffer for which another request may be waiting. Two requests, for example, A and
B, may engage in four different contests:
1. A wants exclusive control, but B has exclusive control (OPTCD=UPD).
VSE/VSAM refuses A's request. A must either do without the data or retry its
request.
2. A wants exclusive control, but B has read-only access to the data
(OPTCD=NUP). VSE/VSAM gives A a separate copy of the data.
3. A wants read-only access to the data (NUP), but B has exclusive control.
VSE/VSAM refuses A's request. A must either do without the data or retry its
request.
4. A has read-only access to the data, and B has read-only access. VSE/VSAM
gives A a separate copy of the data.
Key Ranges
The records of a key-sequenced file, including alternate indexes, can be grouped on
volumes according to key ranges. A payroll file, for example, could have employee
records beginning with A, B, C, and D on one volume, with E, F, G, H, and I on a
second volume, and so on. Every portion of a multivolume file can be on a
separate volume. Every key range of a file, as well as the end of the file, is
preformatted. Multiple volume support is affected by the following DEFINE
parameters: VOLUMES, ORDERED│UNORDERED, CYLINDERS│RECORDS│
TRACKS│BLOCKS, and KEYRANGES.
The first allocation made on every volume is always the primary allocation.
Your CLASS specification in the DEFINE command can affect suballocation. For
further information, see “Data Space Classification” on page 86.
Space Allocation
Space Allocation without Key Range Specified
Primary space is acquired from the first volume at define time. If VSE/VSAM
needs more space during loading or processing of the file, and if secondary
allocation was specified, VSE/VSAM uses the secondary extents on the first
volume. When VSE/VSAM has acquired all the secondary space it can on the first
volume and still needs more space, then primary space from the second volume is
acquired, even if no secondary allocation was specified. If more space is needed,
secondary space is acquired on the second volume.
VSE/VSAM searches for space on volumes in the order they were specified in the
VOLUMES parameter. This does not mean that the volumes are allocated or
suballocated in that order. Allocation depends on whether ORDERED or
UNORDERED was specified.
UNORDERED means VSE/VSAM must find a primary allocation (or the DEFINE
command will fail), but not necessarily on the first volume listed in the VOLUMES
parameter. If there is no room for a primary allocation on the first volume,
successive volumes are checked for primary space.
UNORDERED means that VSE/VSAM must find room for a primary allocation for
every key range, but not necessarily the first key range on the first volume, the
second key range on the second volume, and so on.
Example 1
VOLUMES(A B C)
ORDERED
CYLINDERS(50 5)
SUBALLOCATION
50 50 50
*
5 5 5
*
*
5 5 5
Volume A is the primary volume; volumes B and C are overflow volumes. Fifty
cylinders of primary space must be available on volume A, or the DEFINE
command will fail.
If volume B has 50 cylinders for allocation (primary amount) and the file needs to
be extended further, secondary allocations are made from volume B. Volume B
must have enough space available of the required class. Otherwise, a 50-cylinder
allocation is made on volume C.
Example 2
VOLUMES(A B C)
UNORDERED
CYLINDERS(50 5)
SUBALLOCATION
A, B, or C A, B, or C A, B, or C
50 50 50
* *
5 5 5
*
5
Volumes are searched in the order they are specified. If both A and B have 50
cylinders available, allocation is made on A because it was specified first.
When the file is extended, VSE/VSAM attempts to make the 5-cylinder secondary
allocations on the same volume the primary allocation was made on. This
continues until all data space of the required class is used.
To further extend the file, VSE/VSAM searches the volumes for space in the same
order specified for primary allocation. If VSE/VSAM cannot acquire the primary
amount of space (50 cylinders), an error code is issued.
Example 3
VOLUMES(A B C)
KEYRANGES((00 30) (31 65) (66 99))
ORDERED
CYLINDERS(50 5)
SUBALLOCATION
00-30
31-65
00-30 31-65 66-99 66-99
A B C D
50 50 50 50
5 5 * 5 * 5
*
5 50 *
5 5
5
50
A primary allocation of 50 cylinders is made for every key range. The first key
range is on volume A, the second on volume B, the third on volume C. If 50
cylinders cannot be allocated on every volume, the DEFINE fails. The 5-cylinder
secondary allocations are made as needed.
Example 4
VOLUMES(A B)
KEYRANGES((00 30) (31 65) (66 99))
ORDERED
CYLINDERS(50 5)
SUBALLOCATION
31-65
00-30 66-99
A B
50 50
5 50
*
5 5
*
5
If only volumes A and B are specified, the first key range is allocated on volume A,
and the second and third key ranges are allocated on volume B. Volume A has one
50-cylinder primary allocation, and volume B has two 50-cylinder primary
allocations. This can occur only for a file with the SUBALLOCATION attribute
specified. If both UNIQUE and KEYRANGES are specified, every key range must
Example 5
VOLUMES(A B A)
KEYRANGES((00 30) (31 65) (66 99))
ORDERED
CYLINDERS(50 5)
SUBALLOCATION
00-30
66-99 31-65
A B
50 50
5 * 5
*
50 5
5 *
A primary allocation of 50 cylinders is made for every key range. The second key
range is on volume B; the first and third key ranges are on volume A. This can
occur only for a file with the SUBALLOCATION attributed specified. If both
UNIQUE and KEYRANGES are specified, every key range must reside on a
separate volume.
Example 6
VOLUMES(A B C)
KEYRANGES((00 30) (31 65) (66 99))
UNORDERED
CYLINDERS(50 5)
SUBALLOCATION
00-30
31-65
00-30 31-65 66-99 66-99
A, B, C, or D A, B, C, or D A, B, C, or D A, B, C, or D
50
50 50 50
5
*
5 5 * 5 50
* *
5 5 50
5
cylinders available, the first key range is put on volume B, and the second and
third key ranges are put on volume C. If neither A nor B has 50 cylinders, all three
key ranges are placed on volume C.
An Exercise
Assume that you have a 600-cylinder file that you want to have reside on two
volumes: 400 cylinders on volume A, and 200 cylinders on volume B. How would
you specify this allocation requirement in the DEFINE command?
Do not specify:
VOL(A B)
CYL(600)
Do not specify:
VOL(A B)
CYL(400,200)
This request would obtain 400 cylinders of primary allocation on volume A and
400 cylinders of primary allocation on volume B.
Do specify:
VOL(A B)
CYL(200,200)
The mounting requirements with multiple volumes are simple. All volumes must
be mounted (except with sequential KSDS, ESDS, and RRDS). A primary allocation
amount will be acquired on every volume.
Space Allocation
Possible Options
The CYLINDERS│RECORDS│TRACKS│BLOCKS parameters of the DEFINE
command determine how VSE/VSAM allocates space. You may specify allocation
at the CLUSTER/AIX level, DATA level, DATA and INDEX levels, and
CLUSTER/AIX and DATA levels. Considerations in choosing allocation parameters
are:
v If you specify allocation at the CLUSTER/AIX level only, the amount needed for
the index is subtracted from the specified amount. The remainder of the
specified amount is assigned to data.
v If you specify allocation at the DATA level only, the specified amount is assigned
to data. The amount needed for the index is in addition to the specified amount.
v If you specify allocation at both the DATA and INDEX levels, the specified data
amount is assigned to data, and the specified index amount is assigned to the
index.
v If you specify secondary allocation at the DATA level, secondary allocation must
be specified at the INDEX level unless you specify allocation at the CLUSTER
level.
v A CA can never cross an extent boundary. A cluster extent consists of a whole
number of CAs.
v A CA is never larger than one cylinder (CKD) or one maximum CA (FBA).
Optimum performance is obtained when an integral number of CAs occupy a
cylinder (or maximum CA).
v IDCAMS checks the smaller of primary and secondary space allocation values
against the specified device's cylinder (or maximum CA for FBA devices) size. If
the smaller quantity is greater than the device's cylinder (or maximum CA) size,
the CA is set equal to the cylinder (or maximum CA) size. If the smaller
quantity is less than or equal to the device's cylinder (or maximum CA) size, the
size of the CA is set equal to the smaller space quantity. For FBA, this value is
then rounded up to a multiple of minimum CA size.
For example:
CYL(5 10) results in a 1-cylinder CA
TRK(100 3) results in a 3-track CA
REC(2000 5) results in a 1-track CA (assuming 10 records
per track - minimum CA is 1 track)
TRK(3 100) results in a 3-track CA
For a device with 64 blocks per minimum CA and 960 blocks per maximum CA:
BLK(1100 1000) results in a 960-block CA
BLK(900 400) results in a 448-block CA
BLK(100 40) results in a 64-block CA
v A spanned record cannot be longer than a CA minus the control information (10
bytes per CI). Do not specify large spanned records with small primary or
secondary allocation.
v VSE/VSAM acquires space in increments of CAs. For example, if the allocation
amount is 20 tracks and the device is an IBM 3380, the CA size is one cylinder.
Two cylinders of space (two CAs) are allocated, because a 3380 has 15 tracks per
cylinder.
v LISTCAT gives information in increments of CA size. If you specify either
TRACKS or RECORDS and the allocation is less than one cylinder, LISTCAT
reflects the allocation as TRACKS. If the specification results in a one-cylinder
CA, LISTCAT reflects the allocation as CYLINDERS. If you specify BLOCKS, the
allocation is given in multiples of blocks.
NOALLOCATION
NOALLOCATION allows you to define a file into a catalog without suballocating
any space to it. This parameter can be useful in two ways:
v Creating default models. (For a discussion of default models, see “Using an
Object as a Model” on page 58.)
v Creating dynamic files for which space is not actually suballocated until the file
is opened.
Dynamic Files
Formerly, files that were used for brief periods of time (for example, work files)
occupied disk space from the time they were defined until they were deleted. If
they were required again, they had to be redefined.
When you try to delete a dynamic file, VSE/VSAM determines if space is currently
allocated to it. If it is, VSE/VSAM deletes it as if it were a normal VSE/VSAM
cluster. If space is not allocated, only the catalog entry of the file is removed.
For more information and examples on CI and CA splits that result from record
inserts during direct and sequential processing, refer to “CI/CA Splits” on page
116.
You can specify free space only for key-sequenced data sets (KSDSs),
variable-length relative-record data sets (VRDSs), or alternate indexes. The CI free
space should be as large as the design insertion level. Determine the free space
required by estimating the percentage of additions to be made between file
reorganizations. Also, consider the size of your records. If there are to be no
additions, or if records will not be lengthened, there is no need for free space.
Loading a File
Specifying Free Space
You specify free space for both the CI and the CA as a percentage of the total space
for the respective unit. For example:
FREESPACE (20 10)
indicates that:
20% of every CI is to be initially empty, and
10% of every CA is to be initially empty.
If you specify the minimum CA free space of 1%, free space for one CI in every
CA will be provided. The system default for free space is (0 0).
Consider a free space specification of (0 0) for loading the file and subsequent
processing.
When records are added, new CAs are created to provide room for additional
insertions. In this case, unused free space is not provided.
v For direct insertions:
Make the CI free space larger than the CA free space, unless the frequency of
insertions is very low. In that case, zero CI free space and average CA free space
might be indicated.
v For sequential processing:
The greater the free space specification, the more disk space is required.
For sequential processing, more I/O operations (with more system overhead) are
required to process the same number of records. A bad combination of
CI-size/record-size/free-space can cause poor sequential performance if much of
the free space is unusable.
Too little free space can cause an excess of (time-consuming) CI/CA splits:
v For sequential processing - and after a split occurred - extra time is required
because the records are not in physical sequence.
v For direct processing, CA splits can increase seek time.
Another factor is the additional VSE/VSAM overhead to do the split. (If insertions
are truly random, ideally all CAs would split at approximately the same time.) It is
recommended to monitor CA splits and to reorganize the file when the splits
become prevalent. To monitor CA splits, use LISTCAT or the ACB JRNAD exit.
VSE/VSAM ensures that at least one record (or one segment of a spanned record)
is placed into a CI. Also, if the CA free space specified in the DEFINE command is
not zero but is less than one CI, the result is one free CI in the CA.
The amount of unused space in the CI, however, may be more than the free space
you requested. For example:
If you specify (33 0) free space, you are in effect telling VSE/VSAM to put as
many records as possible into 67% of the CI. If the CI can contain four logical
records, the first two records will fit into 50% of the CI. This leaves 17%
unallocated space. The unallocated space is added to the 33% free space, for a
total of 50% free space available for allocation. In this case, where the amount
of unused space is greater than the amount of requested free space, the value
you requested is stored in the catalog.
For this same CI, if you specify (25 0) free space, the CI would contain three logical
records and 25% free space. If (20 0) free space is specified, the result is three
logical records and 25% free space. If (80 0) free space is specified, the result is one
logical record and 75% free space. Specifying free space in a CA is somewhat
different. If you specify any value greater than zero, VSE/VSAM will round up the
value so that you get at least 1 free CI per CA. As in CI free space allocation,
however, you may get additional space due to the combination of requested free
space plus unallocated space.
Note:
1. Remember that a CI contains logical records, free space, and control
information (CIDF and RDF). A 4KB CI cannot contain four 1KB logical records.
A 4KB CI with (25 0) free space specified will contain at least 1KB of free space;
only two 1KB fixed length logical records could be loaded into the CI. Only one
more 1KB logical record could be added before a CI and/or CA split would be
required.
2. If you specify FREESPACE(100 100), the CIs and CAs are not left empty.
VSE/VSAM writes one record per CI and one CI per CA; the rest is free space.
3. If ten CIs fit into one CA and (0 5) free space is specified, the CA will have one
free CI.
Reclaiming Space
You can use the ERASE macro to delete records. The space that was occupied by
the deleted record is returned to the free space.
Note: Space that becomes free within a CI because of records deleted or shortened
may remain unused even though the space is available. This situation occurs when
new records to be added to the file do not have key-field values that match the
range of the freed area within the CI. For example:
A record with key-field value 250 cannot be inserted between records with
key-field values 22 and 70.
Depending on the amount of unusable space, you may want to reorganize the file
(using EXPORT and IMPORT) to make the available free space useable.
The same problem can exist on a CA level. If all records in all CIs (in one CA) are
deleted, the CA is not reused unless space is required in its key range. To reclaim
unused CAs, use BACKUP and RESTORE to reorganize the file.
CI/CA Splits
The following explains the rules for CI and CA splits.
Sequential Processing
v CI Split
If the insert is in the middle of the CI, the records with higher keys are moved
to the free CI. The insert and the records with lower keys remain in the old CI.
If the insert is at the logical end of the CI, the inserted record goes to the free CI.
v CA Split
If the insert is not in the last logical CI, all CIs after the split CI are moved to the
new CA. If the insert is within the last logical CI, that CI is moved to the new
CA. If the insert is at the end of the last logical CI, the inserted record is placed
into the new CA.
116 VSE/VSAM V9R2 User’s Guide and Application Programming
Performance: Free Space
Direct Processing
v CI Split
Half the records (those with the higher keys) in the CI are moved into the new
CI. The new record is inserted (in key sequence) into the CI to which it belongs.
v CA Split
Half the CIs (those with the higher keys) are moved to the new CA. Insertion
then occurs through regular CI split processing, using the newly-created free
space CIs.
Updates can cause CI/CA splits when:
– The record length is increased, and there is not enough free space in the CI,
or
– The record length is decreased and additional RDFs are required. If the space
required for the RDFs is more than the amount by which the record is
shortened, and there is insufficient free space, the CI must be split.
Example 1
shows the CA after direct and sequential insertion of records 025 and 101.
040 175 HK FS
190 200
040 175 HK FS
190 200
Example 2
shows the CA after direct insertion of record 026, causing a CI split.
040 175 HK FS
190 200
190 200
Example 3
shows a CA split and CI split caused by the direct insertion of record 168.
190 200
190 200
Example 4
shows the CA after sequential insertion of records 12, 13, and 14. Record 12 causes
a new CI split. Note that the key associated with the old CI is one number less
than the low key in the new CI. This permits mass insertion to take advantage of
the newly-created free space.
060 175 HK FS
191 200
14 60 175 HK
190 200
Example 5
shows a CA split and CI split caused by the sequential insertion of record 144.
Note that the key associated with the old CI is one less than the low key in the
new CI. This permits mass insertion into the newly-created free space.
14 60 175 HK
Sequence Set (before)
10 12 13 14
191 200
019 20 25 60
10 12 13 14 191 200
147 175
19 20 25 60
Control Area 1 (after) Control Area 2
Example 6
shows a CA after a sequential insertion of records 205, 210, 223, and 228, during
load extend processing. Note that the free space is preserved.
HK FS FS FS
191 200
210 HK FS FS
223 228
Index Options
Number of Index Records in Virtual Storage
For keyed access, VSE/VSAM needs to examine the index of a file. Performance
improves if a large number of index records can be held in virtual storage.
Before the processing program begins to process the file, it must specify, either
explicitly or by default, the amount of space VSE/VSAM can use to buffer index
records. Enough space for one index record is the minimum. However, when the
space is large enough for only one or two index records, an index record may be
continually deleted from virtual storage to make room for another and then
retrieved again later when it is required anew. Ample space in which to buffer
index records can improve performance by preventing this situation, provided that
the buffer allocation does not cause excessive paging by z/VSE. Remember that
VSE/VSAM searches only the sequence set for sequential access but every index
level for direct access.
You can ensure that an acceptable number of index records is in virtual storage by
specifying enough space for I/O buffers for index records through one of the
following parameters when you open the file:
VSE/VSAM keeps as many index set records in virtual storage as the space will
hold. Whenever an index record must be retrieved to locate a record, VSE/VSAM
makes room for it by deleting another index record from the space.
For extended count key data (ECKD) devices (such as the IBM 3390), special
considerations apply. Especially in conjunction with cached devices, performance
will usually be best if the index is as compact as possible.
Key Ranges
Performance Measurement
VSE/VSAM keeps statistical information about a file in its catalog record. Some
statistics, such as number of extents in a file, number of records retrieved, added,
deleted, and updated, and number of CI splits, can help you decide when to take
action to improve performance. Appropriate actions could be, for example,
reorganizing a file or altering the type of processing.
You can list the entire catalog record, the statistics, and the parameters selected
when the file was defined, by using the LISTCAT command. For an explanation of
the output produced by the LISTCAT command, refer to the VSE/VSAM
Commands, SC33-8315. You can use the SHOWCB and TESTCB macros in a
processing program to display or test one or more file statistics and parameters.
These statistics and parameters include:
v CI size
v Percentage of free CIs per CA
v Number of bytes of available space at the end of the file
v Length and displacement of the key
v Maximum record length
v Number of buffers
v Usage of LSR buffer pools
v Number of records See Note 1, below.
v Password
v A time stamp that indicates if either the data or the index has been processed
separately
v Number of levels in the index
v Number of extents
v Number of records retrieved, inserted, deleted, and updated See Note 1, below.
v Number of CI splits in the data and in the sequence set of the index
v Number of EXCPs that VSE/VSAM has issued for access to a file
Note:
1. VSE/VSAM does not update these statistics when a file is processed in control
interval access (that is, MACRF=CNV is specified in the ACB macro).
2. When a cluster or alternate index is exported, that is, named in an EXPORT
command, the statistics are reset in the exported catalog record due to the
redefinition of the imported cluster or alternate index in another catalog.
3. SAM ESDS statistics are not updated when the file is accessed via DTF.
The statistics are available through an ACB that describes an open data set that is
using the buffer pool. They reflect the use of the buffer pool from the time it was
built to the time SHOWCB is issued. All but one of the statistics are for a single
buffer pool (subpool). To get statistics for the whole resource pool, issue SHOWCB
for each of its buffer pools.
The statistics cannot be used to redefine the resource pool while it is in use. You
have to make adjustments the next time you build the resource pool.
For information on the use of SHOWCB, refer to “The SHOWCB Macro” on page
266.
For buffer pool statistics, the keywords described below are specified in the
FIELDS operand. These fields may be displayed only after the data set described
by the ACB is opened. Each field requires one fullword in the display work area.
Field Description
BFRFND The number of requests for retrieval that could be satisfied without an
I/O operation (the data was found in a buffer).
BUFRDS The number of I/O operations to bring data into a buffer.
NUIW The number of nonuser─initiated writes. Applies only for DFR. Writes
that VSE/VSAM was forced to do because no buffers were available for
reading.
STRMAX The maximum number of place holders currently active for the resource
pool (for the whole resource pool).
UIW The number of user─initiated writes. For DFR only.
For an overview of available tools, refer to “Tools for Data Integrity, Backup, and
Recovery” on page 142.
Data Protection
VSE/VSAM provides options to protect files against unauthorized use and loss of
data. These options allow you to specify passwords and the use of a user
security-verification routine (USVR), and allow you to control file sharing and data
set name sharing. Using IDCAMS commands, you specify the options when you
define a file or catalog.
Every higher-level password allows all operations permitted by lower levels. Any
level may be null (not specified), but if a low-level password is specified, the
master level password must also exist. The DEFINE and ALTER commands
accomplish this by propagating the value of the highest password specified to all
the higher password levels. For example, if you specify only a read-level password,
that password becomes the update, control-interval, and master level passwords as
well. If you specify a read password and a control-interval password, the
Password Submission
A password, if required, is normally supplied by the processing program in a field
pointed to by the ACB or through IDCAMS parameters. If neither of these are
supplied, the password must be supplied by the operator. VSE/VSAM prompts the
operator for every entry password.
Two options can be specified in the DEFINE command for use when the operator
supplies a password: the ATTEMPTS option and the CODE option.
v The ATTEMPTS option specifies how many times, 0 through 7, the operator can
attempt to supply the correct password. If 0 is specified, passwords cannot be
supplied by the operator. If ATTEMPTS is not specified in the DEFINE
command, the default (2) allows the operator to attempt to supply the password
twice.
v The CODE option specifies a one-to-eight character name, other than the name
(file-ID) of the file, to which the operator responds with a password. This
prompting code helps keep data secure by not allowing the operator to know both
the name of the file and its password. If the CODE option is not specified, the
name of the job and the name (file-ID) of the file are supplied to the operator.
If the processing program omits the password or supplies the wrong password,
and the operator cannot supply the correct password in the allowed number of
attempts, OPEN is terminated. An error code is set in the ACB indicating that the
file cannot be opened because the correct password was not supplied.
Password Relationships
Catalogs may have passwords. If you define passwords for any files in a catalog,
you must also define passwords for the catalog so that the file passwords can take
effect. If you do not define passwords for the catalog, no password checking takes
place during operations on the file's catalog entry. For some operations (for
example, listing all of a catalog's entries with their passwords, or deleting catalog
entries), the password of the catalog may be used instead of the password of the
file's catalog entry. Thus, if the master catalog is protected, its update or
higher-level password is required when defining a user catalog because all user
catalogs have an entry in the master catalog. When deleting a protected user
catalog, the user catalog's master password must be specified.
Password Checking
VSE/VSAM does password checking only for files that are password-protected.
Operations on a catalog may be authorized by the catalog's appropriate password
or, in some cases, by the appropriate password of the file whose definition in the
catalog is operated on. For example:
v If you want to delete a protected file from a password-protected catalog, you
must specify the catalog's or file's master password.
v If you want to alter a file definition in a password-protected catalog, and if the
file is password-protected also, you must specify the catalog's or the file's master
password.
v If you want to list a file's catalog definition in a password-protected catalog,
and if the file is password-protected also, you must specify the catalog's or the
file's read (or higher) password. If you want to list the passwords themselves,
you must provide the master password.
v If you want to list a file's catalog definition in a password-protected catalog, and
if the file is not password-protected, you do not have to specify a password.
The administrator can control access to IDCAMS commands by using the BSM
resource profile of the resource class FACILITY called IDCAMS.GENERAL.
Users having update authorization level are permitted to perform commands for
the read authorization level plus the set of IDCAMS commands listed below.
v DEFINE CLUSTER|AIX|PATH|NONVSAM - defines cluster, alternate index,
path, or nonVSAM file
v DELETE CLUSTER|AIX|PATH|NONVSAM - deletes cluster, alternate index,
path, or nonVSAM file
v EXPORT/IMPORT - exports/imports cluster or alternate index
v REPRO - copies data from one dataset to another
v RESTORE - defines cluster (if required) and fills it with the data from the
backup medium
v BLDINDEX - builds one or more alternate indexes
v VERIFY - verifies and corrects (if required) end-of-file information
Note:
1. The scope of using of the DEFINE and DELETE commands is limited to cluster,
alternate index, path, and nonVSAM file.
2. EXPORT CONNECT and IMPORT DISCONNECT are not allowed for this
authorization level.
Users having alter authorization level are permitted to perform commands for the
read and update authorization levels plus the following set of IDCAMS
commands:
v DEFINE MASTERCATALOG|USERCATALOG|SPACE - defines master catalog,
user catalog, or space
v DELETE MASTERCATALOG|USERCATALOG|SPACE - deletes master catalog,
user catalog, or space
v IMPORT DISCONNECT - disconnects user catalog from master catalog
v EXPORT CONNECT - connects user catalog to master catalog
v ALTER - changes attributes of catalog entries
For description of the return codes, refer to z/VSE Messages and Codes, Volume 1,
SC34-2632 under “RACROUTE REQUEST=AUTH”. At the same time message
BST120I from BSM is displayed on the console. It shows which BSM resource class
and resource profile are affected. The example of the BST120I message is given
below.
Job is not cancelled, IDCAMS processing continues with the next command
specified.
Note:
1. IDCAMS RECMAP command is not under control of BSM resource profile
since is does not affect any VSAM data directly. Commands like CANCEL and
other modal commands (IF-THEN-ELSE, SET, PARM) are not covered by
security manager as well.
2. IDCAMS SNAP command is controlled by a separate BSM resource profile of
the BSM resource class FACILITY. Refer to Chapter 10, “Performing an
IDCAMS SNAP (FlashCopy),” on page 187.
The JCL sample below shows how to use BSTADMIN utility for defining the
IDCAMS.GENERAL profile in BSM. This sample profile allows everyone to use the
'read-only' commands and grants user USR1 update authorization level and user
USR2 alter authorization level to the IDCAMS.GENERAL profile.
// JOB BSTADMIN SETUP
* Define IDCAMS.GENERAL security profile and setting user permissions
// EXEC BSTADMIN
ADD FACILITY IDCAMS.GENERAL UAC(READ)
PERMIT FACILITY IDCAMS.GENERAL ID(USR1) ACCESS(UPD)
PERMIT FACILITY IDCAMS.GENERAL ID(USR2) ACCESS(ALT)
PERFORM DATASPACE REFRESH
/&
Instead of BSTADMIN, you can also use the Interactive Interface dialogs (fastpath
28) for security maintenance.
2-12 Unpredictable.
13 Address of save area. Note: This address must not be destroyed by the USVR.
14 Return address to VSE/VSAM.
15 Entry point to verification routine.
The USVR should not issue any VSE/VSAM macros because they will cause
VSE/VSAM to loop. The USVR should return control to the program for any
VSE/VSAM requests.
For sharing among systems, you must establish the DASD sharing environment
through the correct system generation and IPL commands. You are also responsible
for ensuring that the volume containing the file is mounted on a shared device.
In determining the level of sharing you intend to allow, you must evaluate the
consequences of a loss of read integrity (reading the correct information) to the
processing program, and a loss of write integrity (writing the correct information) to
the file owner.
The degree of sharing to be allowed for the file is specified, when the file is
defined, in the SHAREOPTIONS parameter of the DEFINE command. The
SHAREOPTIONS parameter can be changed by the ALTER command (if the file is
not concurrently open for another program). A file cannot be deleted or reset if it is
currently open for another program, regardless of the share option specified.
During the initial load of a file (and regardless of the share option values
specified), VSE/VSAM treats the share option specification as if it were share option
1 (see below). After the file is loaded and successfully closed, VSE/VSAM uses the
specified share option value.
One of the following file share options can be specified, where every open ACB
counts as one request:
v Share option 1: The file may be opened by any number of requests for input
processing (retrieve records), or it can be opened by one request for output
processing (update or add records). This option ensures full (read and write)
integrity. Every open ACB counts as one request.
v Share option 2: The file may be opened by more than one request for input
processing and, at the same time, it may be opened by one request for output
processing. This option ensures write integrity but, because the file might be
modified while records are retrieved from it, read integrity must be ensured
individually by every user.
v Share option 3: The file can be opened by any number of requests (ACBs) for
both input and output processing. VSE/VSAM does nothing to ensure either the
integrity of information written in the file or the integrity of the data retrieved
from the file. VSE/VSAM does ensure, however, that an open file is not deleted
or reset.
v Share option 4: A key-sequenced or relative-record file can be opened by any
number of requests (ACBs) for both input and output processing by users in the
first system requesting output to the file. Once a file has been opened for output
by one system, VSE/VSAM accepts only open for input requests from another
system.
VSE/VSAM ensures write integrity by using the z/VSE LOCK facility. Read
integrity is ensured by VSE/VSAM only when records are retrieved for update.
If records are not retrieved for update, VSE/VSAM may miss or skip some of
the records in CIs that are updated concurrently by more than one program. In
this case, read integrity is not ensured, because every program might retrieve a
different copy of the CI. If one task makes multiple GET/PUT requests (through
two or more ACBs) to the same file, VSE/VSAM cannot resolve the integrity
conflict and issues an error code. The requestor must resolve the conflict and
retry the request.
Note: If you specify share option 4 for an ESDS file, VSE/VSAM treats the
specification as if it were share option 2.
If a file cannot be shared for the type of processing you specify, your request to
open a file is denied.
If a file is fully sharable (share options 3 and 4), more than one request can open it
at the same time to update or add records. If the file is not sharable, only one
request at a time can open it to update or add records. With share options 2, 3, or
4, any number of requests can retrieve records from the file regardless of whether
it is sharable or not. With share option 1, data retrieval is prevented by the OPEN
macro if the file is already opened for output.
If an alternate index is defined with the UPGRADE attribute and share option 1 or
2, keep in mind the restrictions on the number of requests that can open it for
input and/or output processing. For example, if you specify share option 2 for an
alternate index that is a member of an upgrade set, you cannot open another
update path over the base cluster, or the base cluster itself, for output. This is
because share option 2 does not allow a file to be opened twice for output.
Cross-Systems Sharing
VSE/VSAM allows the sharing of catalogs and files across z/VSE systems. To this
end, the catalogs and files must reside on shared devices that have been defined to
the supervisor at IPL.
You do not specifically invoke cross-system sharing when opening catalogs and
files, because:
v Catalogs are automatically shared if they reside on shared devices.
v Files are automatically shared if they are owned by a shared catalog.
To ensure data protection, the degree of file sharing that is to be allowed can be
specified in the SHAREOPTIONS parameter of the IDCAMS commands: ALTER,
DEFINE CLUSTER, and DEFINE ALTERNATEINDEX. The following explains
various options and their results.
v Specifying SHAREOPTIONS(4)
This specification provides:
– Input OPEN function for all the systems that participate in cross-system
sharing, and
– Output OPEN function only for the first system that requests it.
If you ignore this behavior, VSE/VSAM issues an OPEN error message with the
error code 168 (X'A8') when trying to open a file. The error code means that the
file is already opened for output from a different processor, and that only one
processor may write output to the file at a time. In this case the OPEN error
message is accompanied by the explanatory message:
FILE ALREADY OPEN IN ANOTHER PARTITION, RC X'rc_value' TASK X'task_id'
which shows the owning task ID as X'FFFF'. The actual task ID will appear here
only if the file is opened in another partition of the same processor.
v Specifying SHAREOPTIONS(4 4)
This specification provides OPEN functions for input and output processing for
all the systems that participate in cross-system sharing. It provides full read and
write integrity for a file that is accessed from:
– Different partitions of a particular CPU, or
– Different CPUs.
Note: With SHAREOPTIONS(4 4) specified, the lock file activity (with regard to
z/VSE DASD sharing) increases. This may have an effect on performance.
v Defining Shared User Catalogs
You may wish to have a non-shared master catalog on every system, and shared
user catalog(s) that connect to every master catalog as illustrated in the
following diagram:
System A System B
To do this, define the user catalog under one master catalog, then IMPORT
CONNECT the user catalog to another master catalog. The shared (user)
catalog(s) must contain entries for all shared files.
Data Integrity
To protect your VSE/VSAM data from accidental loss or destruction, you can use
the IDCAMS commands and command options listed below, and you can use the
following IBM utility programs:
v VSE/Fast Copy
The use of this utility in a VSE/VSAM environment requires special
considerations, because both the volume VTOC and the catalog contain space
mapping information about the volume which has to be synchronized to insure
accessibility and to avoid damage to data.
With VSE/VSAM, data can be flexibly distributed among many DASD volumes
(minidisks) of different device types and capacity. However, some rules need to
be followed:
– A catalog resides on a single volume.
– Only one catalog can exist per volume.
– A catalog may own space on any number of DASDs of different device types,
sizes, and architectures.
– Several catalogs can own space on the same volume, but then the recovery
may become quite complex.
– Each component of a cluster must reside on the same DASD type. The
DASDs can have different sizes.
v VSE/VSAM VTOC Utility (IKQVDU)
For brief explanations on when to use which command, option, or utility, refer to
Table 22 on page 143. The figure also shows where to find more detailed
explanations and procedures.
Note: Though not specifically designed for the purpose of data integrity, the
commands and options DEFINE SPACE, DEFINE CLUSTER, and DEFINE
USERCATALOG can be used for that purpose as explained below.
When secondary allocation is done, a new back up of the catalog or file (or both)
can be made. By monitoring the file statistics in the catalog, either by way of a
LISTCAT command or by way of a SHOWCB macro against an open ACB (to
inspect the number of bytes of available space), you can predict when secondary
allocation will occur. You can determine if a secondary allocation took place with a
SHOWCB or TESTCB for the RPL feedback information after every PUT request.
For a key-sequenced file the problem is much more complicated. If existing records
are not lengthened and all additions are made to the logical end of the file, the
situation is similar to that of an entry-sequenced file, except that the index must
also be checked. The other patterns of insert and update activity are limitless.
Some of them are specific and dictate specific back up strategies, but discussion
here assumes a random distribution of activity against the file.
There are reasons, other than recovery, to design a key-sequenced file to minimize
extensions. A control-area split takes a relatively long time. For many online
systems this can be a serious disruption. A characteristic of key-sequenced files is
that, assuming a random insert pattern, all CAs tend to split at roughly the same
time. Because every split results in two CAs created from the original one, the file's
physical size doubles in a short period of time.
Note that once a catalog has been destroyed, the data it controls can no longer be
accessed. Thus, if a system contains only one (master) catalog and that catalog is
destroyed, the resources of the whole system are lost and must be restored by the
use of backup copies.
Catalogs with only nonVSAM entries can be backed up with VSE/Fast Copy. After
the volume is restored, only those jobs that updated the files since the backup was
made would have to be rerun.
When several user catalogs are involved, only the resources controlled by the
destroyed catalog are affected, and it can be rebuilt while processing on other data
continues. Because user catalogs (like the master catalog) are self-describing, you
need only rebuild the master catalog and the resources directly connected to it.
This applies even if the master catalog has been destroyed. No files in a user
catalog connected to that master catalog can be accessed until the user catalog is
again connected to a master catalog.
Backup Considerations
In choosing methods of back up and recovery, you need to consider the physical
matters of accomplishing the work, and the need for back up, operational
characteristics, and security and integrity of the backup medium.
v Necessity for Back Up: If the file can be recreated from the original input or from
records or journals you kept, perhaps there is no need for back up. Considering
the time required for regular backup procedures and the relative infrequency of
recovery, many files may fit into this category.
v Operational Factors: You should consider frequency of back up and possible
frequency of recovery, time required for back up and recovery, and the ease or
difficulty of the backup and recovery technique used.
v Frequency Factors: In deciding for the best method for back up and recovery, you
have to find a good balance between the frequency of, and the time required for
making back ups and recoveries. You may find some methods are considerably
easier to use than others but may require more time to accomplish. Thus, a
method that might be suitable for one file because of its relative infrequency of
backing up might be unacceptable for another file that must be backed up
frequently.
v Time Required Factor: The time required for back up and recovery may be a
deciding factor in the choice of method, particularly for real-time systems where
recovery must be accomplished quickly. A method that takes longer may have
other characteristics that are more desirable. Time required for recovery may also
necessitate that a backup technique be used that takes longer.
v Ease of Use: The alternatives for back up and recovery vary widely in relative
ease of use. Complicated methods that are difficult to use may cause errors,
which makes recovery much more time consuming than estimated. If recovery is
infrequent, a difficult method may require more time to reason out than another
method would require to do the actual recovery.
v Physical Security and Integrity: Security and integrity of the backup medium are
often neglected. Measures used while data is on the system are of no use for a
backup copy that is stored elsewhere. Security and integrity factors may also
need to be reviewed as the nature of data changes in an installation.
Note: The file you are backing up must be available for an INPUT OPEN. The
OPEN might fail if the file is currently opened for input or output by another
partition or system. Because the OPEN might not always fail, it is strongly
recommended that the file which is being backed up should not be opened for
output by any other partition or system. Otherwise, the resulting backup copy
might not represent the actual state of the original file.
Use the RESTORE command to create - from the backup copy - an object that is
equivalent to the original one. You can also use the RESTORE command to move
the files to a different disk device type, or to increase the allocation size of a file.
You can back up (or restore) all the objects owned by one catalog (or contained
on the backup file) with a single command. Generic names let you include or
exclude subsets of objects from the backup or restore operation.
Note that the format of the file produced by BACKUP is different from the
format produced by EXPORT. Therefore:
– RESTORE cannot process files created by EXPORT, and
– IMPORT cannot process files created by BACKUP.
Recommendation: Because of their performance advantage, BACKUP and
RESTORE should be used for regular back up of files, with restoration as
necessary. EXPORT and IMPORT should be used for migration between
VSE/VSAM and MVS, and for reorganization on record-level or CI-level. For
optimum performance a COMPRESSED file is stored by BACKUP. A compressed file
can only be restored on a system with support for VSE/VSAM data compression
(that is VSE/VSAM Version 2 or later).
v Use the EXPORT command to create an unloaded, portable copy of the file. The
operation is simple. There are options that offer protection, and most catalog
information is exported along with the data, easing the problem of redefinition.
You can prevent the exported file from being updated until the IMPORT
command reestablishes its accessibility. A COMPRESSED file is backed up by
EXPORT in an uncompressed format, hence the IMPORT can be done by any
system supporting the IMPORT command. IMPORT defines the file as a
NOCOMPRESS file, unless the target file is a pre-defined, empty file with the
COMPRESS attribute.
For more information and examples, refer to the VSE/VSAM Commands,
SC33-8315 .
v Use the REPRO command to create either a SAM file, or a duplicate
VSE/VSAM file for back up. The advantage in using REPRO (instead of
EXPORT) is the accessibility of the backup copy. A DEFINE command is
required before reloading, but this is a relatively minor inconvenience,
particularly if the original DEFINE statements can be used. A COMPRESSED file
is copied by REPRO in an uncompressed format.
For more information and examples, refer to the VSE/VSAM Commands,
SC33-8315.
v User-written programs for back up are usually appropriate when the data has
some characteristic that does not allow you to take advantage of a generalized
backup method. Files for which not all records have to be saved for back up
might fit into this category. Also, keyed sequential files which have to be
processed sequentially on a regular basis could be backed up by creating a
sequential file as a by-product.
You must keep in mind that any backup procedure that does not involve an image
copy of the file (for example, the BACKUP, EXPORT, and REPRO commands do
not provide an image copy of the file) will result in data reorganization and the
re-creation of the index for a key-sequenced file. Therefore, any absolute references
by way of RBA may become invalid.
For details on how to use VSE/Fast Copy, refer to the z/VSE System Utilities,
SC34-2675.
For information on how to solve problems relating to catalogs and volumes, refer
to “Procedures for VSE/VSAM Recovery” on page 146.
The following explains how to proceed if integrity problems occur with catalogs,
files, or volumes.
If you have lost a file and if you do have a backup copy, use the RESTORE or
IMPORT command to copy the volume to disk. Then reprocess any updates made
since the backup copy was made. If you do not have a backup copy of the file, you
must recreate the file by redefining, loading, and updating the file.
Rebuilding a Catalog
You may have to rebuild your catalog if it gets damaged. Use the following
procedure:
1. Run a LISTCAT command to determine which files own space on the volume.
Assuming that you want to save the contents of these files, determine if an
acceptable back level copy exists of each. If not, save the contents of these files
by running either BACKUP or REPRO.
The BACKUP command is preferable, because it automatically saves any
alternate indexes built over the cluster backed up. (If REPRO is used, you must
rebuild these alternate indexes at restoration.) If there is catalog damage, it may
not be possible to recover all files.
2. Issue a DELETE command for every object in the catalog. (alternate indexes
and paths associated with the file are automatically deleted.)
3. Issue a DELETE SPACE command for all volumes owned by the catalog.
4. Delete the catalog itself.
5. Define the catalog.
6. Issue a DEFINE SPACE command for any volumes on which the catalog will
own space.
7. Define a compression control data set.
8. If any files (and associated alternate indexes or paths) were deleted in step 1,
reintroduce them into the catalog in one of the following ways:
v If you used BACKUP in step 1, use the RESTORE command to define and
restore objects saved in step 1.
v If you used REPRO in step 1, DEFINE every object that was deleted in step
2. Then use REPRO to restore the objects saved in step 1. Also DEFINE any
alternate indexes or paths deleted in step 2. Recreate any associated alternate
indexes using the BLDINDEX command.
If the time required for recovery is the governing factor, follow the preparation and
recovery steps explained under “Quick Recovery” on page 153.
Levels of Recovery
The types of VSE/VSAM data recovery, in terms of the currency of the recovered
data, are: current and downlevel.
The current type of data recovery operation restores addressability and access to
the most recent version of the data. Operations that recover current data are
generally used to correct problems such as read and write errors associated with
the data itself or with the data description.
The downlevel type of data recovery operation restores addressability and access to
a version of the data other than the most recent. Operations that recover downlevel
data are generally used to correct logical problems such as a programming error or
faulty transactions. This is the most common type of recovery, probably because of
the types of problems encountered and the level of data available for recovery. An
example of a downlevel recovery is the restore of a volume.
Note: Some of the utilities (listed in Table 22 on page 143) can only recover data
that currently is not downlevel. Further processing is necessary to make the file,
volume, or catalog current.
(X) in the last column means that you have to refer to the VSE/VSAM Commands,
SC33-8315. There, you find the discussion under the quoted title.
Because the two activities backup and recovery overlap, read also the explanations
under:
“Creating Backup Copies of VSE/VSAM Files” on page 138
“Creating Backup Copies of Volumes” on page 139
“Creating Backup Copies of Catalogs” on page 140
Several of the following procedures use volume restore. If this is indicated, one or
the other of the following must be true:
v The volume restored does not contain multivolume files.
v If a volume does contain a portion of a multivolume file, all volumes that
contain portions of those multivolume files are treated as a single unit. That is, if
a volume is required, the entire set is restored.
VSE/VSAM files are not properly closed when they are opened for output and a
system failure occurred, or automatic CLOSE was not activated. This condition is
reflected in the catalog and is communicated to the next program that does an
OPEN of the file. There is a possibility that the failure occurred after the load or
update of the file was complete. In this case, the file itself and the file's catalog
entry are correct.
Error Conditions:
v Incorrect high RBA in catalog
v Incomplete write to direct access device
v Duplicate data
Overview
The warning “file not properly closed” may indicate an error in a VSE/VSAM file.
This condition can generally be corrected by using the VERIFY command. If other
errors are encountered or suspected, they can generally be corrected by using
either the IMPORT command or the REPRO command.
The file must be restored from a backup copy. You can use either an exported or
sequential backup copy created by the REPRO command.
Use the IMPORT command to put a previously exported copy into the catalog, or:
1. Delete the file that failed.
2. Redefine the file with the DEFINE command.
3. Load the new file with the sequential backup file by using the REPRO
command.
The restored file is downlevel and all updates since the back up was made must be
reapplied to make the file current.
This can result from a failure during a CI or CA split. One of two possible
situations can exist for a duplicate data error conditions, depending on the type of
processing done.
For addressed or control interval (CI) processing, you correct the error condition by
using the REPRO command to copy the current version of data to a temporary file
and then copy it back into the original file. This gives you a reorganized file
without duplicate data.
File is Inaccessible
Cause of Failure
A VSE/VSAM file may become inaccessible due to damage to the file itself,
damage to related information in the catalog, or both. Depending on the extent of
damage and prior actions, it may be possible to gain access to either the current or
a downlevel version of the data.
Error Conditions:
v The file cannot be opened
v The file is partially unreadable (but can be opened)
v The file is totally unreadable (but can be opened)
v The compression status of the file is CMP-UNDET
Overview
The problem is probably due to catalog damage. Determine the extent of this
damage. If the damage is relatively minor (that is, relatively few catalog file entries
are affected):
1. Use the analysis tool LISTCAT to determine the extent of damage. This can be
done by comparing a previous LISTCAT list with one of the damaged catalog.
2. For a catalog, if a back level copy of the file is available, you can RESTORE or
IMPORT the file to gain access to the file.
The problem is either confined to the file itself, or to an entire physical extent of
the file.
1. Use an analysis tool as outlined in “Recovery for a File that Cannot Be
Opened” to determine if there is a mismatch in the number of extents. If the
catalog indicates one or more extents than there are on the volume, it may be
caused by a volume restored independent of the catalog.
2. For a catalog, you can import a previously exported copy. See “Recovery for a
File that Cannot Be Opened” for use of these tools.
3. If there is no catalog mismatch, a backup copy of the file must be restored,
using BACKUP/RESTORE, EXPORT/IMPORT, or REPRO.
Either the file has been destroyed, or the catalog and volume are not synchronized.
1. Analyze the catalog with LISTCAT to determine if the damage is in the file or
in the catalog.
2. Regain access to data
v If the damage is to the file or a catalog, use IMPORT or REPRO to restore the
file. This gives you access to a downlevel copy of the data.
v If the file has a CMP-UNDET compression status, the backup copy of the file
must be restored, using BACKUP/RESTORE, EXPORT/IMPORT, or REPRO.
Catalog is Unusable
Cause of Failure
A catalog may become unusable because of physical damage to the catalog.
Depending on the extent of the damage and prior actions, it may be possible to
gain access to current level catalog entries or to downlevel catalog entries.
Error Conditions:
v Catalog can be opened, but many VSE/VSAM files cannot be opened.
v The catalog cannot be opened.
v The catalog volume is unusable.
Overview
An unusable catalog can be reestablished, provided certain backup procedures
made possible by the system copy utility and the REPRO command are followed.
This provides a downlevel version recovery when a file or volume is damaged or
unusable.
This method is for the analysis of catalogs for out of synchronization conditions
that may occur when the catalog is restored to a previous level.
Determination of Mismatches
By comparing the LISTCAT runs that were made when the catalog was backed up
with those when the catalog is restored, critical changes can be detected.
Volume Mismatches
v Mismatched Space Map
This mismatch indicates that the catalog does not correctly reflect the tracks
(Min CAs) on the volume occupied by its VSE/VSAM files. Files wholly
contained in space correctly indicated as allocated can be accessed if their file
descriptions in the catalog are correct.
v Mismatched Data Space Group
This mismatch shows that the catalog does not correctly reflect the VSE/VSAM
files that it owns on the volume. Files wholly contained within data spaces that
are accurately described are accessible if their file descriptions in the catalog are
correct.
v Mismatched File Directory
This mismatch shows that the catalog does not correctly reflect the files it owns
on the volume. Files known from the file directory are accessible if their
descriptions are correct.
File Mismatches
v Mismatched Statistics
These mismatches do not affect accessing of a file.
v Mismatched High RBA
This mismatch indicates that the catalog does not correctly reflect the end of
data in a file. Correct this condition by reopening the file, which causes
automatic VERIFY to reset the high RBA.
v Mismatched Extents
This mismatch indicates that the file has acquired additional extents that are not
reflected in the catalog. The data contained in the extents that are correctly
identified may be accessed. For a key-sequenced file it may be necessary to treat
the data portion as an entry-sequenced file 0n order to access the data.
v Mismatched Volume or Key Range
This mismatch indicates that the file:
– Was extended to a volume which is unknown to the catalog's file record, or
– On the volume has the same name as the catalog, but it is not the same file
that is described in the catalog.
If the file was extended to a volume not known in its catalog record, the extents
of the file on that volume are not accessible. The extents of the file on known
volumes may be accessible.
There are several actions that cause mismatches from a backup catalog. Some of
these are overt actions such as the use of the DEFINE and DELETE commands to
create files or data spaces. Others are automatic system actions, such as acquiring
additional extents.
v Define/Delete/Extend Data Space
Any of these actions cause the data space group set of fields for a data space to
be invalid in a backup catalog.
v Define/Delete Files
Either of these actions cause the file directory in the volume record and some of
the file entries to be invalid in a backup catalog. The use of the EXPORT
command may cause a deletion. The use of the IMPORT command always
causes an entry definition.
v Add/Remove Volumes
The ALTER ADDVOLUMES command is used to add a volume to a file as a
candidate. The ALTER REMOVEVOLUMES command is used to remove a
volume from a file as a candidate.
v File Extension through Suballocation
Extension causes the volume space map in the backup catalog to be invalid as
well as the entry for the file.
The possible catalog mismatches described above, which cause files to be wholly or
partially inaccessible, are all caused by the DEFINE, DELETE, and ALTER
commands, or by the extension of VSE/VSAM files or data spaces. Because
DEFINE, DELETE, and ALTER are always known to you, a backup copy of the
catalog can be made every time one of these commands is used. Therefore, the
only action that invalidates a backup catalog without you being aware is the
extension of space. Thus, the minimization of space extension tends to minimize
critical catalog changes. To prevent any VSE/VSAM object from extending, you can
define VSE/VSAM objects with no secondary extent value. As long as a
VSE/VSAM object does not extend, it remains totally accessible from a backup
copy of the catalog.
Volume is Inaccessible
Cause of Failure
Error Conditions
v Volume is totally unusable.
v Volume is partially unusable.
Overview
You can recover only if you have a volume backup and a catalog volume backup
created at the same time (that is, at the same level), or if you have copies of the
files created by the REPRO command or by the EXPORT command.
If you do not have volume backup, but you do have a file backup:
1. Initialize the volume and reestablish the nonVSAM files.
2. Use DELETE FORCE to clean up the volume of VSE/VSAM ownership and
data spaces. This will also remove the volume entry from the catalog and mark
file entries unusable.
3. Reestablish files
If the VSE/VSAM files are partially or totally unusable, but the nonVSAM files are
accessible, use the above procedure. If the VSE/VSAM files are accessible, but the
nonVSAM files are not, proceed as follows:
1. Recover the VSE/VSAM files on the volume using the EXPORT command.
2. Initialize the volume and reestablish the nonVSAM files.
3. Using the IMPORT command, reestablish the VSE/VSAM files.
4. If the reestablished nonVSAM files were cataloged, delete and redefine the
nonVSAM entries.
Quick Recovery
There are some applications (such as online teleprocessing systems) which require
that file recovery be done as quickly as possible. In this type of situation, normal
VSE/VSAM recovery procedures may be too time consuming to be of much use.
For quick recovery, you have to:
v Implement certain “restrictions”.
v Ensure data integrity.
v Recover lost objects.
Note: Overallocate for the index also, because at least one new index record
will be created whenever a CA split occurs.
2. Create a backup of the catalog whenever any file is defined, deleted, or altered.
To do so, use the REPRO command.
3. Create a backup of the compression control data set whenever a compressed file
is defined, deleted, altered, or loaded. To do so, use the REPRO command.
4. Recover objects:
If the catalog controlling the files is lost, do the following:
a. REPRO the backup catalog into the existing catalog.
Explains how you can prepare your existing SAM files and programs so as to take
advantage of the functions provided by VSE/VSAM.
The chapter highlights the optional and required steps and definitions, and
includes examples for loading and defining SAM ESDS files.
Overview
Note:
1. A SAM ESDS file is not identical to a VSE/VSAM ESDS file. For more
information, refer to “Differences Between VSE/VSAM ESDS and SAM ESDS
File Format” on page 183.
2. SAM ESDS files can only be created and used if the VSE/VSAM Space
Management for SAM Function is effective. This is always true for the z/VSE
environment.
SAM files that have been converted can take full advantage of the processing
capabilities of VSE/VSAM. You can use SAM with VSE/VSAM for data and work
files, and you can move data and programs from SAM control to VSE/VSAM
control.
The full conversion of SAM files involves the three steps explained under “Levels
of Migrating Data and Programs from SAM to VSE/VSAM Control” on page 160.
You have the option to stop at any level of the conversion. Depending on the level
that you implement, you can use specific VSE/VSAM functions and capabilities for
processing the files.
To indicate a SAM ESDS file and provide SAM record format information, specify
the RECORDFORMAT parameter in the IDCAMS DEFINE CLUSTER command for
a NONINDEXED (ESDS file). During VSE/VSAM access of a SAM ESDS file, SAM
records are processed according to your specifications in the RECORDFORMAT
parameter. To the VSE/VSAM program, a SAM ESDS file appears as though it is in
VSE/VSAM ESDS file format.
SAM ESDS files can be accessed by VSE/VSAM (ACB) access if the files are
formatted with control intervals (CIs).
To define and process your SAM files in VSE/VSAM data space, you use a DTF,
and SAM imperative macros (for example, OPEN, GET, PUT). You indicate your
intention to use a SAM file in VSE/VSAM data space by opening a DTF that
specifies a file name described in a VSE/VSAM DLBL statement. This tells OPEN
that the file to be accessed is a SAM ESDS file. Then, managed-SAM OPEN
retrieves file information from the VSE/VSAM catalog rather than from the VTOC.
Data is written in a format similar to a VSE/VSAM ESDS file. The control interval
(CI) format is used; where the CI is the basic unit of information that is
transmitted to or from a direct-access device. This format allows:
v VSE/VSAM access (through ACB) to SAM files in VSE/VSAM data space.
v Disk independence (for example, maximum DTF BLKSIZE is not limited to disk
track size, but only to CI size minus 7).
You need not specify absolute extent limits for the file, because VSE/VSAM
determines the location of the file.
Dynamic Allocation
With VSE/VSAM managing your space, you can take advantage of VSE/VSAM's
dynamic allocation. The allocation of file space is simpler because you do not have
to specify extent limits. You need only request a quantity of space. This space is
allocated when it is needed. If more space is subsequently needed, a secondary
quantity is allocated.
VSE/VSAM's dynamic file capability allows you to define a file in the VSE/VSAM
catalog without allocating space for it. Space is allocated at OPEN and deleted at
CLOSE under control of the DLBL DISP parameter. This dynamic file capability
applies to SAM ESDS files.
This improvement is available to the SAM user through the VSE/VSAM Space
Management for SAM Function. The information required by the system to check the
location and characteristics of files is stored in the VSE/VSAM catalog. The need
for DLBL statements is also removed for many of the IDCAMS commands. Because
VSE/VSAM user catalogs are programmer logical units, they too are eligible for
automatic assignment. Operator communications are also simplified because the
operator may mount a requested volume on an available drive without the need to
assign the drive.
Default Modeling
Default modeling allows you to select your own parameter defaults in place of the
usual system defaults during explicit define. The ability to specify default
parameters for the IDCAMS DEFINE CLUSTER command through default
modeling is available for SAM ESDS files as well as for VSE/VSAM files.
SAM ESDS files do not have to be explicitly defined (by way of the IDCAMS
DEFINE command) prior to the time they are opened. An implicit define of a
reusable SAM ESDS file occurs during managed-SAM OPEN if the file has not yet
been explicitly defined.
Device Independence
You do not have to be concerned with different track and cylinder sizes for various
types of devices. (The DTF DEVICE and DEVADDR parameters are ignored by
managed-SAM OPEN so that the file may reside on any disk device type.)
Allocation sizes may be requested in terms of number of records and average
record length rather than tracks, cylinders, or blocks which are device-dependent.
This may be specified in the DEFINE CLUSTER command for explicitly defined
files, or in the DLBL RECORDS and RECSIZE parameters for implicitly defined
files. For implicitly defined files, a default secondary allocation size of twenty
percent of the primary allocation size (rounded up) is assumed if none is specified.
The control interval (CI) is the basic unit of information that VSE/VSAM transmits
to or from a direct-access device. Because the CI size has no relation to the track
and cylinder size of a particular device, this makes the processing of files disk
independent.
IDCAMS Commands
You do not need to use different utility programs to manipulate files. With the
VSE/VSAM Space Management for SAM Function effective, you can use IDCAMS
commands to print, copy, alter, delete, and move files from one system to another.
For special considerations in using the commands, refer to “The IDCAMS
Commands for a SAM ESDS File” on page 175.
Data Recovery
Data recovery is supported for a SAM ESDS file through various IDCAMS
commands. As a basis for reconstruction (if the original file becomes inaccessible),
you can use the EXPORT and IMPORT commands in the same way as for a
VSE/VSAM file. That is, you can create a portable copy of a SAM ESDS file by
using the EXPORT command, and introduce the copy of the file into the system by
using the IMPORT command
Work Files
Automatic Space Management
Work files may need varying amounts of space for different jobs. For some jobs
only a small quantity of space is needed. At other times, a great deal of space is
needed.
VSE/VSAM provides automatic space management. That is, you do not need to:
v Ensure that enough space is available for jobs that require large quantities of
space.
v Keep large amounts of space tied up. The space needed for work files can be
smaller.
You can think in terms of the average size of space needed rather than the
maximum size needed. This is because VSE/VSAM provides dynamic secondary
allocation. You can make your primary allocation nearer to the average size of space
needed; if more is needed, VSE/VSAM gets the necessary space by using the
secondary allocation. In addition to dynamic secondary allocation, VSE/VSAM
provides dynamic primary allocation. This allows you to define a file that does not
need space until it is opened. (A file defined in this way is called a dynamic file.)
When a dynamic file is opened, the needed space is provided by VSE/VSAM. The
options available at OPEN and the disposition of the files at CLOSE depend on
what you code in the DISP parameter of the DLBL statement, or what is specified
in the DTF (for example: DELETFL=NO).
Partition/Processor Independence
The file-ID is chosen according to the partition in which the job is running, and
space is assigned as needed. Work-space can also be shared between processors.
The same job can be processed in any partition of a number of different processors
without conflict in the catalog. When the file is closed, it may be deleted or
deallocated. The space the file occupied is reclaimed and made available for use by
other files.
Disposition
The disposition of a reusable file (REUSE) can be controlled through the DLBL
DISP parameter. A file can be allocated, reset, or implicitly defined at OPEN
according to these specifications. Whatever you specify in the DLBL DISP
parameter overrides whatever was specified in the DTF. Pertinent information from
the disposition parameters and the DTF is saved for closing of the file. At that
time, the file is kept, reset, deallocated, or deleted according to the disposition that
is specified in the DTF and DLBL statement. When you do not specify the DISP
parameter, a default is chosen according to the type of file opened or closed. The
default disposition is the same as would occur for unmanaged-SAM files. For
example, the default disposition for:
v DTFSD OUTPUT data file is DISP=(NEW,KEEP)
v DTFSD INPUT data file is DISP=(OLD,KEEP)
v DTFSD work file is DISP=(NEW,DELETE).
If DELETFL=NO, then DISP=(NEW,KEEP).
For disposition parameter specifications and their results, see Table 10 on page 34
and Table 12 on page 37. Disposition processing for VSE/VSAM (ACB) access of a
SAM ESDS file is the same as for a VSE/VSAM ESDS file.
Space for extension of a file is allocated (if necessary) according to the secondary
space allocation specified at definition time. SAM ESDS files are always extended
in SPEED mode. See “Example 4: Define a Dynamic SAM ESDS File and Access”
on page 182.
This support is not provided for SAM ESDS work file access.
Depending on the VSE/VSAM functions you want to be able to use, you can
simply implement only the first step, or you can complete the other steps as well.
Step 2
Step 1 Step 3
Table 23 lists the valid combinations of access modes and file types that can be
used when the VSE/VSAM Space Management for SAM Function is effective.
Table 23. Valid Combinations of Access Methods and File Types
Access Mode
File Type VSE/VSAM Access Managed-SAM Access
SAM ESDS Valid Valid
VSE/VSAM ESDS Valid Invalid
Besides these defines, you can do the following with a file that already has been
explicitly or implicitly defined and used:
extend it, or
reset it to empty, or
reuse it.
Note: If the catalog is password-protected, implicit define will request the update
or higher level password of the catalog, and implicit delete will request the master
password of the catalog.
The following is not a complete list of the parameters that are eligible to be
specified. However, for SAM ESDS files, you need to evaluate the applicability of
these particular parameters:
v NAME -- Cluster level (Required parameter)
v NAME -- Data component level (Optional parameter unless you wish to request
single extent primary allocation, in which case it is required)
v NONINDEXED -- (Required parameter)
v RECORDFORMAT -- (Required parameter)
v RECORDSIZE -- (Required parameter if RECORDFORMAT is in fixed format;
for example, FIXUNB or FIXBLK. Optional for V, VB, or U format.)
v RECORDS or
TRACKS or
CYLINDERS or
BLOCKS
(One of these parameters is required unless a default model exists for a SAM
ESDS file.)
v VOLUMES -- (Required parameter unless a default model exists for a SAM
ESDS file.)
Note: This parameter is required to explicitly define a SAM ESDS file. You
can specify it either at the cluster level or data component level.
format For format, substitute one of the following values:
Note: This parameter specifies the largest SAM logical block size that may
be used. If a DTF is opened for OUTPUT or WORK and specifies a
BLKSIZE larger than the maximum SAM logical block size allowable in the
file, the OPEN fails and the job is canceled. You must be careful to specify
the maximum RECORDSIZE that a system program or program product
will use during explicit define of the file. If multiple system programs or
program products are to use the same (work) file, the maximum
RECORDSIZE should be equal to the largest record that any of the
programs will use.
If the RECORDFORMAT parameter is specified as VARUNB, VARBLK, or
UNDEF and the RECORDSIZE parameter is omitted, the RECORDSIZE
defaults to 4089 for the average and 4089 for the maximum (that is,
RECORDSIZE (4089 4089)). (Note that RECORDSIZE(maximum) is used in
calculating the CI size and therefore has no meaning when NOCIFORMAT
is specified.)
Whether or not you specify the NOCIFORMAT subparameter, you can use
the RECORDSIZE(average) and RECORDS parameters for the suballocation
of space. When using the RECORDSIZE and RECORDS parameters
together, they must be consistent in units of reference (either both refer to
SAM logical records or both refer to SAM logical blocks). Note that both
the average and maximum record size must be specified in the
RECORDSIZE parameter when one is specified.
For V, VB, or U records, the RECORDSIZE parameter is optional. For F or
FB records, the RECORDSIZE parameter is required. For FB records, the
RECORDSIZE must be a multiple of the SAM logical record size specified
in the RECORDFORMAT parameter. For V or VB records, the maximum
RECORDSIZE parameter must include room for the control information for
variable length records (the record length field is four bytes and the block
length field is four bytes) because the control information is part of the
SAM logical block.
TRACKS|CYLINDERS|BLOCKS(primary)
The rules involved in the use of these parameters are the same for a SAM
ESDS file as for a VSE/VSAM file. For information concerning the
TRACKS, CYLINDERS, and BLOCKS parameters, search the index of the
VSE/VSAM Commands, SC33-8315; they exist, for example, for the DEFINE
ALTERNATEINDEX command.
VOLUMES(volser)
Specifies the volume(s) to contain the SAM ESDS file. Every volume that
you specify must be owned by the catalog that is to own the SAM ESDS
file. If not specified during define of a SAM ESDS file, VSE/VSAM picks a
set of volumes for you if you have a default model
(DEFAULT.MODEL.ESDS.SAM) defined. For information on the
Additional Considerations
v The RECORDFORMAT attributes can be modeled by means of the MODEL
parameter.
v You should specify REUSE when a SAM ESDS file is used mainly for work
files. You should additionally specify NOALLOCATION in the DEFINE
CLUSTER command to provide the dynamic file capability to work files.
v Do not specify RECOVERY. (VSE/VSAM defaults to SPEED for a SAM ESDS
file.) You cannot build an alternate index or define a path over a SAM ESDS file.
Note: For work files, a zero retention period is the default and is normally
appropriate to avoid operator communications during a subsequent OPEN if the
file was not deleted at CLOSE.
Some programs that access data through DTFPH with EXCP may require that disk
space for the file be allocated as a single extent. You can specify that you want the
primary space allocated as a single extent by specifying the data component name
as above. (Normally, VSE/VSAM may obtain an allocation in as many as five
extents.) The cluster name is still chosen in the same manner as before, but
DOS.WORKFILE.SYS must prefix the data component name to ensure that space is
allocated within a single extent.
VSE/VSAM will deny the allocation request if it cannot obtain the primary
allocation in a single extent.
You specify a partition-unique file-ID by using the prefix “%” in the cluster name
parameter of the DEFINE CLUSTER command. (The file-ID is limited to
twenty-seven characters in this case.)
If your system also has the Interactive Computing and Control Facility (ICCF)
installed, you are allowed only one partition-independent file for every ICCF
real-partition. (ICCF pseudo-partitions do not have unique partition IDs, so there
can be only one partition-independent file per partition.)
Note: DTFPH (with a CISIZE of zero specified or no CISIZE specified) is the only
possible way you can implicitly define a non-CI format file. Also, if a nonzero
value is specified for the CISIZE parameter, it must be greater than seven in order
to choose a valid maximum record size.
Chapter 9. VSE/VSAM Support for SAM Files 167
SAM ESDS: Creating
The DLBL statement provides the following information for implicit define:
v file-ID — This parameter provides the unique name associated with the file.
To request single extent allocation through an implicit define,
DOS.WORKFILE.SYS must prefix the file-ID.
A partition/processor unique file-ID may also be specified. In this case the DLBL
file-ID must be specified with a prefix of “%” (partition-unique) or “%%”
(partition- and processor-unique) with a limit of twenty-seven characters. For
both partition/processor uniqueness and single extent primary allocation, the
DLBL file-ID prefix may be specified as “%%DOS.WORKFILE.SYS” (with a limit
of eleven additional characters).
If your system also has Interactive Computing and Control Facility (ICCF)
installed, you are allowed only one partition-independent file for every ICCF
real-partition. ICCF pseudo-partitions do not have unique partition IDs, so there
can be only one partition-independent file per partition.
v date — This parameter indicates either the retention period in days or the actual
expiration date. If this parameter is not present the normal default applies.
Note: For work files, specify a zero (retention period) to avoid operator
communications during a subsequent OPEN if the file was not deleted at
CLOSE.
v CAT=filename — This parameter indicates the catalog that owns the file. If this
parameter is not present the normal default applies.
v RECORDS=(primary,secondary) — This parameter designates the number of
SAM logical records for allocation purposes. If no secondary amount is specified,
twenty percent of the primary allocation is assumed. Zero can be specified for
the secondary amount. If RECORDS is specified, RECSIZE=n must also be
specified.
v RECSIZE=n — This parameter indicates the average SAM logical record size; it
must be specified together with the RECORDS=(primary,secondary) parameter.
The value n is only used for space calculation; it does not influence the CI size.
Note: You may alternatively specify the average SAM logical block size in the
RECSIZE parameter. If you do this, you should also specify the number of SAM
logical blocks in the RECORDS parameter.
v CYL=(primary,secondary) — This parameter designates the number of cylinders
for allocation purposes. If no secondary amount is specified, twenty percent of
the primary allocation is assumed. Zero can be specified for the secondary
amount. This parameter is correct only for CKD disks.
v BLK=(primary,secondary) — This parameter designates the number of blocks for
allocation purposes. If no secondary amount is specified, twenty percent of the
primary allocation is assumed. Zero can be specified for the secondary amount.
This parameter is correct only for FBA disks.
v CISIZE=n — For VSE/VSAM this parameter specifies a control interval size for
SAM ESDS dataset. The size overrides that specified (or defaulted) in the
respective DTF macro. The specified size must be a number from 1 to 32,768.
VSAM will round the value up to the multiple of 512 bytes or multiple of 2K (if
specified value is greater then 8K) but greater then the SAM logical block length.
The EXTENT statement provides the following information for implicit define:
v Volume serial number — This indicates the volume that this file resides on.
There must be one EXTENT statement for every volume that the file is eligible
to reside on. If EXTENT statements are specified, this parameter is required on
every EXTENT statement.
v Number of tracks or blocks (specified in the first EXTENT statement if multiple
EXTENT statements are specified) — This indicates the number of tracks (CKD)
or blocks (FBA) to be allocated to this file. A secondary allocation size of twenty
percent of the primary allocation size (rounded up) is assumed. Whether it is
tracks or blocks is determined by the device type of the volume serial number
specified. This parameter is ignored on subsequent EXTENT statements, or if the
RECORDS/RECSIZE, or CYL, or BLK parameters are specified in the DLBL.
Note: The EXTENT statement is not required for implicit define if a default model
for a SAM ESDS file was previously defined (providing VOLUME information)
and RECORDS/RECSIZE are specified in the DLBL statement (providing allocation
information). When an implicit DEFINE is done, only the VOLUMES parameter is
allowed to be modeled.
Support is also provided for DTFPH and EXCP access; in this case, it is space
management support only. The data formats that can be written and read by the
EXCP program are entirely under control of the EXCP program itself.
Empty Files
A file in any of these states is considered empty (that is, the high-used RBA is
zero). In any of these cases, if the file is opened for input through DTFSD
TYPEFLE=INPUT, the OPEN will be successful and control will be passed to the
EOFADDR on the first GET. This DTF OPEN is actually simulated because
VSE/VSAM OPEN (ACB) will not open an empty file for input. However, this is
transparent to the DTFSD user.
If other DTF types (such as DTFPH) are opened for INPUT on an empty file,
VSE/VSAM cannot simulate the end of file condition. This OPEN cannot be
allowed because the file has not been opened by VSE/VSAM and the file extents
have not been located. (The file may not even be allocated in the case of a dynamic
file.) Therefore, such an OPEN will be cancelled if the file is empty.
If EXTENT statements with symbolic units and ASSGN statements are used, and if
any one (or more) of the assignments is ignored (IGN), then the entire file is
ignored. That is, the DTF is not opened and DTF+X‘10’, bit 2 (X‘20’) will be set.
Disk-Independence
type. You should not assume that a particular symbolic unit will be used. This will
allow you to take advantage of VSE/VSAM's job control simplifications. Note that
(unmanaged) SAM now provides for disk independence by ignoring the DTF
DEVICE= parameter during OPEN.
GETVIS Space
Sufficient GETVIS space must be provided for managed-SAM access; enter the
specifications in the SIZE parameter of the EXEC job control statement, or in the
SIZE job control command. The partition GETVIS area must contain at least 40KB
for the VSE/VSAM catalog, plus 10KB for every SAM ESDS file, plus storage for
the CI buffer for every SAM ESDS file.
Work Files
v The format of NOTE/POINT IDs for a managed-SAM CKD file is similar to
unmanaged SAM FBA NOTE/POINT ID format. That is, for all devices, the
managed-SAM NOTE/POINT ID format is CCCN rather than (as for
unmanaged SAM) CCHR for CKD and CCCN for FBA. Therefore, you should
not generate or modify a NOTE/POINT ID. Also, do not move or modify the
DTF between OPEN and CLOSE.
v The DELETFL=NO parameter of DTFSD TYPEFLE=WORK is determined at
OPEN. Modifying this indicator after OPEN will have no effect on the CLOSE
disposition. Note that DLBL DISP specification overrides the DTF DELETFL
indicator. If there are any other DTFs or ACBs currently open for this file at
CLOSE, the file is not deleted. If the DTF is not closed by the end of job step,
automatic CLOSE attempts to close the file.
v Files accessed through DTFSD TYPEFLE=WORK are normally reset at OPEN. If
you wish to read a file using a work file DTF, specify DISP=OLD in the DLBL to
avoid losing the data due to reset.
– The only system data file that is supported is SYSLNK (IJSYSLN). The job is
canceled if any other system data files are specified at OPEN.
– System work files (IJSYSnn) are supported unless restricted by the program
accessing the system work file.
v Some system programs or program products may have restrictions on the use
of managed-SAM files. (For example, the files may be limited to a single extent,
or managed-SAM files may not be supported.) Please consult the appropriate
VSE/VSAM or Program Product publication for planning and support
considerations.
DTF Specifications
DTFPH Specifications
v Undefined
SAM access (through DTF) of V or VB records returns the RL (record length field)
at the beginning of the record. VSE/VSAM access (through ACB) does not return
it. Correspondingly, for a PUT for V or VB records, no RL should be at the
beginning of the record when it is passed to VSE/VSAM because VSE/VSAM
prefixes the RL. A program using VSE/VSAM access (through ACB) for sequential
processing can process a VSE/VSAM ESDS file or a SAM ESDS file.
Differences between the VSE/VSAM access of a VSE/VSAM ESDS file and the
VSE/VSAM access of a SAM ESDS file are:
v VSE/VSAM always loads and extends a SAM ESDS file in SPEED mode.
v VSE/VSAM does not build an alternate index over a SAM ESDS file.
v VSE/VSAM does not support path entries over a SAM ESDS file.
v VSE/VSAM does not support VSE/VSAM SPANNED records for a SAM ESDS
file.
ALTER Command
entryname/password
BUFFERSPACE(size)
ERASE|NOERASE
EXCEPTIONEXIT(mname)
WRITECHECK|NOWRITECHECK
For the applicable DEFINE CLUSTER parameters, see “Explicit Define Cluster
(Using the DEFINE CLUSTER Command)” on page 162.
DELETE Command
You can use the DELETE command as described in the VSE/VSAM Commands,
SC33-8315, except that the ERASE parameter is not valid for a NOCIFORMAT
SAM ESDS file.
An implicitly defined SAM ESDS file may be deleted by way of the DELETE
command in the same manner as an explicitly defined SAM ESDS file. Refer also
to “Implicit Deletion of a SAM ESDS File” on page 178.
EXPORT Command
If you are exporting a CI-format SAM ESDS file, VSE/VSAM treats it as an ESDS
file. If you attempt to export a NOCIFORMAT SAM ESDS file, VSE/VSAM issues
an error message and terminates the command.
You cannot use a SAM ESDS file as the portable file (OUTFILE parameter).
IMPORT Command
IMPORT provides full import support for those SAM ESDS files which can be
exported. When attempting to import a SAM ESDS file into a predefined empty
file, IMPORT ensures that the exported file and the predefined file have fully
consistent RECORDFORMAT parameter values and that the maximum record size
of the predefined file is not less than that of the file originally exported. Any
mismatch causes an error message and command termination.
LISTCAT Command
You can display space for a SAM ESDS file by specifying LISTCAT SPACE. You
can display all files that have been defined for a particular catalog by using the
LISTCAT command; this includes all SAM ESDS files defined either explicitly or
implicitly.
The Statistics Group (data) is listed for a SAM ESDS file. However, it should be
noted that these statistics are maintained during VSE/VSAM access only and not
during managed-SAM access. For more information on the statistics, refer to the
VSE/VSAM Commands, SC33-8315.
PRINT Command
You can print a CI-format SAM ESDS file by way of managed-SAM access or
VSE/VSAM access. The output is always SAM logical records. You cannot print a
NOCIFORMAT ESDS file through either managed-SAM or VSE/VSAM access.
(For an example of printing a SAM ESDS file by retrieving the SAM logical records
with managed-SAM, see “Example 4: Define a Dynamic SAM ESDS File and
Access” on page 182.)
REPRO Command
CI-format SAM ESDS files can be used as input or output files in a REPRO
command wherever SAM files or VSE/VSAM ESDS files are currently allowed.
(Do not specify a NOCIFORMAT SAM ESDS as an input or output file.) You can
use the REPRO command to convert an unmanaged-SAM file to a SAM ESDS file
by using the following specifications:
v INFILE(dname,ENVIRONMENT(subparameters))
Indicates the unmanaged SAM file to be used as the input file.
v OUTFILE(dname/password ENVIRONMENT(subparameters))
Indicates the CI-format SAM ESDS to be used as the output file. If the output
file is a managed-SAM file that is to be created by way of managed-SAM access,
and it has not been previously defined, it will be implicitly defined if the job
control statements meet the requirements of implicit define.
– For both the INFILE and OUTFILE parameters, dname specifies the filename of
the DLBL job control statement that identifies the file to be copied. The
ENVIRONMENT parameter is not always required. Coding the
ENVIRONMENT (...) parameter instructs IDCAMS to use SAM access, that is,
access through a DTF control block. Without the ENVIRONMENT parameter
VSAM access will be used (ACB). The ENVIRONMENT parameter is required
in one of the following cases:
- To access an unmanaged SAM file
- To allow an implicit definition of an output file
password is not allowed for SAM access.
v FROMADDRESS(address) TOADDRESS(address)
You can specify FROMADDRESS and TOADDRESS for VSE/VSAM access (not
managed-SAM access). The RBA value for FROMADDRESS must be the exact
beginning of a SAM logical record.
v SKIP(count) COUNT(count)
You can specify SKIP and COUNT (for both VSE/VSAM and managed-SAM
access) and the value always indicates the number of SAM logical records to be
skipped or copied.
VERIFY Command
If the VERIFY command is executed on a CI-format SAM ESDS file, you can
discover whether the file was successfully closed (warning messages are issued),
but you cannot cause the end-of-file indicator in the catalog entry to be updated.
This is because a SAM ESDS file is always loaded and extended in SPEED mode.
A SAM ESDS file cannot be accessed for input by VSE/VSAM unless it was
successfully closed after initially loaded. (If the file is accessed for input by
managed-SAM without closed, an OPEN in a subsequent job step will be
successful and the first GET will cause the user to be sent to the EOFADDR
routine.) The file can only be accessed by VSE/VSAM up to the data written by
the last successful CLOSE if extended. After extension, a SAM ESDS file can be
accessed by managed-SAM even if the CLOSE was unsuccessful; however, the file
may not terminate with an SEOF.
You can use the DELETE command as described in the VSE/VSAM Commands,
SC33-8315, except that the ERASE parameter is not valid for a NOCIFORMAT
SAM ESDS file.
An implicit delete of a SAM ESDS file occurs if all the following conditions are
true for any of the following cases:
1. Case 1
During OPEN of DTF (implicit delete followed by implicit define)
v The catalog entry has been implicitly defined.
v The DTFSD maximum logical block size exceeds the VSE/VSAM catalog
maximum RECORDSIZE of the SAM ESDS file or the RECORDFORMAT of
the file is NOCIFORMAT.
v DTFSD TYPEFLE=OUTPUT, WORK, or WORKMOD.
v The file is unexpired and the operator has responded “delete” to message
4233A EQUAL FILE-ID IN CATALOG, or the file is expired.
v DISP=OLD is not specified.
2. Case 2
During CLOSE of DTF
v The catalog entry has been implicitly defined.
v DISP=(,delete)
3. Case 3
During CLOSE of DTF
v The catalog entry has been implicitly defined.
v DISP=(,date)
// JOB SDOUTPUT
// OPTION CATAL,NODUMP
PHASE SDOUTPUT,*
// EXEC ASSEMBLY,SIZE=120K,PARM=’XREF’
SDOUTPUT START X'200078'
BALR 2,0
USING *,2
OPEN SDOUT,PRINT
LA 5,1 INITIAL COUNT TO 1
L 6,MAXRCDS LOAD NO. OF RECORDS TO WRITE
LOOP CR 5,6 WRITTEN LAST RECORD YET
BH CLOSE YES
STORE ST 5,RECNO NO, STORE RECORD NUMBER
CVD 5,DWB CONVERT KEY TO DECIMAL
UNPK NUM(15),DWB(8) UNPACK KEY
TM UNPKSIGN,X’10’ SEE IF NUMBER WAS NEGATIVE
BO NEG1 YES, NEGATIVE
MVI SIGN,C’+’ MAKE OUTPUT SHOW POSITIVE
B CONTINUE
NEG1 MVI SIGN,C’-’ MAKE OUTPUT SHOW NEGATIVE
CONTINUE OI UNPKSIGN,X’F0’ MAKE LAST BYTE A NUMBER
PUT PRINT PRINT KEY
PUT SDOUT,WORKAREA PUT FROM WORKAREA
LA 5,1(5) INCR RECORD NO.
B LOOP GO BACK
CLOSE CLOSE SDOUT,PRINT CLOSE THE FILE
EOJ
EJECT
*
SDOUT DTFSD BLKSIZE=2008,1 X
DEVADDR=SYS007,2 X
IOAREA1=OUTPUT1, X
DEVICE=2314,3 X
RECFORM=FIXBLK,4 X
RECSIZE=80, X
TYPEFLE=OUTPUT,5 X
WORKA=YES
EJECT
PRINT DTFDI DEVADDR=SYSLST, X
IOAREA1=IOAREA, X
RECSIZE=17
*
EJECT
DWB DC D’0’ USED TO CVD INTO
*
IOAREA DC 0CL17’ ’
DC C’ ’ PRINT CONTROL
OUT DC 0CL16’ ’
SIGN DC C’ ’ PRINTED SIGN
NUM DC 0CL15’ ’ PRINTED KEY
DC CL14’ ’
UNPKSIGN DC C’ ’ LAST BYTE OF UNPACKED NUMBER
*
MAXRCDS DC F’400’ NO. OF RECORDS TO WRITE
*
WORKAREA DC 0CL80’ ’
RECNO DC F’0’ CURRENT RECORD NO.
DC CL76’ ’
OUTPUT1 DC CL8’ ’ AREA FOR COUNT
DC 25CL80’ ’
EJECT
* SDMODFOB6
DIMOD TYPEFLE=OUTPUT
END SDOUTPUT
/*
// IF $MRC GT 0 THEN
// GOTO ERRORS
// LIBDEF PHASE,CATALOG=USER.LIB
// EXEC LNKEDT
/*
/. ERRORS
// EXEC LISTLOG
/&
Note: If IOAREA2 is specified in the DTFSD (in combination with either IOREG or
WORKA) and implicit define occurs, VSE/VSAM will attempt to choose a CI size
that will hold at least two SAM logical blocks.
/*
/&
// JOB LOAD A MANAGED SAM FILE (400 RECORDS)
// DLBL SDOUT,’MANAGED.SAM.FILE2’,0,VSAM,RECORDS=400,RECSIZE=804
// LIBDEF *,SEARCH=(USER.LIB)
// EXEC SDOUTPUT,SIZE=AUTO
/&
RECORDFORMAT(FIXBLK) -
RECORDSIZE(80)))
/*
/&
For values for CI size and tracks, refer to Table 20 on page 93.
Assumptions
Device type=3390
Allocation specified=TRK(3 1)
CI size=14KB
Physical block size=7KB
1 track=7 blocks (PR)
11 CIs of data are written
CA=Min (primary (3 TRKs), secondary (1 TRK), Max-CA(1 CYL))
Assumptions:
Device type=3390
Allocation specified=TRK(3 1)
CI size=14KB
Physical block size=7KB
When you have defined a VSE/VSAM ESDS file, the CI is made up of VSE/VSAM
logical records and their related control information. When you define a SAM
ESDS file, the VSE/VSAM logical records become SAM logical blocks. The CI size
is a multiple of the VSE/VSAM block size and normally determined by
VSE/VSAM, not by you, at DEFINE time. Control information in a CI consists of a
CIDF and RDFs. There is an RDF for every SAM logical block (VSE/VSAM logical
record) indicating its length, except in the case of consecutive logical blocks of
equal length, in which case the first RDF (right-most of the pair) describes the
length of the logical blocks and the second RDF (left-most of the pair) tells how
many logical blocks the first RDF describes.
The SAM logical block consists of SAM logical records. In the case of VB format,
every logical record is prefixed with an RL (record length) field which indicates the
length of the record. The SAM logical block begins with a BL (block length) field
which indicates the length of the block. During managed-SAM (DTF) access of V
or VB records, the RL is returned at the beginning of the record. For VSE/VSAM
(ACB) access, it is not. A program using VSE/VSAM (ACB) access for sequential
processing can process a SAM ESDS file or a VSE/VSAM ESDS file.
BR R R
LL Record L Record L Record
Note:
1. The SAM LOGICAL BLOCK size is what you specify in the RECORDSIZE
parameter when you DEFINE a SAM ESDS file, and define in the BLKSIZE
parameter of the DTF.
2. The SAM LOGICAL RECORD size is what you specify in the SIZE parameter
of the DTF.
describes how you can backup VSE/VSAM datasets using an IDCAMS SNAP
command:
v “Overview of the IDCAMS SNAP Command”
v “Avoiding Incorrect Usage of Volumes and Catalogs” on page 188
v “Advantages in Creating a Snapshot of Entire Disk Volumes” on page 188
v “Using IDCAMS SNAP and BACKUP With a Synonym List” on page 189
v “Example of Running IDCAMS SNAP / BACKUP With a Synonym List” on
page 191
v “Using the FlashCopy Dialog to Backup VSE/VSAM Data” on page 191
v “Controlling Access to the IDCAMS SNAP Command” on page 192
Related Topics:
When SNAP is issued with the NOCOPY parameter, the physical copying of data
to the target volumes is not performed. Instead:
v The snapshot on the target volumes is “simulated” until a SNAP command with
the DDSR parameter has been issued.
v Both real and simulated “frozen” copies of VSE/VSAM data can be safely used
for archiving, while the source volumes are updated by other applications.
To support the “frozen” state of the snapshot, ESS utilizes its internal resources,
like ESS cache, for tracking possible updates of the source volumes that may be
done while copying is performed. When copying is finished, ESS resources are
freed automatically. However if you use SNAP with the NOCOPY parameter, you
should later free the ESS resources by the SNAP DDSR command. To prevent
wasting of the ESS resources, access to the SNAP command can be restricted. For
more information on this, refer to “Controlling Access to the IDCAMS SNAP
Command” on page 192.
The SNAP command is especially helpful when ordinary copy or backup may
cause problems with data integrity because of updates done to source volumes by
other applications. For the format of the SNAP command, refer to VSE/VSAM
Commands, SC33-8315.
You can use the IDCAMS IMPORT CONNECT command to connect the copied
catalog on the target volume to the master catalog. This results in the copied
catalog being included in the search path. However, the connected catalog is of
limited use. This is because:
v To avoid duplication of names, the catalog on the target volume will be
connected via its new name (the synonym catalog name SYNONYMCATALOG).
However, the original name of the catalog is still stored internally in the catalog
and will be used by VSAM operations.
v VSAM catalogs retain the information about the VOLIDs on which the catalogs
and clusters were originally created. After this information has been copied to
the target volumes, it is therefore no longer valid. Note: VSAM does not allow
duplicate VOLIDs (that is, different volumes having the same VOLID).
Note: Before initiating the IXFP SNAP command, the target volumes must be
DOWN (DVCDN). This is the opposite to the situation when performing an
IDCAMS SNAP (where the volumes are UP by default).
6. Error-prone and time-consuming catalog changes are not required on the target
catalog. The target catalogs remains 100% unchanged. The target catalogs and
the datasets could then be used for disaster recovery (for example, to replace
one or more complete disk volumes).
7. When the snapshot is made, the content of the target volumes remain identical
to the content of the source volumes. This is very important if you must carry
out a disaster recovery.
8. Any BACKUP jobs that you run after the snapshot, will use “frozen” data on
the target volumes. This data is independent of any data changes that take
place on the online systems.
9. Running IDCAMS SNAP and IDCAMS BACKUP using a synonym list
significantly reduces the time during which your system is unavailable.
where:
COPY This keyword specifies that both the temporary and permanent
snapshots of the source volumes on the target volumes are to be
created. The temporary snapshots are available immediately by
referencing the target volumes and are created by establishing the IXFP
FlashCopy relation supported with internal ESS resources.
NOCOPY
This keyword specifies that only temporary snapshots of the source
volumes on the target volumes are to be created by establishing the
IXFP FlashCopy relation between the source and target volumes. The
real copying to the target volumes normally is not performed because
of using internal ESS resources to track out any changes done to the
source volumes.
SOURCEVOLUMES(volser[ volser...]) TARGETVOLUMES(volser[ volser...])
Are a pair of lists indicating from which volumes, and to which
volumes, the snapshot is to be done. Please Note: The target device
must be set UP (DVCUP command) prior to initiating the IDCAMS
SNAP function. For the target, this is the opposite to what you would
set for the IXFP SNAP command.Abbreviations: SVOLUME or SVOL,
TVOLUME or TVOL
NOPROMPT
This keyword prevents decision-type messages from being issued.
PROMPT
This keyword allows decision-type messages to be issued.
Note:
a. The catalog that has a synonym name now exists (including its datasets),
but cannot be accessed by normal applications.
b. You use a target Master Catalog in the same way as you use a target User
Catalog.
3. Run IDCAMS BACKUP using the Synonym List.
IDCAMS BACKUP uses the parameters contained in the synonym list:
v The synonym list is used to route the VSAM OPEN and BACKUP functions
to the target volumes.
v The BACKUP works in the same way as before, except that it uses the
synonym list to access the target volumes. Therefore, you can use all features
of IDCAMS BACKUP.
v You can use the output from this IDCAMS BACKUP (that uses a synonym
list) in the same way as before (for IDCAMS RESTORE).
This is an extract of the syntax of the IDCAMS BACKUP command:
BACKUP ..........
SYNONYMLIST(
SOURCEVOLUMES(volser[ volser...])
TARGETVOLUMES(volser[ volser...])
CATALOG(catname[/password])
SYNONYMCATALOG(catname[/password]) )
where:
SYNONYMLIST
Indicates that this backup uses a synonym list of target VSAM volumes.
Abbreviations: SYNLIST or SYNL
SOURCEVOLUMES(volser[ volser...]) TARGETVOLUMES(volser[ volser...])
Are a pair of lists indicating from which volumes, and to which
volumes, a FlashCopy has to be performed. Abbreviations: SVOLUME
or SVOL, TVOLUME or TVOL
CATALOG(catname[/password])
Specifies the name and the password of the source catalog, which is the
original catalog from which a FlashCopy was done. Abbreviation: CAT
SYNONYMCATALOG(catname[/password])
Specifies the synonym name and password of the target catalog which
was created by a FlashCopy to the target volume. You must ensure that
the synonym name of the catalog has been imported using IMPORT
CONNECT, before running the IDCAMS BACKUP. The password is
identical to the password of the source catalog.
Note: You must provide the synonym name of the catalog in a DLBL
statement containing filename IJSYSUC.
Abbreviation: SYNCAT
Input
// JOB SNAP and BACKUP from target volumes
// ASSGN SYS005,180
// DLBL IJSYSUC,’VSAM.SNAP.CATALOG’,,VSAM
// EXEC IDCAMS,SIZE=AUTO
/* First: do the SNAP */ -
SNAP COPY -
SOURCEVOLUMES(SOURCE1 SOURCE2 ) -
TARGETVOLUMES(TARGET1 TARGET2 )
/* Second: Synonym name for the target catalog */
IMPORT CONNECT OBJECTS((VSAM.SNAP.CATALOG -
VOLUMES(UCATVOL) DEVT(3390))) -
CATALOG(VSAM.MASTER.CATALOG)
/* Third: BACKUP from target volumes */ -
BACKUP (*) -
SYNONYMLIST( -
SOURCEVOLUMES(SOURCE1 SOURCE2 ) -
TARGETVOLUMES(TARGET1 TARGET2 ) -
CATALOG(VSAM.USER.CATALOG) -
SYNCATALOG(VSAM.SNAP.CATALOG) )
/*
/&
You can also use the option Flashcopy VSAM Catalog/Files in the
BACKUP/RESTORE VSAM OBJECTS dialog (Fast Path 3719) to create such a job
stream. For details, refer to “Using the FlashCopy Dialog to Backup VSE/VSAM
Data.”
Output
The output from using IDCAMS BACKUP (with a synonym list) is any normal
backup media (tape or disk). This is the same as any other IDCAMS BACKUP
output.
Note: The IDCAMS BACKUP requires the availability of the catalog and of all the
related disk volumes holding data of the VSAM files owned by the catalog.
To access the dialog, start with the z/VSEFunction Selection panel and select:
v 5 (Backup/Restore)
For further details about using FlashCopy to backup VSE/VSAM data, refer to the
z/VSE Operation, SC33-8309.
To prevent cases of this kind, system administrators can restrict the usage of the
IDCAMS SNAP command by using a security manager, for example the Basic
Security Manager (BSM) provided by z/VSE. For more information on BSM and the
BSTADMIN (fastpath 28) utility used to issue BSM commands or the dialog
support refer to z/VSE Administration, SC34-2627. A description of the IDCAMS
SNAP command can be found in VSE/VSAM Commands, SC33-8315.
You can control access to the IDCAMS SNAP command with the following BSM
profile names of the resource class FACILITY:
v VSAMSNAP.COPY for IDCAMS SNAP COPY
v VSAMSNAP.NOCOPY for IDCAMS SNAP NOCOPY
v VSAMSNAP.DDSR for IDCAMS SNAP DDSR
In all other cases the requested IDCAMS SNAP function is suspended and the
following message pair is displayed:
IDC32240I RACROUTE (AUTH) FAILED WITH RETURN CODE xx REASON xx
IDC32241I SAF RETURN CODE xx FOR RACROUTE (AUTH)
The example below shows how to define profiles in BSM to allow everyone to use
the SNAP COPY and SNAP DDSR commands and how to completely forbid usage
of the SNAP NOCOPY command.
r rdr,pausebg
AR 0015 1C39I COMMAND PASSED TO VSE/POWER
F1 0001 1R88I OK : 1 ENTRY PROCESSED BY R RDR,PAUSEBG
BG 0001 1Q47I BG PAUSEBG 000XX FROM (SYSA) , TIME=15:10:27
BG 0000 // JOB PAUSEBG
DATE 12/27/2007, CLOCK 15/07/27
BG-0000 // PAUSE
BG 0000 // ID (PARAMETERS SUPPRESSED)
BG-0000
0 exec bstadmin
BG 0000 1S54I PHASE BSTADMIN IS TO BE FETCHED FROM IJSYSRS.SYSLIB
BG-0000 BST901A ENTER COMMAND OR END
0 add facility vsam.snap.copy uacc(read)
BG 0000 BST904I RETURN CODE OF ADD IS 00
BG-0000 BST901A ENTER COMMAND OR END
0 add facility vsam.snap.ddsr uacc(read)
BG 0000 BST904I RETURN CODE OF ADD IS 00
BG-0000 BST901A ENTER COMMAND OR END
0 add facility vsam.snap.nocopy uacc(none)
BG 0000 BST904I RETURN CODE OF ADD IS 00
BG-0000 BST901A ENTER COMMAND OR END
0 end
BG-0000
0
Instead of BSTADMIN, you can also use the Interactive Interface dialogs for
security.
Groups of Macros
The VSE/VSAM macros can be grouped according to main tasks and the
relationship between the various macros. The following shows the groups and
outlines the purpose of the individual macro.
Request Macros
v GET retrieves a record from a file for processing.
v PUT inserts a record in a file.
v POINT positions control on a specific address in the file.
v ERASE deletes a record in a file.
v ENDREQ ends processing of a GET or POINT request.
OPEN/CLOSE Macros
v OPEN connects a program to a file.
v CLOSE prepares the separation and disconnects a program from a file.
v TCLOSE prepares the separation but leaves program and file connected.
The RPL macro specifies information for a request to access a particular record in
the file.
The GENCB macro can be used in place of the ACB, EXLST, or RPL macros to
generate processing specifications while the processing program is running.
The other information that you specify enables OPEN to prepare the kind of
processing to be done by your program.
Exit Routines
The address of a list of exit-routine names that you supply (EXLST parameter). You
use the EXLST macro, described next, to construct the list.
I/O Buffers
The amount of space for I/O buffers (BUFSP parameter) and the number of I/O
buffers (BUFND and BUFNI parameters) that VSE/VSAM will use to process data
and index records. The minimum number of buffers allowed depends on how
much buffer space is allocated, the number of concurrent requests to be allowed,
and whether processing will be direct or sequential.
Password
The password, if required, indicates the level of authorization to access the file:
read, read and update, and so on (PASSWD parameter).
Processing Options
Concurrent Requests
For processing concurrent requests (STRNO parameter), the number of requests
that are defined for processing the file (see the discussion of the RPL macro
following EXLST).
Error Messages
Address and length of an area for error messages from OPEN, CLOSE, or TCLOSE
(MAREA and MLEN parameters).
When VSE/VSAM encounters an error in an I/O operation that the z/VSE error
recovery routines cannot correct, it exits to the physical-error analysis (SYNAD)
routine. VSE/VSAM sets a code in the RPL to indicate whether the I/O error
occurred during reading or writing the data or the index.
Errors not directly associated with an I/O operation, such as an invalid request,
cause VSE/VSAM to exit to the logic error analysis (LERAD) routine. VSE/VSAM
sets a code in the RPL that indicates the type of logic error.
When your program requests a record beyond the last record in the file during
sequential access, your end-of-file (EODAD) routine is given control. The last
record is the highest-addressed record for addressed or control-interval access or
the highest-keyed record for keyed access. If an EODAD exit routine is not
available, control is given to the LERAD exit routine.
routine must return control to VSE/VSAM, which continues your mainline routine
at the instruction following the request macro. The EXCPAD exit is intended for
use by programmers of utilities and systems.
You can use the JRNAD routine to journal the transactions made against your file
and to keep track of RBA changes.
For recording transactions, VSE/VSAM exits to the JRNAD routine every time
your processing program issues a GET, PUT, or ERASE. For keeping track of RBA
changes, VSE/VSAM takes the JRNAD exit every time data is shifted within a CI
or moved to another CI. To process a key-sequenced file with addressed access,
you need to know whether any RBAs have changed during keyed processing.
VSE/VSAM takes the JRNAD exit before transmitting to direct-access storage the
contents of a CI in which there was an RBA change.
You can use a single RPL to define parameters that apply to several requests. With
the MODCB macro (described below) you can modify some of the parameters to
change the type of processing, such as from direct to sequential or from update to
non-update.
For concurrent requests, which require VSE/VSAM to keep track of more than one
position in a file, any number of RPL macros may be used asynchronously by a
processing program or its subtasks to process a file. The requests can be sequential
or direct or both, and they can be for records in the same part or different parts of
the file. You need specify only the RPL parameters appropriate to a given request,
as follows:
For a keyed request, you specify either a generic key or a full key to which the key
field of the record is to be matched. A generic key can match several records while
a full key matches only one record. You can also specify that, if the key does not
match the key of any record in the file, the record with the next greater key will be
processed.
For retrieval, a request is either for a data record to be placed in a work area in the
processing program (move mode) or for the address of the record within
VSE/VSAM's I/O buffer to be passed to the processing program (locate mode).
For retrieval, update, insertion, or addition of a record, you must provide a work
area in which the record is to be processed (move mode). For retrieval, you can
have VSE/VSAM give you the address of the record within VSE/VSAM's I/O
buffer (locate mode) in this field.
This parameter specifies either the length of the work area in which a record is
placed (for move mode) or the four-byte address of the record in VSE/VSAM's
I/O buffer (for locate mode). Having a work area that is too small is considered a
logic error.
For storage, your processing program indicates the length to VSE/VSAM; for
retrieval, VSE/VSAM indicates it to your program.
This parameter is required only for processing by generic key. For ordinary keyed
access, the full key length is available from the catalog.
You can process several records with a single GET or PUT by chaining RPLs
together. For example, every RPL in a chain could contain a unique search
argument and point to a unique work area. A single GET macro would retrieve a
record for every RPL in the chain. A chain of RPLs is processed as a single request.
(Chaining RPLs is not the same as issuing concurrent requests that require
VSE/VSAM to keep track of multiple positions in a file.)
Transaction-ID (TRANSID)
With this parameter you can create a logical relationship between I/O requests
issued for different VSE/VSAM files.
The OPEN macro calls the Open routine, which verifies that the processing
program has authority to process the file, constructs VSE/VSAM control blocks
and establishes linkages to VSE/VSAM routines. By examining the DLBL statement
indicated by the DDNAME operand in the ACB macro and the volume
information in the catalog, Open verifies that the necessary volumes have been
mounted. When you are opening a key-sequenced file or an alternate index,
VSE/VSAM issues an error code to warn you if the data has been updated
separately from its index.
The Close routine completes any I/O operations that are outstanding when a
processing program issues a CLOSE macro for a file. It writes any output buffers
that have not been stored.
Close updates the catalog entries for any changes in the attributes of a file; it also
updates the statistics on file processing (such as number of records inserted). The
addition of records to a file may cause its end-of-file indicator to change, in which
case Close updates the end-of-file indicator in the catalog. These end-of-file
indicators help ensure that the entire file is accessible. If an error prevents
VSE/VSAM from updating the indicators, the file is flagged as not properly closed.
When a processing program subsequently issues an OPEN macro, it is given an
error code indicating the failure.
Because it is essential for the integrity of a file that it is closed properly, z/VSE
automatically attempts to close all open VSE/VSAM files within the partition at
both normal and abnormal termination of a job step. If any control blocks for a file
have been destroyed through an error in your program, this file cannot be closed
and a message is issued to the operator. EXLST routines are not entered during
automatic CLOSE.
Close restores control blocks to the status that they had before the file was opened,
and frees the virtual storage space that Open used to construct VSE/VSAM control
blocks.
The TCLOSE macro performs the functions of CLOSE, except that it leaves the
program and the file connected so that you can continue processing without
reopening the file. You can use the TCLOSE macro to protect data while the file is
loaded or extended. Positioning is lost when a TCLOSE is issued.
The MODCB macro is used to specify new values for fields in an ACB, EXLST, or
RPL. For example, to use a single RPL to retrieve directly the first record having a
certain generic key and then to retrieve sequentially the rest of the records having
that generic key, you would use MODCB to alter the RPL to change from direct to
sequential access.
SHOWCB allows you to examine the contents of fields in an ACB, EXLST, or RPL.
VSE/VSAM displays the requested fields in an area you provide. You can also
display fields in addition to those defined in the macros. For example, when a file
is open, you can display various counts, such as number of CI splits, number of
deleted records, and number of index levels. The RBA of the last record accessed
and the error codes set in the ACB or RPL after macro execution can also be
displayed.
The TESTCB macro enables you to test the contents of a field or combination of
fields in an ACB, EXLST, or RPL for a particular value and to alter the sequence of
your processing steps as a result of the test. Thus, TESTCB is similar to a branch
instruction. You can test the error codes set in the ACB or the RPL, for instance, or
the attributes of a file, such as record length.
The entries in a catalog are related. Several entries are required to describe an
object and its associated objects (for example, a cluster and its data and index
components); one entry points to one or more other entries, which point to yet
others. Figure 18 on page 202 shows the relationship of entries that describe the
following types of objects:
v Alternate index (G)
v Cluster (C)
Path Path
(R) (R)
Alternate
Cluster
Index
(C)
(G)
Upgrade
Set
(Y)
Indicates a pointer
from one entry to another
For example, an alternate index entry points to the entries of its data and index
components, its base cluster, and its path. SHOWCAT enables you to follow the
arrows pictured in Figure 18. You first issue SHOWCAT by specifying the name of
the object you want to display. The information VSE/VSAM returns to you (only if
EXTOPT is not specified) includes the CI numbers of the catalog entries that
describe any associated objects. You then issue subsequent SHOWCATs to retrieve
information from these associated entries by specifying the CI numbers that
VSE/VSAM has returned. The first time you issue SHOWCAT, VSE/VSAM
searches catalogs (in the following order) to locate the entry that describes the
object to be displayed:
1. The catalog identified by the SHOWCAT CATDSN parameter, if specified.
2. The catalog identified by the DLBL CAT parameter for the VSE/VSAM file.
3. The job catalog identified by the IJSYSUC DLBL statement, if supplied.
4. The master catalog (IJSYSCT).
v The master catalog – if the entry is in a user catalog specified by either the
SHOWCAT CATDSN parameter or the DLBL CAT parameter for the
VSE/VSAM file.
VSE/VSAM returns to you the address of the ACB that defines the catalog
containing the entry to be displayed. The subsequent times you issue SHOWCAT,
you can specify that address, which causes VSE/VSAM to search only the
corresponding catalog.
The Shared Resources facility, however, allows you to share buffers, I/O control
blocks, and channel programs among several VSE/VSAM files within a partition,
and to manage I/O buffers. These buffers and control blocks are allocated out of a
common resource pool at the time you issue an I/O request for a file. When the
request is satisfied, the same buffers and control blocks can be assigned to another
file (for direct requests).
Sharing these resources optimizes their use and also reduces the amount of virtual
storage required (the working set) per partition. The facility is especially useful in
an environment in which (a) many VSE/VSAM files are open and it is therefore
difficult to predict the amount of activity that will occur at a given time, or (b)
every transaction may refer to several files.
When you share resources for sequential access, you have to establish positioning
before you can issue your initial retrieval request, because with shared resources
VSE/VSAM does not automatically position itself at the beginning of a file opened
for sequential access. Also note that you may not use shared resources to load
records into an empty file.
The macros you use to share resources and write I/O buffers are:
v BLDVRP (build VSE/VSAM resource pool)
v DLVRP (delete VSE/VSAM resource pool)
v WRTBFR (write buffer)
In addition, the SHOWCAT macro is provided to display, for non-open files, the
catalog information needed for the proper specification of some of the BLDVRP
operands.
The ACB, RPL, SHOWCB, MODCB, and TESTCB macros have been extended to
provide for sharing resources and managing I/O buffers.
VSE/VSAM provides the processing option data set name sharing. Using this option:
v Improves data integrity when opening a file through different ACBs.
v Does not violate data integrity when writing to base clusters directly, or when
writing through paths or alternate indexes simultaneously.
v Allows local shared resources (LSR) or non-shared resources (NSR) to share I/O
buffers and control blocks of a file that has been opened through different ACBs.
ACBs that are created by VSE/VSAM internally can also access shared buffers;
this, however, does not apply to catalogs.
To use Data Set Name Sharing, you essentially have to make entries in the ACB
macro; in the:
v MACRF operand -- you have to specify DSN and DDN.
v BSTRNO operand -- you have to consider additional requirements for handling
the base cluster of an alternate index (AIX).
Considerations
If you use Data Set Name Sharing, note that:
v The first opening ACB has to define the total number of strings for the first and
all following ACBs. (This is similar to processing LSR resource pools.)
v All buffers have to be defined with the first ACB.
v All ACBs that are to be opened for a specific file must use the same resource
pool. That is, you have to specify the same SHRPOOL number in each ACB.
v VSE/VSAM ignores the definition of STRNO, BSTRNO, BUFSP, BUFNI and
BUFND for the second and further data set name shared ACBs.
v VSE/VSAM rejects an open to a reusable data set if ACB
MACRF=(....DSN,RST...) is specified.
v VSE/VSAM rejects an open if ACB MACRF=(....DSN,UBF...) is specified.
v Before issuing TCLOSE, issue ENDREQ to the ACB-related RPLs. This avoids
unpredictable results that could be caused by outstanding input/output
processing.
v For DSN shared ACBs, VSE/VSAM ignores the share option specified in the
IDCAMS commands ALTER and DEFINE. That is, if you specify data set name
sharing, and whenever VSE/VSAM has opened a file, all data integrity within
the DSN structure is handled internally by VSE/VSAM without the z/VSE
LOCK facility. Additional OPENs to this file without data set name sharing are
handled by VSE/VSAM depending on the specifications in the share option.
v It is not possible to share a path through an alternate index and a single alternate
index (either opened as a key sequenced file, or opened through a path specified
wit ACB MACRF=(AIX)). The reason for this is: there is a possibility that buffers
containing base cluster records and alternate index records are mixed.
Processing
The sharing of buffers and control blocks of a data set is initiated at OPEN time
through the operands MACRF=(DSN) and BSTRNO=number.
The following outlines the use of MACRF operand and the BSTRNO value:
GENCB ACB
,MACRF=(..,DSN),BSTRNO=number ...
This generates an ACB with MACRF=DSN, and sets the ACB field
BSTRNO to the additional base cluster string number.
MODCB ACB
,MACRF=(..,DDN|DSN),BSTRNO=number ...
This modifies the ACB to MACRF=DSN or DDN, and sets the ACB field
BSTRNO to the additional base cluster string number.
SHOWCB ACB
,FIELDS=(BSTRNO) ...
This tests the ACB for MACRF=DDN or DSN, and tests for the value of
the ACB field BSTRNO.
The option can be specified through the parameter RMODE31 that is available in
the macros ACB and BLDVRP. Refer to “The ACB Macro” on page 208 and “The
BLDVRP Macro” on page 219. For information on how VSE/VSAM allocates
buffers, refer to “Buffer Allocation above the 16MB Line of Storage” on page 19.
When you use 31-bit addresses in your programs, note the following:
v All VSE/VSAM control blocks that have fields defined as 31-bit addresses must
contain 31-bit addresses.
Do not use the high-order byte of a 31-bit address field as a user-defined flag
field. This applies to 24-bit and 31-bit addressing.
v You may obtain I/O data buffers from above or below the 16MB line as follows:
– Below the 16MB line by taking the default (=NONE) in the ACB or BLDVRP
macro.
– Above the 16MB line by specifying RMODE31=ALL in the ACB or BLDVRP
macro.
v The parameter list that is passed to your exit routine resides below the 16MB
line.
v You must recompile the portion of your program that contains the ACB,
BLDVRP, and DLVRP macro specifications, including control block manipulation
requests.
In the VSE/VSAM macros, you can code address as a symbolic name. Except for
the ACB, EXLST, and RPL macros, you can also code an address as a register,
using either ordinary register notation (with registers 2 through 12) or, if shown in
the format description as a decimal number in parentheses, special register
notation. For example:
RPL=address│(1)
means that you can specify either a symbolic address, any of the registers 2 to 12,
or Register 1.
The use of Registers 0, 1, 13, 14, and 15 is the same as for z/VSE macros.
VSE/VSAM does not save the contents of registers 0, 1, 14, 15 before using them.
The highest order part of register 13 can be changed, depending on the caller's
AMODE. If you use these registers, you must either save their contents yourself
(and reload them later) or finish with them before VSE/VSAM uses them. For
additional information about the use of registers, see the z/VSE System Macros
Reference, SC34-2638.
You can code a value (number) as any absolute expression, except for a
self-defining character term. You can code a name according to the rules of the
assembler. The control block manipulation macros (GENCB, SHOWCB, MODCB,
and TESTCB) can be coded in even more ways as shown in “Operand Notation for
VSE/VSAM Macros” on page 325.
Some operands of the VSE/VSAM macros can have more than one parameter.
These operands are shown with parentheses around the parameters (for example,
the MACRF operand of the ACB macro). This means that you can code the
operand, if it has only one parameter, with or without parentheses around the
parameter:
MACRF=option
MACRF=(option)
You code the values for the ACB macro operands as absolute numeric expressions,
character strings, codes, and expressions that generate valid relocatable A-type
address constants. Ordinary register notation cannot be used for address.
,BUFNI=number ,BUFSP=number ,DDNAME=filename
,MLEN=0
,EXLST=address , Macfg ,MAREA=address ,MLEN=number
,
,PARMS=( )
KEEP
CLOSDSP=( )
DELETE ,KEEP
DATE ,DELETE
DSNAME=address
,SHRPOOL=0
,PASSWD=address NONE ,SHRPOOL=number
,RMODE31=
BUFF
ALL
CB
,STRNO=1
,STRNO=number
Macfg:
,NSR ,NUB
)
,LSR ,UBF
This macro specifies the kind(s) of processing you will do with the file. The
options must be meaningful for the file. For example, if you specify keyed access
for an entry-sequenced file, you will not be able to open the file. You must specify
all of the types of access you are going to use, whether you use them concurrently
or by switching from one to the other.
For information on the interaction between the DLBL DISP parameter and the ACB
MACRF specification when a file is opened, refer to “File Disposition” on page 32.
BUFND=number
specifies the number of I/O buffers to be used to hold CIs containing data
records. Every buffer is the size of one data CI. The allowable minimum
specification (and also the default) is the number specified for STRNO, plus
one. (The default for STRNO is one.) If you specify the BUFND operand, but
your specification is less than the minimum, VSE/VSAM overrides your
specification and uses the minimum. However, VSE/VSAM issues no message
to inform you of this.
These buffers will be allocated in 24-bit partition GETVIS, unless
“RMODE31=BUFF” is specified, or “BUFDAT=RMODE31” is specified on the
DLBL statement at run-time. If there is insufficient storage available to satisfy
this request, processing will terminate with an appropriate OPEN error code.
VSE/VSAM increases the number of data buffers you specify if the amount of
virtual storage available for buffers differs from the storage requirements
indicated by the BUFND and BUFNI operands. See the BUFSP operand for an
explanation. For examples of BUFND use, see “Buffer Specification” on page
97.
BUFNI=number
specifies the number of I/O buffers to be used to hold index CIs (index
records). Every buffer is the size of one index CI. The minimum number you
can specify is the number specified for the STRNO operand. (If you omit
STRNO, BUFNI must be at least one, because the default for STRNO is one.) If
BUFNI is omitted, the default is the number specified for STRNO, because the
smallest number of index buffers allowed is one for every string. If you specify
the BUFNI operand, but your specification is less than the minimum,
VSE/VSAM overrides your specification and uses the minimum. However,
VSE/VSAM issues no message to inform you of this.
VSE/VSAM increases the number of index buffers you specify if the amount of
virtual storage available for buffers differs from the storage requirements
indicated by the BUFND and BUFNI operands. See the BUFSP operand for an
explanation. For examples of BUFNI use, see “Buffer Specification” on page 97.
BUFSP=number
specifies the size, in bytes, of an area for data and index I/O buffers.
VSE/VSAM issues a GETVIS macro to obtain the buffer area in your
processing partition. It must be at least as large as the buffer space size
recorded in the catalog entry for the file. If your specification is too small,
VSE/VSAM overrides it and uses the value recorded in the catalog for buffer
space size. However, VSE/VSAM issues no message to inform you of this.
If you do not specify the BUFSP operand, the buffer space size will be the
larger of (1) the size recorded in the catalog or (2) the size determined from the
values specified for BUFND and BUFNI. (The size recorded in the catalog was
specified by the BUFFERSPACE parameter in the DEFINE command of
IDCAMS. If that parameter was omitted when the file was defined, a default
value was set in the catalog. This default value, the minimum amount of buffer
space allowed by VSE/VSAM, is enough space for two data CIs and one index
CI.)
You can also specify buffer space by means of the BUFSP=number operand on
the DLBL statement that identifies the file to be processed. This value overrides
the BUFSP operand in the ACB macro. It also overrides the BUFFERSPACE
parameter in the DEFINE command if it is greater than the BUFFERSPACE
parameter value.
MLEN=number
specifies the length of an optional OPEN/CLOSE/TCLOSE message area. The
default is 0, the maximum value can be 32,768 bytes.
PARMS=(CLOSDSP=options DSNAME=address)
CLOSDSP=options
specifies the CLOSE disposition for a reusable file. Options specified in the
DLBLs DISP=(,option) JCL statement override the options specified in this
parameter.
If a second option (either KEEP or DELETE) is specified, this indicates
whether the file should be kept or deleted if it was opened during a job
that ended abnormally. For example, if you open a file with
PARMS=(CLOSDSP=(DELETE,KEEP)) specified, then this file is deleted
only if the job comes to a normal end. In any other case, the file is kept so
that you can rerun the job without reloading the file.
DATE
indicates that disposition depends on the current system date and the
file's expiration date. If the expiration date is yet future relative to the
system date, the file is treated as though KEEP were specified.
Otherwise the file is treated as though DELETE were specified.
DISP=(,DATE) on the DLBL statement is equivalent to
PARMS=(CLOSDSP=DATE) and will override any CLOSDSP specified
in the ACB.
DELETE
indicates that the file and its contents need not be preserved.
VSE/VSAM is free to release resources associated with the file.
DISP=(,DELETE) on the DLBL statement is equivalent to
PARMS=(CLOSDSP=DELETE) and will override any CLOSDSP
specified in the ACB.
KEEP
indicates that the file and its contents are to be preserved.
DISP=(,KEEP) on the DLBL statement is equivalent to
PARMS=(CLOSDSP=KEEP) and will override any CLOSDSP specified
in the ACB.
If disposition parameters indicate that file resources can be freed,
VSE/VSAM releases as many resources as allowed by the sharing status
and by the characteristics defined for the file. For details, refer to “File
Disposition” on page 32.
DSNAME=address
specifies the address of a 88 byte area that contains the data set names of
the cluster and the catalog that contains the data set. The DSNAME
operand allows to open a file without referring to a matching label (DLBL).
The format of the area pointed to by address is:
Offset
Dec Hex Bytes Description
0 0 44 Entry name of cluster or component to be used
44 2C 44 Entry name of the catalog
PASSWD=address
specifies the address of a field that contains the highest-level password
required for the type(s) of access indicated by the MACRF operand. The first
byte of the field pointed to contains the length (in binary) of the password
Note: The internal VSE/VSAM buffers and control blocks are not affected by
the RMODE31 parameter. If possible, VSE/VSAM places such buffers and
control blocks above the 16MB line.
(Internal VSE/VSAM buffers are, for example, NSR index buffers, path buffers,
and upgrade set buffers.)
NONE (CB)specifies that VSE/VSAM I/O buffers must be obtained from below
the 16MB line.
BUFF (ALL) specifies that VSE/VSAM I/O buffers may to be obtained from
above the 16MB line.
ALL and CB are implemented for reasons of z/OS (DFSMSdfp) compatibility.
SHRPOOL=number
identifies which LSR pool is to be connected to the ACB. This parameter is
only valid when MACRF=LSR is also specified. For number specify the
identification number of the shared pool; it can be a number from 0 through
15. The default is 0.
STRNO=number
indicates how many concurrent active requests VSE/VSAM is to handle. The
maximum value is 255. The default is one.
During initial load of a file, VSE/VSAM ignores your specification and sets the
value to one because a file can be loaded by one string only. After the file is
loaded and successfully closed, it can be reopened and processed by as many
strings as specified under STRNO.
Several requests, with the corresponding RPLs pointing to the same ACB, can
be active at the same time. Thus, you can access simultaneously (a) different
parts of a file, and (b) in different modes of operation (sequential and direct, or
keyed and addressed, for example). You may, for example, process one part of
a file sequentially (forward or backward) and intermix sequential processing
with direct requests to any part of the file, without affecting the sequential
positioning.
Every request is activated by its own RPL and action (GET, PUT, etc.) macro.
Positioning information is maintained separately for every RPL, so that every
request can be processed independently from all other requests.
A request is defined either by a single RPL or by a chain of RPLs (see “RPL:
Specifying the Request Parameter List” on page 198). Specify for STRNO the
total number of RPLs or chains of RPLs that you will use to define requests.
For a chain of RPLs VSE/VSAM needs to remember only one position.
However, every position beyond the minimum number that VSE/VSAM needs
to remember requires additional virtual-storage space for:
v A minimum of one data I/O buffer and, for keyed access, one index I/O
buffer (the size of an I/O buffer is the CI size of a file).
OUT
Retrieve, insert, add-to-end, or update records (keyed access); retrieve, update,
or add-to-end (addressed access).
NCM
All data records exchanged between VSE/VSAM and the application are in
uncompressed (expanded) format. If the file is in COMPRESSED format,
MACRF=CNV must not be specified.
CMP
If the file is in COMPRESSED format, all data (records or control intervals)
exchanged between VSE/VSAM and the application are in compressed format.
The record includes the compressed record prefix (see “Data Format of
Records” on page 70). SHOWCB and TESTCB also take the prefix length into
account for the LRECL, RKP, and RECLEN keywords, if MACRF=CMP is
specified.
NRM
The file (or path) named in the DDNAME operand or in the DLBL statement is
to be processed.
AIX
The alternate index of the path specified in the DDNAME operand is to be
processed. If no path is specified there, this option is ignored. The AIX option
causes the path restrictions (that is, the restrictions limiting the access through
a path) to be ignored so that the alternate index can be processed like a
key-sequenced file. The alternate index of the path can be opened for input
(IN), output (OUT), or it can be reset (RST), provided it was defined with the
REUSE attribute (in the DEFINE ALTERNATEINDEX command).
NRS
The Open routine does not reset the file to ‘empty’. Output operations will
cause updating or extension of the existing record. DISP=OLD on the DLBL
statement is equivalent to MACRF=NRS and will override MACRF=RST.
RST
The Open routine resets the catalog information about the file (cluster or
alternate index) to its original status, that is, to the status it had before it was
opened for the first time. The file must have been defined with the REUSE
attribute for RST to be effective. Although the file is not erased, you can handle
it like a new file and use it as a work file. After the Open routine has
performed the reset operation, the RST option is equivalent to the OUT option.
DISP=NEW on the DLBL statement is equivalent to MACRF=RST and will
override MACRF=NRS.
NSR
Non-shared resources (normal operation).
LSR
Local shared resources (LSR).
When you specify LSR in the ACB, VSE/VSAM ignores the BUFND, BUFNI,
BUFSP, and STRNO operands, because it uses the BUFFERS and STRNO
values specified in the BLDVRP macro.
For more information, see “Sharing Resources Among Files and Displaying
Catalog Information” on page 203.
NUB
No user buffers; VSE/VSAM supplies buffers for I/O operations (KEY, ADR,
and CNV access).
UBF
User buffers (only CNV access can be specified). VSE/VSAM will read and
write CIs in a buffer you supply. It is pointed to by the AREA parameter of the
RPL.
In order to save such multiple warning or error conditions, you can provide a
message area in which those conditions are to be stored, together with additional
information. This message area is connected to the ACB when you specify the
following parameters in the ACB macro:
MAREA=address,MLEN=length
If MAREA or MLEN are not specified or a length of zero has been specified for
MLEN, no area is provided and the ACB error code is then the only indication for
errors or warnings which occurred during OPEN, CLOSE, or TCLOSE. If you have
specified both MAREA and MLEN (with a non-zero value) and error or warning
conditions are detected, appropriate messages are stored into the message area.
The message area header contains statistical, pointer, and general information. Its
contents are unrelated to the individual messages.
Apart from the flag byte, message area header information is stored only when a
warning or error condition was detected (the ACB or RPL error code is non-zero)
and the length of the message area (MLEN) is large enough to accommodate the
full message area header. Thus, before accessing bytes 1-19 of the message header
information, you should test byte 0 to see whether further information was stored
at all.
The message list contains the individual messages corresponding to the warning or
error conditions detected. It is pointed to by bytes 16-19 of the message area
header. Within the message list, the individual messages are stored continuously
one after another in the form of variable-length records. The number of messages
stored is contained in the message area header (bytes 14-15). Before investigating
the message list, you should check whether the stored-message count is zero or
greater than zero. The format of a message is as follows:
Byte Contents
0-1 Total length of message (including length bytes).
2 ACB error code corresponding to error or warning condition represented
by this message, or (for shared resources) RPL error code indicating write
error.
3 Function-type code (indicates the component which produced the error or
warning condition and the state of the upgrade set):
X‘00’ Condition occurred during accessing the base cluster. Upgrade set
is correct.
X‘01’ Condition occurred during accessing the base cluster. Upgrade set
may be incorrect as a consequence of this request.
X‘02’ Condition occurred during accessing the AIX over a base cluster.
Upgrade set is correct.
X‘03’ Condition occurred during accessing the AIX over a base cluster.
Upgrade set may be incorrect as a consequence of this request.
When issuing BLDVRP, you must specify one or more buffer pools within the
resource pool, and also the size and number of buffers in every buffer pool. A file
uses the buffer pool whose buffer size exactly matches the file's CI size or, if this
CI size is not available, the buffer pool with the next-larger buffer size. The file
uses only the one buffer pool.
When you issue a BLDVRP macro, Register 13 must contain the address of a
72-byte save area that you are providing. When you issue a BLDVRP macro from
within one of your exit routines such as LERAD or SYNAD, your program must
provide a second 72-byte save area for use by VSE/VSAM, because the original
save area is still in use by the external VSE/VSAM routine.
The statistics cannot be used to redefine the resource pool while it is in use. You
have to make adjustments the next time you build it.
,SHRPOOL=0 ,TYPE=LSR
,SHRPOOL=number ,TYPE=LSR, DATA
INDEX
name
one to eight characters that provide a symbolic name.
BUFFERS=size(number)
specifies the size and the number of buffers in every buffer in the resource
pool. The number of buffer pools in the resource pool is implied by the
number of size(number) pairs you specify. The buffer sizes should normally be
set equal to the CI sizes of the files to be processed. (You can find out the CI
size of a file by issuing the SHOWCAT macro for that file.) If you do not
specify the exact buffer (=CI) size for a file, VSE/VSAM will use buffers from
the buffer pool with the next larger buffer size. All buffers and control blocks
are automatically defined in 31-bit storage, if available.
When you process a key-sequenced file, the index component, as well as the
data component, shares the buffers of a buffer pool. When you use an alternate
index to process a base cluster, the components of the alternate index and the
base cluster share buffers. The components of alternate indexes in an upgrade
set share buffers. Buffers of the appropriate size and number must be provided
for all of these components, each of which uses the buffer pool whose buffers
are exactly the right size or the next-larger size.
size is 512, 1024, 2048, 4096, or so on in increments of 4096 to a maximum of
32KB.
number is at least 3 but must not exceed 32767.
KEYLEN=length
specifies the maximum key length of the files that are to share the resource
pool. The default is 255.
The keys whose lengths must be provided for are the prime key of every KSDS
and the alternate key of every alternate index that is used for processing or is
upgraded. The key length (relative record number) of a relative record file is 4.
If the buffer pool is to contain for entry-sequenced files only, specify
KEYLEN=0. (You can find out the key length of a file by issuing the
SHOWCAT macro for that file.)
MF=L
indicates that this is the list form of BLDVRP. The list form builds a parameter
list when the macro is assembled. It is not executable. If you do not specify
STRNO in the list form of BLDVRP, you must specify it in the execute form.
The list form of the BLDVRP macro is especially useful when the buffer sizes
of the VSE/VSAM files are not known. In that case you can first retrieve from
the VSE/VSAM catalog the CI sizes of the files to be processed via the
SHOWCAT macro and then enter these values in the BLDVRP parameter list.
The format of the BLDVRP parameter list is described in “The BLDVRP
Parameter List” on page 342.
MF=(E)
indicates that this is the execute form of BLDVRP. address is the address of the
parameter list built by the list form of BLDVRP.
If you use register notation, you may use Register 1, as well as any register
from 2 through 12. The execute form puts the address of the parameter list in
Register 1 and passes control to VSE/VSAM to process the list. You may,
however, first change the values for STRNO and/or KEYLEN (which are both
optional in the execute form of BLDVRP). BUFFERS may not be specified in
the execute form of BLDVRP, because this operand affects the length of the
parameter list.
If the MF operand is omitted, the standard form of the BLDVRP macro is
assumed, which builds a parameter list, puts its address in Register 1, and
passes control to VSE/VSAM to process the list.
RMODE31=NONE | BUFF | ALL│CB
specifies where the I/O buffers for the LSR pool are to reside. (The pools are
identified in the SHRPOOL keyword.) The default is NONE.
NONE (CB) specifies that the buffers must reside below the 16MB line.
BUFF (ALL) specifies that the buffers may reside above the 16MB line.
ALL and CB are implemented for reasons of z/OS (DFSMSdfp) compatibility.
SHRPOOL=number
specifies the identification number of a shared resources pool that is to be
build. Specify a number from 0 through 15. The default is 0.
STRNO=number
specifies the maximum number of requests that may be issued concurrently for
all of the files that are to share the resource pool. The number must be at least
one and no more than 255.
If you want to find out how effectively your resource pool is utilized during
execution, you can display the maximum number of requests which were
concurrently active because the resource pool was built by issuing a SHOWCB
ACB=...,FIELDS=(STRMAX) in your processing program. Depending on the
result, you may want to redefine STRNO=number the next time you build
your resource pool. (You cannot redefine the pool while it is in use.)
The ACB specified in the SHOWCB macro can be any ACB that describes an
open file that is using the resource pool.
TYPE=LSR(,DATA│INDEX)
Allows definition of separate LSR pools for data and index. If only LSR is
specified, there is one LSR pool for both data and index. Definition of an
INDEX LSR pool requires a previous definition of a DATA LSR pool. The form
"TYPE=LSR" is implemented for compatibility with z/OS (DFSMSdfp). No
type other than LSR (such as GSR on z/OS) is accepted by VSE/VSAM.
When you have specified LSR in the ACB, VSE/VSAM ignores the BUFND,
BUFNI, BUFSP, and STRNO operands, because it uses the BUFFERS and STRNO
values that you have specified in the BLDVRP macro.
Restrictions
UBF (user buffering) may not be specified together with LSR. LSR may not be
specified in the ACB of an empty file (which implies that the file is to be loaded).
Apart from the standard error codes from the Open routine, you may get
additional error codes in the ACB ERROR field when you try to open a file with
the LSR option. These error codes are listed in the z/VSE Messages and Codes,
Volume 2, SC34-2633.
Because it is essential for the integrity of a file that it is closed properly, z/VSE
automatically attempts to close all open VSE/VSAM files in the partition at both
normal and abnormal termination of a job step. If any control blocks for a file have
been destroyed through an error in your program, this file cannot be closed and a
message is given to the operator. EXLST routines are not entered during an
automatic CLOSE.
The TCLOSE macro performs the functions of CLOSE, except that it leaves the
program and the file connected so that you can continue processing without
reopening the file.
The Close routine completes any I/O operations that are outstanding when a
processing program issues a CLOSE macro for a file. It writes any output buffers
that have not been stored.
The Close routine updates the catalog entries of the file, including pointers to the
end of the file and statistics on file processing (such as number of records
inserted). If the file was loaded and the SPEED option was specified (in the
DEFINE command), the Close routine formats the last CA in the file to ensure that
the entire file is accessible.
The Close routine restores the ACB to the status that it had before the file was
opened and frees the virtual storage that the Open routine used to construct
VSE/VSAM control blocks.
You must specify a CLOSE macro to change from loading a file to retrieving
records from that file in the same run.
CLOSE address
name
name
one through eight characters that provide a symbolic name.
address
specifies up to 16 addresses of ACBs and DTFs that define the file(s) to be
closed.
If an application chooses to place VSE/VSAM ACBs in 31-bit partition GETVIS,
the OPEN and CLOSE macros can be used to open or close only one ACB in a
single invocation (Open or Close List). No DTFs can be included in an Open or
Close List containing an ACB residing in 31-bit partition GETVIS.
You can specify address:
v In register notation, using a register from 1 through 12. Specify within
parentheses.
Or
v With an expression that generates a valid relocatable A-type address
constant.
A return code is set in Register 15 to indicate whether the ACBs were closed
successfully. ACBs should be coded together (following the DTFs) to apply to all of
them. If, for example, you coded:
CLOSE ACB1,DTF1,ACB2
the return code will apply to ACB2 only. If ACB2 closed successfully and ACB1 did
not, the return code will still be X‘00’. (The Close routine sets Register 15 to zero
when it receives control after a DTF has been closed.) To ensure that the return
code is valid and applies to both ACBs, write the macro in the following way:
CLOSE DTF1,ACB1,ACB2
The Close routine sets one of the following return codes in Register 15:
Return Code
Meaning
X‘00’ All ACBs were closed successfully.
X‘04’ One or more ACBs were not closed successfully.
X‘08’ One or more Close routines could not be loaded because there was not
enough virtual storage space, or the modules could not be found.
Processing cannot continue.
If Register 15 contains X‘04’, an error code is set in one or more ACBs. You can use
the ERROR keyword of the SHOWCB or TESTCB macro to examine the error code.
For an explanation of the VSE/VSAM CLOSE (and TCLOSE) error codes, refer to
z/VSE Messages and Codes, Volume 2, SC34-2633.
If you do not delete the resource pool with the DLVRP macro, it will automatically
be deleted at the end of the job step, because it resides in virtual storage, which is
invalidated at the end of a job step.
When you issue a DLVRP macro, Register 13 must contain the address of a 72-byte
save area that you are providing. When you issue a DLVRP macro from within one
of your exit routines such as LERAD or SYNAD, your program must provide a
second 72-byte save area for use by VSE/VSAM, because the original save area is
still in use by the external VSE/VSAM routine.
name
one to eight characters that provide a symbolic name.
SHRPOOL=number
specifies the identification number of a shared resources pool that is to be
deleted. Specify a number from 0 through 15. The default is 0.
TYPE=LSR
This parameter is accepted by VSE/VSAM for compatibility with zOS. It is
ignored, however, since no type other than LSR is available under VSE/VSAM.
See also BLDVRP. Separate deletion of data and index LSR pools is not
possible because they form a unit and must not be deleted individually.
This macro causes VSE/VSAM to end a request, that is, to forget its position for
the specified RPL and to release its associated buffers for use by another RPL.
Before you can issue a request specifying an RPL for which an ENDREQ macro
was executed, you have to reposition VSE/VSAM.
If the request involves a chain of RPLs, all records specified by the request may
not be processed. For example, two RPLs are chained in a PUT request to add two
new records to the file and an ENDREQ is issued after VSE/VSAM started the I/O
operation to add the first record. That I/O operation will be completed and, if it
causes a CI split, subsequent I/O operations will be performed to complete the
split and update the index. However, VSE/VSAM will then return control to the
processing program without adding the second record.
The ENDREQ macro causes VSE/VSAM to cancel the position in the file
established for that request and also invalidates data and index buffers to force
refreshing of all requests subsequent to the end request. There is, however, no
buffer invalidation for:
v SHAREOPTION 1 files
v SHAREOPTION 2 files opened for output
v Higher level index buffers (only sequence set invalidation).
name
one through eight characters that provide a symbolic name.
RPL=address│(1)
specifies the address of the RPL (or first RPL in a chain of RPLs) that defines
the request to be terminated. You can specify address:
v In register notation, using a register from 2 through 12. Specify within
parentheses, or
v With an expression that generates a valid relocatable A-type address
constant.
This macro deletes the record previously retrieved for update (with the GET
macro, OPTCD=UPD). You can delete records in a key-sequenced file by keyed or
addressed access, but you cannot delete records in an entry-sequenced file. You can
delete records in a relative-record file by keyed access. You cannot delete CIs
(OPTCD=CNV).
name
one through eight characters that provide a symbolic name.
RPL=address│(1)
specifies the address of the RPL (or the first RPL in a chain of RPLs) that
defines the ERASE request. You can specify address:
v In register notation, using a register from 2 through 12. Specify within
parentheses.
Or
v With an expression that generates a valid relocatable A-type address
constant.
The number of exit addresses in a list is variable and depends on the number of
operands you code. You cannot add addresses to the list after it is generated, but
you can change an address or the indication of whether or not an exit is active
(with the MODCB macro).
Values for EXLST macro operands can be specified as codes and expressions that
generate valid relocatable A-type address constants. Do not use register notation.
,A ,A
,EXCPAD=(address ) ,JRNAD=(address )
,N ,L ,N ,L
,A ,A
,LERAD=(address ) ,SYNAD=(address )
,N ,L ,N ,L
name
one through eight characters that provide a symbolic address for the exit list
that is established.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation also uses VTAM.
EODAD
specifies that an exit is provided for special processing when the end of a file
is reached by sequential or skip sequential access.
EXCPAD
specifies that an exit is provided to receive control from VSE/VSAM when an
I/O operation is started or when a task can be forced to wait for an SHR(4)
lock.
JRNAD
specifies that an exit is provided for journalizing as you process data records.
LERAD
specifies that an exit is provided for analyzing logic errors.
SYNAD
specifies that an exit is provided for analyzing physical errors.
address
is the address of a user-supplied exit routine. The address must always be
specified first.
A│N
specifies that the exit routine is active (A) or not active (N). VSE/VSAM does
not enter a routine whose exit is marked not active.
L specifies that the address is the address of an eight-byte field that contains the
name of a phase that VSE/VSAM is to load for exit processing. If L is omitted,
the address gives the entry point of the exit routine in virtual storage. L can
precede or follow the A or N specification.
If you do not have this exit routine, VSE/VSAM exits to the routine for analyzing
logic errors (see the LERAD operand). If you do not have the LERAD exit routine,
VSE/VSAM returns to your processing program at the instruction following the
last executed instruction. In that case, Register 15 contains X‘08’, and register 1
contains the address of the RPL. Your program can examine the feedback field in
the RPL with the SHOWCB or TESTCB macro to see whether VSE/VSAM has
reached the end of the file.
When the exit receives control, it is in the same AMODE that was in effect when
the request was issued.
When VSE/VSAM exits to the EODAD routine, the contents of the registers (Reg)
are as follows:
Reg Contents
0 Unpredictable.
1 Address of the request parameter list that defines the request that
occasioned VSE/VSAM's reaching the end of the file. The register must
contain this address if you return to VSE/VSAM.
2-13 Same as when the request macro was issued. Register 13, by convention,
contains the address of your processing program's 72-byte save area, which
may not be used as a save area by the EODAD routine if it returns control
to VSE/VSAM.
14 Return address to VSE/VSAM.
15 Entry address to the EODAD routine.
If the EODAD exit routine returns to VSE/VSAM and you issue another GET
macro, VSE/VSAM enters the EODAD exit routine again. This can cause your
program to loop. If, however, you reach end-of-file during keyed access and then
change to addressed access, additional records may be retrieved provided they are
physically after the last record in key sequence (because of a CI or control-area
split).
The exit routine must return to VSE/VSAM, so that VSE/VSAM can return to your
processing program at the instruction following the I/O request macro.
When VSE/VSAM exits to the EXCPAD routine, the contents of the registers (Reg)
are as follows:
Reg Contents
0 Unpredictable.
1 Address of a parameter list with the following contents:
Offset
X‘00’ Address of the RPL.
X‘04’ Address of the IORB or DTL ECB.
X‘08’ EXCPAD lock word.
X‘0C’ 116 bytes available to the user.
2-13 Same as when the request macro was issued. Register 13, by convention,
contains the address of the user's 72-byte save area, which must not be
used as a save area by the EXCPAD routine (because EXCPAD must return
control to VSE/VSAM).
14 Return address to VSE/VSAM.
15 Address of EXCPAD routine.
If the exit routine uses Register 1, it must restore that register with the
parameter-list address before returning to VSE/VSAM. (The routine must return
for completion of the request that caused VSE/VSAM to exit.)
The EXCPAD routine can test the traffic bit of the IORB or DTL ECB to determine
whether the VSE/VSAM I/O operation has been completed or if the SHR(4) lock is
now available. However, the routine must not change the contents of the IORB or
DTL because these control blocks are used by VSE/VSAM.
The EXCPAD lock word normally contains zero, in which case the routine may
issue any other VSE/VSAM request with another RPL to the same file, except a
CLOSE. When a CI split, control-area split or spanned record update occurs, the
lock word contains the address of the RPL for the request. In that case, the
EXCPAD routine must either complete the request because a second (simultaneous)
request in the same file results in a system deadlock, or issue a request against
another file. A split or spanned record update may occur during UPGRADE
processing of an AIX. If this happens, no other UPGRADE request may be issued
through any path to the same base cluster. EXCPAD lock words are not used for
EXCPADs for SHR(4) locks.
The EXCPAD exit routine may be entered more than once for a VSE/VSAM
request because a request may require more than one I/O operation. The EXCPAD
routine is not entered in the following cases:
v When the I/O operation completes before VSE/VSAM is ready to wait on it.
v When caller's application (processing program), which issues the request macro,
runs in AMODE 24.
v During processing to complete pending I/O at CLOSE time.
v During Upgrade processing.
v When VSE/VSAM is forced to do a PUT because of insufficient buffers available
(that is, when VSE/VSAM writes a buffer to be able to use this buffer for other
data).
VSE/VSAM also takes the JRNAD exit whenever a segment of a spanned record is
transmitted to or from direct-access storage. This allows you to keep track of the
CIs occupied by a spanned record.
The JRNAD exit must return to VSE/VSAM for completion of the request that
caused VSE/VSAM to exit.
When the exit receives control, it is in the same AMODE that was in effect when
the request was issued.
When VSE/VSAM exits to the JRNAD routine, the contents of the registers (Reg)
are as follows:
Registers Contents
0 Unpredictable.
Registers Contents
1 Address of a parameter list with the following format:
Displ Length Description
0 4 bytes Address of RPL of the request that caused
the exit.
4 4 bytes Address of the address pointing to the
dataset ACB.
8 4 bytes For RBA changes, the RBA of the first byte
of data that is shifted or moved. For a GET
or PUT request against a spanned record
segment, the RBA of the first byte of the
segment.
12 4 bytes For RBA changes, the number of bytes of
data that is shifted or moved. (The number
of bytes does not include free space (if any),
or control information - except for a
control-area split, when the whole contents
of a CI are moved to a new CI).
If, in your exit routine, you intend to issue the GENCB, MODCB, SHOWCB, or
TESTCB macros, make sure that you save the contents of Register 14 before you
issue the macro and restore these contents in Register 14 before your exit routine
returns to VSE/VSAM. The same applies accordingly if, in your exit routine, you
intend to use registers. Your exit routine must return to VSE/VSAM for completion
of the request that caused VSE/VSAM to exit.
You can also use the TESTCB macro to determine whether a GET or a PUT was for
update (OPTCD=UPD).
You cannot use the keywords RBA or RECLEN to display the RBA or length of a
spanned record segment retrieved or stored. Instead, this information is given in
the parameter list at offsets 8 and 12, respectively.
For recording RBA changes, you must calculate how many records there are in the
data shifted or moved, so you can keep track of the new RBA for every one. With
fixed-length records, you calculate the number by dividing the record length into
the number of bytes of data shifted. With variable-length records, you could
calculate the number by using a table that not only identifies the records (by
associating a record's key with its RBA), but also gives their lengths.
Some CI splits cause data to be moved to two new CIs, and control-area splits
normally cause the contents of many CIs to be moved. In these cases, VSE/VSAM
exits to the JRNAD routine for every separate movement of data to a new CI.
If your JRNAD routine only journals transactions, it should ignore calls with the
reason code X‘0C’ and return to VSE/VSAM; conversely, if it only records RBA
changes, it should ignore all calls with reason codes other than X‘0C’.
The JRNAD exit must be indicated as active before the file for which the exit is to
be used is opened, and the exit must not be made inactive during processing. If
you define more than one ACB for a file and if you want to have a JRNAD
routine, the first ACB you open for the file must specify the exit list that identifies
the routine.
If you do not have the LERAD exit routine and VSE/VSAM encounters a logic
error, VSE/VSAM returns to your processing program at the instruction following
the last executed instruction. Register 15 then contains X‘08’, and Register 1
contains the address of the RPL. Your program can examine the feedback field in
the RPL with the SHOWCB or TESTCB macro to identify the logic error.
When the exit receives control, it is in the same AMODE that was in effect when
the request was issued.
When VSE/VSAM exits to the LERAD routine, the contents of the registers are:
Register
Contents
0 Unpredictable.
1 Address of the RPL that contains the feedback field the routine should
examine. The register must contain this address if you return to
VSE/VSAM.
2-13 Same as when the request macro was issued. Register 13, by convention,
contains the address of your processing program's 72-byte save area, which
may not be used as a save area by the LERAD routine if the routine
returns control to VSE/VSAM.
14 Return address to VSE/VSAM.
15 Entry address to the LERAD routine. The register does not contain the
logical-error indicator.
If your exit routine cannot correct or bypass the error, it is recommended that the
routine (1) issues the PDUMP macro to obtain a dump of the contents of all
pertinent control blocks, including the IORB involved in the failing I/O operation;
(2) closes the files used by your program; and (3) ends the job. If the error
occurred while VSE/VSAM was closing the file or index, and if another error
occurs after the exit routine issues a CLOSE macro, VSE/VSAM does not exit to
the routine a second time.
If the exit routine returns to VSE/VSAM, whether the error was corrected or the
file closed, VSE/VSAM drops the request and returns to your processing program
at the instruction following the last executed instruction.
If you do not have this exit routine and VSE/VSAM detects a physical error,
VSE/VSAM returns to your processing program at the instruction following the
last executed instruction. Register 15 then contains X‘0C’, and Register 1 contains
the address of the RPL. Your program can examine the feedback field in the RPL
with the SHOWCB or TESTCB macro to identify the physical error.
An I/O error that occurs when processing a data CI during the execution of a
sequential GET request positions VSE/VSAM at the next CI in key sequence for
keyed access or in entry sequence for addressed access. The next GET after the
error will return the first record from the CI following the index CI, VSE/VSAM is
not positioned at the next index control in further.
Errors that occur while VSE/VSAM writes a CI cause the loss of positioning.
When the exit receives control, it is in the same AMODE that was in effect when
the request was issued.
When VSE/VSAM exits to the SYNAD routine, the contents of the registers are:
Register
Contents
0 Unpredictable.
1 Address of the RPL that contains a feedback return code and the address
of a message area, if any. If you issued a request macro, the RPL is the one
pointed to by the request macro; if you issued a CLOSE macro, the RPL
was built by VSE/VSAM to process the close request. Register 1 must
contain this address if the SYNAD routine returns to VSE/VSAM
2-13 Same as when the request macro or CLOSE macro was issued. Register 13,
by convention, contains the address of your processing program's 72-byte
save area, which may not be used by the SYNAD routine if it returns
control to VSE/VSAM.
14 Return address to VSE/VSAM.
15 Entry address to the SYNAD routine. The register does not contain the
physical-error indicator.
VSE/VSAM returns, in Register 1, the address of the first (or only) control block
and, in Register 0, the total length of the control block(s) built. You can find out the
length of every control block by dividing the length of the area by the number of
copies. The address of every control block can then be calculated by this offset
from the address in Register 1.
GENCB generates the control block(s) or list(s) either in an area you specify or, if
you do not specify an area, in an area obtained by VSE/VSAM in your partition.
GENCB is sensitive to the current AMODE, if it is AMODE 31, then GENCB first
attempts to allocate the area above the 16MB line. The area obtained by
VSE/VSAM can contain other control blocks too. It will not be freed at closing
time but at end-of-job or end-of-job step only.
When you issue a GENCB macro, Register 13 must contain the address of a
72-byte save area that you are providing. When you issue a GENCB macro from
within one of your exit routines (such as LERAD or SYNAD), your program must
provide a second 72-byte save area for use by VSE/VSAM, because the original
save area is still in use by the external VSE/VSAM routine.
The operands of the GENCB macro are specified as absolute numeric expressions,
as character strings, as codes, as expressions that generate valid relocatable A-type
address constants, in register notation, as S-type address constants, and as indirect
S-type address constants. “Operand Notation for VSE/VSAM Macros” on page 325
gives all the ways of coding every operand for the macros that work at execution.
If you use register notation to specify specific addresses in your GENCB macro, be
sure that these registers contain the correct addresses before you issue the GENCB
macro. This is necessary because the assembler-generated instructions for this
macro store the addresses contained in the specified registers in the appropriate
control fields.
,MF=L
,keyword=value ,LENGTH=number ,MF= L
(E, address )
(1)
,WAREA=address
name
one through eight characters that provide a symbolic name.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation also uses VTAM.
BLK=ACB│EXLST│RPL
specifies whether you want to generate an ACB, an EXLST, or an RPL.
COPIES=number
specifies the number of control blocks or lists you want VSE/VSAM to
generate. The default is 1. If you generate two or more, they are generated next
to each other. They are identical, so you must use MODCB to tailor them for a
particular file or request.
VSE/VSAM returns, in Register 1, the address of the first (or only) control
block and, in Register 0, the total length of the control block(s) built. You can
find out the length of every control block by dividing the length of the area by
the number of copies. The address of every control block can then be
calculated by this offset from the address in Register 1.
keyword=value
The operands you code are identical to those of the ACB, EXLST, and RPL
macros, except that you can code them in more ways, as described in
“Operand Notation for VSE/VSAM Macros” on page 325. If you do not code
any operands, VSE/VSAM builds:
v For BLK=ACB, an ACB with default values provided by VSE/VSAM when
you open the file. You must supply the DDNAME=filename operand before
the file is opened.
v For BLK=EXLST, a complete EXLST with zeros for addresses and all entries
flagged inactive.
v For BLK=RPL, an RPL with default values.
LENGTH=number
specifies the length of the area, if any, you provided by the WAREA operand.
You can determine the length required for a control block or list by using the
SHOWCB macro.
MF=
For information on specifying this operand, refer to “List, Execute, and
Generate Forms of the Control Block Manipulation Macros” on page 322.
WAREA=address
specifies the address of an area in which you want VSE/VSAM to generate the
control block(s) or list(s). The area must begin on a fullword boundary. If
WAREA is specified, the LENGTH operand must also be specified. If you do
not specify WAREA, VSE/VSAM obtains an area in your processing partition
in which to generate the control block(s) or list(s). When control is returned to
you, Register 1 contains the address of the control block or list and Register 0
contains the total length of the control block(s) or list(s).
name
one through eight characters that provide a symbolic name.
RPL=address│(1)
specifies the address of the RPL (or the first RPL in a chain of RPLs) that
defines the GET request.
You may specify the address in register notation (using a register from 1
through 12, enclosed in parentheses) or specify it with an expression that
generates a valid relocatable A-type address constant.
When you issue a GET macro, Register 13 must contain the address of a
72-byte save area that you are providing. When you issue the macro from
within one of your exit routines such as LERAD or SYNAD, you must provide
a second 72-byte save area for use by VSE/VSAM.
This macro retrieves the next record in key sequence or the record with the
next higher relative-record number with RPL operand OPTCD=(KEY,SEQ), and
the next record in entry sequence with OPTCD=(ADR,SEQ). It retrieves the
record specified by the key or relative record number in the search-argument
field with OPTCD=(KEY,SKP) or OPTCD=(KEY,DIR), and by the RBA in the
search-argument field with OPTCD=(ADR,DIR). With skip sequential retrieval,
every key or relative-record number that you specify must be greater by
number or alphabet than the key or relative-record number of the previous
record retrieved.
GET retrieves the next CI with OPTCD=(CNV,SEQ) and the CI specified by the
RBA in the search-argument field with OPTCD=(CNV,DIR).
You must issue a GET with OPTCD=UPD to update (PUT with OPTCD=UPD)
or to delete (ERASE) a record. You can have the record moved to your work
area (OPTCD=MVE) or you can have VSE/VSAM leave the record in its I/O
buffer and pass you the address of the record (OPTCD=LOC). The AREA
operand of the RPL macro points to your work area or to a field in which
VSE/VSAM will place a record address.
You can also keep VSE/VSAM positioned for subsequent sequential or skip
sequential processing when you issue a direct GET request with
OPTCD=(DIR,NSP) or OPTCD=(DIR,UPD). With OPTCD=(DIR,UPD) however,
positioning is canceled when you issue a PUT for update or an ERASE
following the GET for update.
GET DIR,LOC
GET DIR,MVE,NSP
GET DIR,MVE,UPD
GET SEQ
GET SKP
POINT any
PUT DIR,NSP
PUT SEQ
PUT SKP
ERASE SEQ
ERASE SKP
The operands of the MODCB macro are specified as absolute numeric expressions,
as character strings, as codes, as expressions that generate relocatable A-type
address constants, in ordinary z/VSE register notation, as S-type address constants,
and as indirect S-type address constants. “Operand Notation for VSE/VSAM
Macros” on page 325 gives all the ways of coding every operand for the macros
that work at execution.
When you issue a standard MODCB macro (not the short form described below),
Register 13 must contain the address of a 72-byte save area that you are providing.
When you issue a MODCB macro from within one of your exit routines such as
LERAD or SYNAD, your program must provide a second 72-byte save area for use
by VSE/VSAM because the original save area is still in use by VSE/VSAM.
If you want to modify only the length of a data record (the value of the RECLEN
field of the corresponding RPL), you can do so without any call to a VSE/VSAM
routine by issuing the MODCB macro in the following short form: MODCB
RPL=(1),RECLEN=(0)
The address of the RPL must be contained in Register 1 (short form only). The
record length, stored in Register 0, will be placed into the RPL. No parameter list
is created. For other MODCB functions, you must use the standard form of the
MODCB macro.
,MF=L
,MF= L
(E, address )
(1)
name
one to eight characters that provide a symbolic name.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation uses also VTAM.
ACB│EXLST│RPL=address
specifies whether you want to modify an ACB, an EXLST, or an RPL and
specifies its address. Do not use the MODCB macro to:
v Modify an open ACB
v Activate or deactivate a JRNAD exit if the ACB to which the EXLST is
connected is already open. (See the discussion of JRNAD in the EXLST
macro.)
v Add entries to or delete entries from a field in an EXLST. (You can modify a
field in an EXLST at any time.)
v Modify an active RPL, that is, one that defines a request that has been issued
but not completed.
With the execute form of MODCB, you can change the address of the block or
list to be modified, but not the type.
keyword=value
The operands you code are identical to those for the ACB, EXLST, and RPL
macros, except that:
v You can code them in more ways, as shown in “Operand Notation for
VSE/VSAM Macros” on page 325.
v There are no defaults for the options of the ACB MACRF operand or the
RPL OPTCD operand. With OPTCD, when you set on a new option with the
MODCB macro, the old option is automatically turned off, because you can
specify only one option in every one of its groups (see “The RPL Macro” on
page 246).
v You can make an address in an EXLST active or not active without
specifying the address by coding: keyword=(,A│N).
v When you specify an address for an entry in an EXLST that previously
contained zeros (possible if you generated a default list with the GENCB
macro), you must code keyword=(addr,A) to make the address active,
because A is not a default for the MODCB macro.
MF=
For information on specifying this operand, refer to “List, Execute, and
Generate Forms of the Control Block Manipulation Macros” on page 322.
The MODCB macro cannot be used to reset a MACRF option which was set in an
ACB unless this option is mutually exclusive with the new intended option. For
example, if the options
KEY,SEQ,OUT
The MODCB (short form) is used to place the length of a record in the
RPL when variable-length records are added to a file:
MODCB RPL=(1),RECLEN=(0) Current length in register 0
LTR 15,15 MODCB successful?
BNZ MODERR No, go to error routine
PUT RPL=(1) Yes, write record
The MODCB is used to activate the EODAD exit specified in the GENCB
example of Figure 19 on page 238.
MODCB EXLST=(3),EODAD=(,A)
LTR 15,15 MODCB successful?
BNZ MODERR No, go to error routine
The OPEN macro calls the Open routine, which verifies that the processing
program has authority to process the file. The Open routine constructs VSE/VSAM
control blocks and establishes linkages to those VSE/VSAM routines that are
needed to process your file(s).
By examining the DLBL statement indicated by the DDNAME operand in the ACB
macro and the volume information in the catalog, the Open routine verifies that
the necessary volumes have been mounted. If a key-sequenced file is opened,
VSE/VSAM issues an error code to warn you if the data has been updated
separately from its index.
OPEN address
name
name
one through eight characters that provide a symbolic name.
address
specifies the address of the ACB or DTF for the file(s) to be opened.
If an application chooses to place VSE/VSAM ACBs in 31-bit partition GETVIS,
the Open and Close macros can be used to open or close only one ACB in a
single invocation (Open or Close List). No DTFs can be included in an Open or
Close List containing an ACB residing in 31-bit partition GETVIS.
You can specify address:
the return code will apply to ACB2 only. If ACB2 opened successfully and ACB1
did not, the return code will still be X‘00’. (The Open routine sets Register 15 to
zero when it receives control after a DTF has been opened.) To ensure that the
return code is valid and applies to both ACBs, the macro should be coded in the
following way:
OPEN DTF1,ACB1,ACB2
The Open routine sets one of the following return codes in Register 15:
Return Code
Meaning
X‘00’ All ACBs were opened successfully.
X‘04’ All ACBs opened successfully, but one or more ACBs had a warning
message.
X‘08’ One or more ACBs were not opened successfully. The entries with errors
are restored to their pre-open status.
If Register 15 contains X‘04’, an error code is set in one or more ACBs to indicate a
warning message. All ACBs are open and, unless you prevent it, processing will
continue on the file that the message applies to. You can use the ERROR keyword
of the SHOWCB or TESTCB macro to examine the code.
If Register 15 contains X‘08’, an error code is set in one or more ACBs. Again, you
can use the ERROR keyword of the SHOWCB or TESTCB macro to examine the
code. Note that Register 15 contains the maximum (worst) return code encountered
while opening a list of ACBs. This means that some of the ACBs in the list may
have been opened successfully, even though Register 15 contains X‘04’ or X‘08’.
For an explanation of the VSE/VSAM OPEN error codes, refer to z/VSE Messages
and Codes, Volume 2, SC34-2633.
When OPTCD=KEY was specified in the pertinent RPL, this macro positions
VSE/VSAM at the record whose key or relative-record number you specify in the
search argument field. You can use the macro to position VSE/VSAM for
subsequent sequential or skip sequential processing, either forward or backward in
the file.
Note: You cannot issue the POINT macro in one mode of access, change to another
mode of access, and then request VSE/VSAM to continue processing the file
sequentially. This will result in termination of the request with an error. For
example, you cannot change from the mode OPTCD=ADR to another mode such
as OPTCD=KEY.
VSE/VSAM can also be positioned for sequential processing by either a direct GET
or a direct PUT as described in the preceding sections on the GET and PUT
macros.
You may have to issue an ENDREQ macro before you can issue a POINT request
in your program. Information about this possible requirement is given at the end
of the discussion of the GET macro.
name
one through eight characters that provide a symbolic name.
RPL=address│(1)
specifies the address of the RPL (or the first RPL in a chain of RPLs) that
defines the POINT request. You can specify address:
v In register notation, using a register from 2 through 12. Specify within
parentheses.
Or
v With an expression that generates a valid relocatable A-type address
constant.
This macro stores a new record in key sequence or relative-record sequence if one
of the following combinations of options is set in the RPL:
OPTCD=(KEY,DIR,NSP)
OPTCD=(KEY,SKP,NUP)
OPTCD=(KEY,DIR,NUP)
OPTCD=(KEY,SEQ,NUP)
OPTCD=(KEY,SEQ,NSP)
PUT stores a new record at the end of an entry-sequenced file with OTPCD=ADR.
(You cannot store a new record in a key-sequenced file with addressed access.)
When loading or extending a file with the PUT macro, you must specify sequential
or skip sequential processing (OPTCD=SEQ or OPTCD=SKP).
To store a changed record or CI, you must have previously retrieved it with option
OPTCD=UPD set in the RPL for both the GET and the PUT. You cannot change the
length of a record in either a relative record file or an entry-sequenced file.
The record to be added or updated with a PUT macro must be in your work area
(OPTCD=MVE); you cannot use OPTCD=LOC with the PUT macro. The AREA
operand of the RPL macro points to your work area.
You may have to write an ENDREQ macro before you can issue a PUT NUP or
PUT NSP request in your program. Information about this possible requirement is
given at the end of the discussion of the GET macro.
name
one through eight characters that provide a symbolic name.
RPL=address│(1)
specifies the address of the RPL (or the first RPL in a chain of RPLs) that
defines the PUT request. You can specify address:
The RPL does not indicate a specific request, such as GET or PUT, for example;
you can use a single RPL, without modification, for several requests. However, if
you want to use the same RPL for different types of processing (for both direct and
sequential processing, for example), you must modify the RPL (with the MODCB
macro) every time you change from one type of processing to another.
As was pointed out in the discussion of the STRNO operand of the ACB macro,
several requests, with the corresponding RPLs pointing to the same ACB, can be
active at the same time. You may specify any number of RPLs for requests
requiring concurrent positioning, provided you do not exceed the maximum
number of concurrent active requests you have specified in the STRNO operand.
The requests can be for sequential or direct retrieval or both, and they can be for
records in the same part of the file or in different parts.
Values for RPL macro operands can be specified as absolute numeric expressions,
character strings, codes, and expressions that generate valid relocatable A-type
address constants. Register notation cannot be used for addresses.
,AREALEN=number ,ARG=address ,KEYLEN=number
,NXTRPL=address , Optcd ,RECLEN=number
,TRANSID=number
Optcd:
name
one through eight characters that provide a symbolic address for the request
parameter list that is generated. You can use it in the request macros to give
the address of the list. You can also use it in the NXTRPL operand of the RPL
macro, when you are chaining request parameter lists, to indicate the address
of the next list.
ACB=address
specifies the address of the access method control block that identifies the file
to which access will be requested. If you used the ACB macro to generate the
control block, you can specify the label of that macro for the address. If you
omit this operand you must issue a MODCB macro to specify the address of
the file's ACB before you can issue a request against the RPL.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation also uses VTAM.
AREA=address
specifies the address of your I/O work area to and from which VSE/VSAM
moves the record (OPTCD=MVE) for GET and PUT requests. You process the
record in this work area. If you process the records in VSE/VSAM's I/O buffer
(OPTCD=LOC), VSE/VSAM puts into this work area the address of the record
in the I/O buffer (GET only).
If you omit this operand you must issue a MODCB macro to specify the
address of the request against the RPL.
When you specify user buffers (MACRF=UBF in the ACB) for CI (CNV) access,
AREA specifies the address of a single I/O buffer. VSE/VSAM uses the buffer
to read and write CIs.
AREALEN=number
specifies the length, in bytes, of the work area. For OPTCD=MVE, the work
area must be large enough to contain the largest record in the file. For
OPTCD=LOC, the work area must be at least 4 bytes long to contain the
address of the record in the I/O buffer. For OPTCD=CNV, the work area must
be at least the size of a CI.
If you omit this operand, you must issue a MODCB macro to specify the
length of the request against the RPL.
ARG=address
specifies the address of a field that contains the search argument for:
RPLs, specify in the request macro the address of the first RPL in the chain.
This request macro determines the request type for the whole chain, and the
same major operation, GET for example, is performed for all RPLs in the chain.
However, other options such as the request options, which you specify in the
OPTCD operand of the RPL macro, may vary from one RPL to another. Thus,
an RPL with the option SEQ may be followed by an RPL with the option DIR.
Note:
In the RPL macro for the last RPL in the
chain, the NXTRPL operand must be omitted.
Figure 21. Example of an RPL Chain Built by Specifying the NXTRPL Operand
You cannot process records in VSE/VSAM's I/O buffer with chained RPLs
(OPTCD=LOC is invalid for chained RPLs).
With chained RPLs, the following types of requests cause VSE/VSAM to
position itself at the record following the one identified by the last RPL in the
chain:
v POINT
v Sequential or skip sequential GET
v Direct GET with positioning requested (OPTCD=NSP)
VSE/VSAM will execute the chain of RPLs as a single request, thereby
attempting to execute the requests with as few I/O requests as possible. All
control intervals residing in the same control area will usually be processed in
a single I/O. For a description of extended user buffering see “How to Use
Extended User Buffering: GET and PUT Macros” on page 319.
RECLEN=number
specifies the length, in bytes, of a data record stored by a PUT request. For
fixed length records, the length need only be set once. For GET requests,
VSE/VSAM indicates the length of the record in this field. To process a file
with records of different lengths you can examine the field with the SHOWCB
or TESTCB macro and modify it with the MODCB macro.
TRANSID=number
specifies a number that relates modified buffers in a buffer pool for a
subsequent write operation (with the WRTBFR macro). It is used in shared
resource applications and is described under “Sharing Resources Among Files
and Displaying Catalog Information” on page 203.
Chapter 12. Descriptions of VSE/VSAM Macros 249
RPL Macro
Note: Addressed access is not available for extended-addressed KSDS files. For
more information, refer to VSE/VSAM Commands, SC33-8315.
CNV
CI access (provided for special applications such as utilities). If you change
from CI to keyed access, you must reestablish positioning or the request will
terminate with an error. If you change from CI to addressed access, the results
are unpredictable and no error code will be issued.
Note: CI access is not available for extended-addressed KSDS files. For more
information, refer to VSE/VSAM Commands, SC33-8315.
SEQ
Sequential processing.
DIR
Direct processing.
SKP
Skip sequential processing (for keyed access only).
FWD
Forward processing of a file.
BWD
Backward processing of a file (see “Specifying Processing Options for a
Request” on page 252). Backward processing is only allowed for keyed (KEY)
or addressed (ADR) access and for sequential (SEQ) or direct (DIR) processing.
ARD
The search argument given in your argument (ARG) field determines the
record to be located, retrieved, or stored.
LRD
The last record of the file is to be located (POINT) or retrieved (GET direct).
LRD can only be used in conjunction with OPTCD=BWD.
NUP
Request is not for update (you will not update or delete a record you are
retrieving; a record you are storing is new). For a direct request, positioning
will be released.
NSP
For direct processing only, request is not for update, and VSE/VSAM will be
positioned at the next record for subsequent sequential processing.
UPD
Request is for update; you must issue a GET for update before you can issue a
PUT for update or an ERASE. However, if you supply your own buffers for CI
access, you can issue a PUT for update without a preceding GET.
KEQ
The search argument must equal the key of the data record (for keyed direct or
skip sequential retrieval or keyed sequential pointing).
KGE
If the search argument does not equal the key of a record the request applies to
the record with the next greater key (for keyed direct or skip sequential
retrieval or keyed sequential pointing). If the search argument is a
relative-record number, KEQ and KGE apply to a POINT request only. KGE is
ignored if BWD is specified.
FKS
The entire key is to be used for a search argument (for keyed direct or skip
sequential retrieval or keyed sequential pointing).
GEN
A generic key is to be used for a search argument (for keyed direct or skip
sequential retrieval or keyed sequential pointing). You must specify the length
of the generic key in the KEYLEN operand. GEN is ignored for relative-record
files and if BWD is specified.
MVE
For retrieval and storage, VSE/VSAM moves a data record between the I/O
buffer and your work area. MVE must also be specified when you supply your
own buffers for CI access.
LOC
For retrieval, you can process the record in VSE/VSAM's I/O buffer.
VSE/VSAM will pass you a pointer to the record in the buffer. If you want to
update the record, you will have to move it to your work area before issuing a
PUT macro (OPTCD=MVE). Do not specify LOC when processing spanned
records.
NBF
Normal user buffering.
Each request as identified by an RPL is executed serially and independently.
This is the conventional processing of user buffering and remains the default.
XBF
Extended user buffering.
For more details on the options you can specify in the OPTCD operand of the RPL
macro, refer to the section “Specifying Processing Options for a Request” on page
252
Chapter 12. Descriptions of VSE/VSAM Macros 251
RPL Macro
252
Note: Access to an extended-addressed KSDS file (> 4 GB) is keyed only. For
more information, refer to VSE/VSAM Commands, SC33-8315.
v An RRDS file only by keyed access.
v An ESDS file only by addressed access.
v A VRDS file only by keyed access.
An alternate index or a path is treated like a KSDS, except that addressed access is
not allowed for an alternate-index path. All key references in the RPL are to the
alternate key (instead of the base cluster's prime key).
You can process spanned records in a KSDS by keyed (direct or sequential) access,
and in an ESDS by addressed (direct or sequential) access. In either case, the entire
record is returned. You cannot process spanned records in a KSDS file by
addressed access, because the CIs that contain the spanned record may not be
physically contiguous. You may process a file in backward direction by keyed or
addressed access.
Table 25 summarizes the use of keyed and addressed access to retrieve, add
(insert), update, or erase records in KSDS, ESDS, RRDS, and VRDS files. Sequential
BWD means that the previous, instead of the next record in sequence (FWD) is to
be accessed (see the BWD option of the OPTCD operand). Direct backward (BWD)
is mainly used to prepare for a following GET sequential backward.
Table 25. Summary of Processing Options for Keyed and Addressed Access
Records
Type of
Type of File Access Type of Processing Retrieve Add Update Delete
key sequenced keyed
sequential FWD yes yes yes yes
sequential BWD yes no yes yes
skip sequential yes yes yes yes
direct (FWD or BWD) yes yes** yes yes
addr***
sequential FWD yes no yes* yes
sequential BWD yes no yes* yes
direct (FWD or BWD) yes no yes* yes
entry addr
sequenced sequential FWD yes to end yes* no
sequential BWD yes no yes* no
direct (FWD or BWD) yes to end** yes* no
Table 25. Summary of Processing Options for Keyed and Addressed Access (continued)
Records
Type of
Type of File Access Type of Processing Retrieve Add Update Delete
relative record keyed
sequential FWD yes yes yes* yes
sequential BWD yes no yes* yes
skip sequential yes yes yes* yes
direct (FWD or BWD) yes yes** yes* yes
variable keyed
relative record sequential FWD yes yes yes yes
sequential BWD yes no yes yes
skip sequential yes yes yes yes
direct (FWD or BWD) yes yes** yes yes
Sequential processing of a record depends on the position, with respect to the key,
relative-record number, or address of the previously processed record; direct
processing does not. With sequential access, records retrieved by key are in key
sequence, records retrieved by relative-record number are in numerical order, and
records retrieved by address are in entry (RBA) sequence. To retrieve or store
records sequentially after initial positioning, you do not need to specify a key,
relative-record number, or RBA. VSE/VSAM automatically retrieves or stores the
next record in order. Apart from OPEN's positioning to the first record of a file,
initial positioning can be established by:
v Pointing to the desired record, or
v Inserting a record into the file (keyed access with FWD only), or
v Using direct processing and:
– Retrieving a record for update (UPD) or
– Specifying OPTCD=NSP.
With direct processing, the retrieval or storage of a record is not dependent on the
key, relative-record number, or address of any previously retrieved record. You
must identify the record to be retrieved by key, or relative-record number, or RBA.
Keyed Access
When you specify SEQ and BWD in the OPTCD operand of the RPL macro,
VSE/VSAM returns the previous, instead of the next record in the file (in relation
to current positioning). The previous record is the one which has the next lower
key (or relative-record number). With the SEQ and BWD options, you can retrieve,
update, or erase records, but you cannot insert or add records.
With direct processing, records are retrieved by the search argument (key or
relative-record number) you supply. Records can be processed in any order,
without regard to the sequence of records processed before or after.
With skip sequential processing, records are retrieved by search argument, but in
ascending key or relative-record sequence (no backward processing). Thus, skip
sequential combines functions of both sequential and direct processing.
The subject is discussed below in more detail for keyed retrieval, storage, and
deletion.
If you specify KEY and SEQ for a key-sequenced file, the record to be retrieved
depends on where VSE/VSAM is positioned in the file. When your program opens
the file, VSE/VSAM is positioned at the first record in the file to begin sequential
processing. However, if sequential processing is not to begin with the first record
of the file, you can issue a POINT macro to position VSE/VSAM at the record
whose key you specify. (If the specified key is generic, that is, a leading portion of
the key field, then VSE/VSAM is positioned to the first of the records that have
the same generic key.) A subsequent GET macro retrieves the record VSE/VSAM is
positioned at and, at the same time, positions VSE/VSAM at the record with the
next higher key. In the POINT macro you can also indicate the direction in which
the file is to be processed subsequently, by specifying either FWD or BWD.
When you are accessing a base cluster through a path, records from the base cluster
are returned according to ascending or, if you are retrieving the previous record,
descending alternate key values. If several records contain the same (non-unique)
alternate key, these records are retrieved in the order in which they were entered
into the alternate index (even if BWD was specified). In addition, although Register
15 contains X‘00’, a warning code (duplicate key) is set in the FDBK field of the
RPL if there is at least one more data record with the same alternate key value. For
example, if there are three data records with the alternate key “1234”, the error
code would be set during the retrieval of records one and two, and would be reset
during retrieval of the third record.
Besides the error code, a function code is set in the RPL indicating whether the
condition occurred during accessing the alternate index or the base cluster of a
path or during upgrade processing (for a description of the function code, see
“Return Codes of Request Macros” on page 320).
If a base cluster is accessed in a partition, once using a path and once not using a
path, “a no record found” or “duplicate key error” can occur. These errors can be
avoided by using Local Shared Resources (LSR).
Keyed sequential retrieval for a relative-record file causes the records to be returned
in ascending or, if you are retrieving the previous record, descending numerical
order, based on the positioning for the file. Positioning is established in the same
way as for a key-sequenced file, the relative-record number always treated as a full
4-byte key. If one or more empty slots are encountered during sequential retrieval,
they are skipped and the next (or previous) record is retrieved. The relative-record
number of the retrieved record is returned in the ARG field of the RPL.
To position VSE/VSAM to the end of the file, issue a POINT macro with
OPTCD=(BWD,LRD) specified in the RPL. A subsequent GET sequential backward
retrieves the last record of the file. To locate and retrieve any other record in the
file and establish backward processing direction at the same time, issue a POINT
with OPTCD=(BWD,ARD) and a subsequent GET sequential backward (or a direct
GET with OPTCD=(BWD,NSP)).
does not cause the positioning to be lost. An immediately following GET with
OPTCD=(SEQ,BWD) will cause VSE/VSAM to skip the next logical record in
backward direction that can be retrieved without a read error.
Keyed direct retrieval for a key-sequenced file does not depend on previous
positioning; VSE/VSAM searches the index from the highest level down to the
sequence set to retrieve a record. You must specify the record to be retrieved by
supplying, in the ARG field of the RPL, one of the following:
v The exact key of the record (OPTCD=KEQ)
v A key less than or equal to the key field of the record (OPTCD=KGE)
v A leading portion of the key, or generic key (OPTCD=GEN)
You can specify OPTCD=KGE when you do not know the exact key. If a record
actually has the specified key, VSE/VSAM retrieves it; otherwise, it retrieves the
record with the next higher key. Generic-key specification for direct processing
causes VSE/VSAM to retrieve the first record with a key whose leading portion is
identical with the key in the ARG field. If you want to retrieve all the records with
the generic key, specify NSP for your direct request, which causes VSE/VSAM to
position itself at the next record in key sequence. You can then retrieve the
remaining records with the same generic key sequentially.
If you use generic keys in conjunction with direct requests there is an additional
aspect to consider. VSE/VSAM has to read a data CI to determine that it is empty.
So the performance of direct requests with a generic key will decrease if you have
many deleted records that match your generic key and precede the first existing
record.
To retrieve a record in the file and indicate backward processing direction for a
subsequent GET sequential backward, issue a direct GET with
OPTCD=(BWD,NSP,ARD), or LRD instead of ARD if you want to retrieve the last
record in the file. The search argument must always be a full key (FKS) and must
be the same as that of the data record (KEQ); KGE and GEN are ignored. A direct
GET or a POINT with OPTCD=(BWD,LRD) against an empty file results in a
no-record-found condition.
When you are accessing a base cluster through a path with direct access, a record
from the base cluster is returned according to the alternate key value you have
specified in the ARG field of the RPL macro. If the alternate key is not unique, the
record which was first entered with that alternate key is returned and a warning
code (duplicate key) is set in the FDBK field of the RPL. To retrieve the remaining
records with the same alternate key, specify the NSP option when retrieving the
first record and then change to sequential processing.
If a base cluster is accessed in a partition, once using a path and once not using a
path, a “no record found” or “duplicate key” error can occur. These errors can be
avoided by using Local Shared Resources (LSR).
When you are processing a relative-record file with direct access, you must supply
the 4-byte relative record number of the desired record in the ARG field of the RPL
macro. If you request a deleted or non-existent record, the request will result in a
no-record-found condition.
For skip sequential retrieval for a key-sequenced file, when you indicate the key of
the next record to be retrieved, VSE/VSAM skips to its index entry by using
horizontal pointers in the sequence set to get to the appropriate sequence-set index
record to scan its entries. SKP is similar to direct processing, except that the key of
the next record must always be higher in sequence than the key of the preceding
record.
A relative-record file has no index. When you indicate the number of the next record
to be retrieved, VSE/VSAM calculates the CI containing the requested record and
the position of the requested record within that CI. As for a key-sequenced file, the
relative-record numbers you specify must be ascending sequence for skip
sequential retrieval.
For a path, skip sequential access is the same as direct access, except that the
alternate key values have to be in ascending sequence. If a base cluster is accessed
in a partition, once using a path and once not using a path, a “no record found” or
“duplicate key” error can occur. These errors can be avoided by using Local Shared
Resources (LSR).
Keyed Insertion
VSE/VSAM stores a record whenever you issue a PUT request against an RPL. A
PUT request for update following a GET for update stores the record that the GET
retrieved. To update a record, you must previously have retrieved it for update.
When you store records sequentially beyond the highest key in the file,
VSE/VSAM automatically extends the file as though you were continuing to load
records. VSE/VSAM does not use distributed free space for these records, but
establishes new control areas at the end of the file. Free space is left in the new
control areas and CIs according to the file's FREESPACE specification in the
catalog.
To store records in key (or relative-record) sequence throughout the file, you can
use sequential, skip sequential, or direct access.
When you insert records into a key-sequenced file, you never have to specify a
search argument; VSE/VSAM always obtains the key from the record itself. With
sequential insertion or skip sequential insertion of consecutive records, VSE/VSAM
creates new CIs and control areas and free space is left in them according to the
file's FREESPACE specification in the catalog. With direct insertion or skip
sequential insertion of non-consecutive records, VSE/VSAM uses the free space.
For a relative-record file, sequential insertion causes a record to be inserted into the
next slot (provided it is empty). The slot number is returned in the ARG field of
the RPL. If the slot is not empty, a duplicate-record error condition will occur.
Direct or skip sequential insertion of a record into a relative-record file causes the
record to be placed as specified by the relative-record number in the ARG field.
You must insert the record into a slot which does not contain a record; otherwise, a
duplicate-record error condition will occur.
If you insert a record after the current end-of-file of a relative-record file, the file is
preformatted from the current end-of-file up to and including the control area that
is to contain the inserted record. Preformatting mainly consists of inserting control
information in the control areas and indicating that the slots are empty.
You can update and insert base data records via a path, provided the PUT request
does not result in non-unique alternate-key values in an alternate index (in the
upgrade set) which you have defined with the UNIQUEKEY parameter. The
alternate indexes in the upgrade set are modified automatically when you insert or
update a data record in the base cluster. When you update a previously retrieved
base record via a path, you must not change the alternate key by which that record
was retrieved or its prime key. If the updating of the alternate index results in an
alternate index record with no pointers to the base cluster, that alternate index
record is erased.
PUT insert requests with OPTCD=NUP or NSP are not allowed in backward
direction.
Keyed Deletion
An ERASE macro instruction following a GET for update deletes the record that
the GET retrieved. A record is physically erased in the file when you delete it. The
space the record occupied is then available as free space.
You can erase a record from the base cluster of a path only if the base cluster is a
key-sequenced file. The alternate indexes of the upgrade set are modified
automatically when you erase a record. If the alternate key value of the erased
record is unique, the alternate index data record with that alternate key is also
deleted.
You can erase a record from a relative-record file after you have retrieved it for
update. The record will be set to binary zeros and the control information for the
slot will be updated to indicate an empty slot. You can reuse the vacated space by
inserting another record of the same length in that location.
Addressed Access
Addressed access is the only form of access for an entry-sequenced file, using the
RBA determined for a record when it was stored in the file. This form of access is
also allowed for a key-sequenced file, but not for a path or for a relative-record
file. For both key-sequenced and entry-sequenced files, addressed access allows
processing in backward direction (by specifying OPTCD=BWD in the RPL macro).
Positioning is established as for keyed retrieval. You cannot add or insert records
in backward direction.
Addressed access can be either sequential or direct for both key-sequenced and
entry-sequenced files, but the processing allowed for a key-sequenced file is
different from that allowed for an entry-sequenced file.
With a key-sequenced file, addressed access can be used to retrieve records, update
their contents, and delete records, but the length of a record and the contents of its
key field cannot be changed. Records cannot be added because VSE/VSAM does
not allow changes to the file which could cause the index to change. With an
entry-sequenced file, addressed access can be used to retrieve records and to
update their contents, but not to change their lengths. New records can be added
to the end of the file. Records cannot be physically deleted because that would
change the entry sequence of the records in the file (the RBAs of the records).
Keyed insertion, deletion, or update (length changing) of records can change the
RBAs of these records. Therefore, to use addressed access to process a
key-sequenced file, you may have to keep track of RBA changes. For this purpose
VSE/VSAM passes back the RBA of every record retrieved, added, updated, or
deleted. (See also “JRNAD Exit Routine to Journal Transactions” on page 231.)
Note: Addressed access is not available for extended-addressed KSDS files (> 4
GB). For more information, refer to VSE/VSAM Commands, SC33-8315.
Addressed Retrieval
Positioning for addressed sequential retrieval is done by RBA rather than by key.
When a processing program opens a file for addressed access, VSE/VSAM is
positioned at the first record in the file in entry sequence to begin addressed
sequential processing. A POINT positions VSE/VSAM for sequential access
beginning at the record whose RBA you have indicated. A sequential GET causes
VSE/VSAM to retrieve the data record at which it is positioned and positions
VSE/VSAM at the next or previous record in entry sequence depending on
whether you have specified forward (FWD) or backward (BWD) processing in the
RPL. If you use addressed sequential retrieval for a key-sequenced file, records will
not be in their key sequence if there have been CI or control-area splits.
Addressed direct retrieval requires that the RBA of every individual record be
specified, because previous positioning is not applicable. The address specified for
a GET or a POINT must correspond to the beginning of a data record; otherwise,
the request is invalid.
With direct processing, you may optionally specify that GET position VSE/VSAM
at the next record in forward (FWD,NSP) or backward (BWD,NSP) sequence. Your
program can then process the following or preceding records sequentially.
Addressed Deletion
You can use the ERASE macro with a key-sequenced file to delete a record that
you have previously retrieved for update.
With an entry-sequenced file, you are responsible for marking a record you want
to delete. In other words, as far as VSE/VSAM is concerned, the record is not
deleted. You can reuse the space occupied by a record marked for deletion by
retrieving the record for update and storing in its place a new record of the same
length.
Addressed Insertion
VSE/VSAM does not insert new records into the middle of an entry-sequenced
file, but adds them at the end. With addressed access of a key-sequenced file,
VSE/VSAM does not insert or add new records. You cannot add or insert new
records in backward direction.
When you store records sequentially beyond the highest key in the file,
VSE/VSAM automatically extends the file as though you were continuing to load
records.
A PUT macro instruction stores a record. A PUT for update following a GET for
update stores the record that the GET retrieved. To update a record, you must
previously have retrieved it for update. You can update the contents of a record
with addressed access, but you cannot alter the record's length. Neither can you
alter the key field of a record in a key-sequenced file. To change the length of a
record in an entry-sequenced file, you must store it either at the end of the file (as
a new record) or in the place of a deleted record of the same length (as an update).
You are responsible for marking the old version of the record as deleted.
CI Access
VSE/VSAM provides programmers of utilities and systems with CI access. They
retrieve and store the contents of a CI, rather than a single record, by specifying CI
access in the macros and (for direct processing) giving the RBA of the CI. They are
responsible for maintaining the control information at the end of the CI. The
format of this information may change in future releases of VSE/VSAM.
CI access is allowed for relative-record files, provided the size of the file is not
changed by insertions or additions. CI access is not allowed when you process an
alternate-index path or access records in backward direction (with the BWD
option).
Note: CI access is not available for extended-addressed KSDS files. For more
information, refer to VSE/VSAM Commands, SC33-8315.
When your processing program retrieves a record, VSE/VSAM reads into virtual
storage the contents of the entire CI in which the record is stored. VSE/VSAM
de-blocks the records and either places the requested record in your program's
work area (OPTCD=MVE) or leaves the record in VSE/VSAM's I/O buffer and
gives you, in the AREA field, the address of the record in the buffer
(OPTCD=LOC). VSE/VSAM indicates the length of the record to your program (in
the RECLEN field) in both move mode and locate mode. You need not concern
yourself with any physical attributes of stored records. Spanned records cannot be
accessed in locate mode.
For explanations on the relationship of the information that you can retrieve, refer
to “Displaying Catalog Information. SHOWCAT” on page 201 ( Figure 18 on page
202).
,CATDSN=address ,EXTOPT= VOLSER
,CATFIL=address HARBADS
,MF=L
,MF=( E , address )
B (1)
name
one to eight characters that provide a symbolic name.
DDNAME│NAME│CI=address
specifies the address of an area that identifies the catalog entry that contains
the desired information.
DDNAME=address
specifies the address of a seven-byte area containing the file name of the object
to be displayed. The object can be a cluster (C), an alternate index (G), or a
path (R). Using the indicated file name, SHOWCAT first retrieves the
corresponding name (file ID) of the object from the label cylinder and then the
desired information from the catalog.
Either this parameter or the NAME or CI parameter must be provided.
However, when issuing the first SHOWCAT for an object, specify DDNAME or
NAME. VSE/VSAM then supplies the CI numbers of any associated objects for
subsequent SHOWCATs (in the work area supplied through the AREA
operand). See “Format of the SHOWCAT Work Area” on page 264.
NAME=address
specifies the address of a 44-byte area containing the name (file ID) of the
object to be displayed. The name is left-justified and padded with blanks on
the right. The type of object named must be C, G, R, D, or I.
Either this parameter or the DDNAME or CI parameter must be specified.
However, when issuing the first SHOWCAT for an object, specify DDNAME or
NAME. VSE/VSAM then supplies the CI numbers of any associated objects for
subsequent SHOWCATs (in the work area supplied through the AREA
operand). See “Format of the SHOWCAT Work Area” on page 264.
CI=address
specifies the address of a three-byte area that contains the CI number of the
catalog entry for the object to be displayed. The entry type of the object must
be C, G, R, D, I, or Y. (Y can only be retrieved via CI).
Either this parameter or the DDNAME or NAME parameter must be specified.
However, when you have already issued a SHOWCAT request for an object
(with the DDNAME or NAME parameter), you then issue any subsequent
SHOWCATs for its associated objects by specifying their CI numbers (as
returned to you via the previous SHOWCAT DDNAME or NAME request).
The three-byte area must be separate from the work area specified by the
AREA operand, even though VSE/VSAM returns a CI number in the work
area.
AREA=address
specifies the address of a work area in which the catalog information is to be
displayed. The first two bytes of this area must contain the length of the area,
including these two length bytes.
The minimum size of the area is 64 bytes, unless EXTOPT is specified. With
EXTOPT, the minimum size is 28 bytes. If it is smaller than the minimum size,
you get a return code of 4 in Register 15 and you can reissue the SHOWCAT
macro with a larger size. The format of the work area is described in “Format
of the SHOWCAT Work Area” on page 264.
ACB=address
specifies the address of the ACB that defines the catalog containing the entry
to be displayed. You issue the first SHOWCAT without ACB specified;
VSE/VSAM searches for the specified objects and returns to you (in the work
area supplied through the AREA operand) the address of the ACB that defines
the correct catalog. The catalogs are searched in the following order: the
catalog specified by the CATDSN parameter, the catalog specified by the CAT
parameter of the VSE/VSAM file, the job catalog, or if none of these exist, the
master catalog. When you subsequently issue SHOWCAT, you can specify that
ACB address, which causes VSE/VSAM to go directly to the correct catalog
without searching other catalogs first. You should always include the ACB
parameter when you specify CI instead of NAME.
CATDSN=address and CATFIL=address
CATDSN specifies the address of a 44-byte area containing the name (file ID)
of the catalog to be searched.
CATFIL specifies the address of an 8-byte area containing the file name of the
catalog to be searched. File ID and file name must be the same as those
specified in the DLBL statement (if one is provided) for the catalog. CATDSN
must always be specified if CATFIL is specified. CATFIL is always optional.
You use these parameters to override the established order in which catalogs
are searched. (VSE/VSAM always searches only one catalog for a specific
entry.) That is, you must specify CATDSN if the object to be displayed is (1)
not specified by the CAT parameter on the DLBL statement for the file, (2) not
in the job or master catalog, or (3) in the master catalog and not the job catalog
(if IJSYSUC and IJSYSCT are both specified).
EXTOPT=VOLSER│HARBADS
indicates that either the volume serial number of the file's primary allocation
volume (VOLSER) or the high allocated RBA for the file (HARBADS) is to be
returned to you. This operand can only be issued for a D or I type catalog
record.
The data returned for the EXTOPT operand replaces the associated object
information in the user return area. If you need the associated object
information as well as the EXTOPT data, you must issue separate SHOWCAT
macros.
MF=L
specifies that the list form of the SHOWCAT macro is required. The list form
builds a parameter list when the macro is assembled; it is not executable.
AREA and DDNAME│CI│NAME are optional in the list form; if you do not
specify them in the list form they must be specified in the execute form. In the
list form, the operand addresses cannot be expressed in register notation. The
format of the SHOWCAT parameter list is described in “Parameter Lists for
VSE/VSAM Macros” on page 333.
MF=(E│B,address│(1))
specifies that the execute form of the SHOWCAT macro is required.
E indicates that the parameter list, whose address is given in address or in a
register, is to be passed to VSE/VSAM for processing.
If a return code of 0 was passed in Register 15, the requested catalog information is
returned in the work area which you have supplied through the AREA operand.
The format is shown below.
Note: In case the SHOWCAT return code in Register 15 is 12, 20, 24, 28, 36, 40, 44,
or 52, the work area contains the return code and reason code issued by
VSE/VSAM catalog management as well as the module ID of the catalog
management module in which the error was detected. The format of the work area
is then as follows:
1
For the codes, refer to z/VSE Messages and Codes, Volume 2, SC34-2633.
For C type:
x... .... The SHOWCAT output for the D type record will provide the
VSAM file type (1).
.xxx xxxx
Reserved.
For G type:
x... .... The alternate index might (1) or might not (0) be a member of an
upgrade set. The way to find out for sure is to display information
for the upgrade set of the base cluster and check whether it
contains CI numbers of entries that describe the components of the
alternate index. Figure 18 on page 202 shows you how to get from
the alternate index's catalog entry to the entries that describe its
components (G to C to D to Y to D and I).
.xxx xxxx
Reserved.
For R type:
x... .... The path is (1) or is not (0) defined with the UPDATE attribute (for
upgrading alternate indexes).
.xxx xxxx
Reserved.
10(A) 2
The number of pairs of fields that follow. Every pair of fields identifies
another catalog entry that describes an object associated with this C, G, R
or Y object. The possible types of associated objects are:
With C: D, G, I, R.
With G: C, D, I, R.
With R: C, D, G, I.
With Y: D, I.
Figure 18 on page 202 shows how the catalog entries for all these objects
are related.
12(C) 1
Type of associated object the entry describes.
13(D) 3
The CI number of its first record.
16(10) Next pair of fields, and so on. If the area is too small to display a pair of
fields for every associated object, VSE/VSAM displays as many pairs as
possible and returns a code of 4 in Register 15.
Every pair of fields occupies 4 bytes, except Y-type entries which require 8
bytes (4 for the data component and 4 for the index component of the
alternate index in the upgrade set).
For D and I types:
For D type:
..xx .... .1x. -> The file is a SAM file (NOCIFORMAT data set, DTFPH
access only). .01. -> The file is a SAM ESDS file (ACB access
allowed). .00. -> The file is a native VSAM file, defined as:
.x00 x...
0000 -> ESDS (Entry-Sequenced Data Set) 1000 -> KSDS
(Key-Sequenced Data Set) 0001 -> RRDS (Relative Record Data Set)
1001 -> VRDS (Variable-length Relative Record Data Set)
10(A) 2
Relative position of the prime key in records in the data component. For
the data component of an entry-sequenced or a relative record file there is
no prime key, and this field is 0.
12(C) 2
Length of the prime key, or length of logical record for fixed-blocked SAM
files.
14(E) 4
CI size of the data or index component.
18(12) 4
Maximum record size of the data or index component, or block size for
blocked SAM files.
22(16) 2
The number of pairs for fields that follow. Every pair of fields identifies
another catalog entry that describes an object associated with this D or I
object. The possible types of associated objects are:
With D: C, G, Y.
With I : C, G.
Figure 18 on page 202 shows how the catalog entries for all these objects
are related.
24(18) 1
Type of associated object the entry describes.
25(19) 3
The CI number of its first record.
28(1C) Next pair of fields, and so on. Fields for all associated objects can always
be displayed (with the minimum AREA size specified).
When you issue a standard SHOWCB macro (not the short form described below),
Register 13 must contain the address of a 72-byte save area that you are providing.
When you issue a SHOWCB macro from within one of your exit routines such as
LERAD or SYNAD, your program must provide a second 72-byte save area for use
by VSE/VSAM because the original save area is still in use by the external
VSE/VSAM routine.
If you want to display only the length of a data record (the RECLEN field of the
corresponding RPL), you can do so without any call to a VSE/VSAM routine by
issuing the SHOWCB macro in the following short form:
SHOWCB RPL=(1),RECLEN=(0)
The address of the RPL must be contained in Register 1. The record length will be
put into Register 0. No parameter list is created. For other SHOWCB functions, you
must use the standard form of the SHOWCB macro.
,MF=L ,OBJECT=DATA
,MF= L ,OBJECT=INDEX
(E, address )
(1)
name
one to eight characters that provide a symbolic name.
ACB│EXLST│RPL=address|SHAREPL=number
This operand specifies whether you want to display an ACB, an EXLST, an
RPL and its address, or information about an LSR share pool.
In the standard and list forms of SHOWCB, you can omit this operand if you
are displaying only the standard length of a control block or list (see “Length
of a Control Block or List” on page 269). With the execute form of SHOWCB,
you can change the address of the block or list to be displayed, but not the
type.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation also uses VTAM.
AREA=address
specifies the address of the area in virtual storage that you are providing for
VSE/VSAM to display the items you specify in the FIELDS operand. The items
are in the area in the order you specify the keywords. The area must begin on
a fullword boundary.
FIELDS=(keywords)
There are five groups of keywords you can code for the FIELDS operand of the
SHOWCB.
v The keywords that you can code with the ACB, EXLST, RPL, and GENCB
macros. For details, refer to “Keywords of the ACB, EXLST, and RPL
Macros.”
v The length of an ACB, RPL, or EXLST. For details, refer to “Length of a
Control Block or List” on page 269.
v The attributes of an open file or index indicated by the ACB. For details,
refer to “Attributes of an Open File” on page 269.
v The matrix of LSR statistics LSRINF. To retrieve this matrix into the user's
area, LSRINF must be the only keyword in the FIELDS parameter. If
SHAREPL=number is specified, OBJECT parameter is ignored. For details,
refer to “LSR Matrix” on page 276.
v The extent matrix EXTINF. To retrieve this matrix into the user's area,
EXTINF must be the only keyword in the FIELDS parameter. For details,
refer to “Extent Matrix” on page 279.
LENGTH=number
specifies the length of the display area you are providing (by way of the AREA
operand). Every field in the ACB and RPL takes a fullword, except for
DDNAME, STMST, and ATRB in the ACB, which take two fullwords. Every
EXLST operand takes only one fullword, because you cannot display the codes
A, N, and L.
MF=
For information on specifying this operand, refer to “List, Execute, and
Generate Forms of the Control Block Manipulation Macros” on page 322.
OBJECT=DATA│INDEX
specifies, for the open ACB of a key-sequenced file, whether the fields
displayed are for the data or the index. VSE/VSAM will display the same
values for KEYLEN regardless of your specification in the OBJECT operand.
The same is true for field RKP.
If you specify INDEX, VSE/VSAM's display is all zeros for the following
fields:
SHAREPL=number
specifies the identification number of a Local Shared Resources (LSR) pool to
be displayed. Specify a number from 0 through 15.
With the keyword ERROR, you can display the error code (in the rightmost byte
of the display word) from the Open or Close routine (see the OPEN and CLOSE
macros); you can test the MACRF options with the TESTCB macro.
Also in relation to the ACB macro, you cannot display the ABEND CLOSE
disposition, that is, the second KEEP or DELETE keyword of the PARMS=
parameter.
v In relation to the EXLST macro, you cannot display the codes that indicate
whether an exit address is active or not active or is the address of the name of a
routine to be loaded; you can test them with the TESTCB macro.
v In relation to the RPL macro, you cannot display the OPTCD options, but you
can code the keyword FDBK to display error codes (in the rightmost byte of the
display word) from the request macros and the keyword RBA to display the
relative byte address of the last record processed; you can test the OPTCD
options with the TESTCB macro.
You can code the keyword AIXPC to display the number of key or RBA pointers
in the most recently processed alternate index record.
You can code the keyword FTNCD to display, after a logical or physical error,
the function code which indicates whether the respective condition occurred
during processing of the base cluster or the alternate index of a path or during
upgrade processing. (For details, see “Return Codes of Request Macros” on page
320.)
Note: If specified ACB is designated to the PATH, then the following keywords
refer to the values related to the corresponding alternate index (not the base
cluster): LRECL, HALCRBA, STRMAX, ATRB, ASTRNUM, STRTOT, SYMU.
Attribute
Meaning
ATRB An eight-byte field, the first four bytes of which contain the current
AMDSB attribute bytes. The fifth byte contains SAM ESDS RECFM INFO,
and the remaining three bytes are reserved for future use. Refer to
“Structure of the ATRB” on page 273.
ASTRNUM
Number of currently active requests in the resource pool.
AVSPAC
Number of bytes of available space in the data or index component from
all previous sessions.
LAVSPAC
Local number of bytes of available space in the data or index component,
that is, the number calculated during the current work session. When the
file is closed, this number is added to AVSPAC and LAVSPAC starts at
zero for the next session.
BFREE
Number of unassigned buffers.
BFRFND
Number of requests for retrieval that could be satisfied without an I/O
operation; that is, the data was found in the buffer. Applies for LSR only.
BLREC
The record length of a SAM ESDS file.
BUFNO
Number of buffers used for the data or index component.
BUFRDS
Number of requests for retrieval that required I/O operation; that is, the
data was not found in the buffer. Applies for LSR only.
CDBUF
Number of data buffers.
CIBUF
Number of index buffers.
CINV Size of a CI in the data or index component.
CIPCA
Number of control intervals per control area.
CNAME
Name of the cluster (44 bytes).
ENDRBA
Ending (high used) RBA of the space used by the data component or the
index component.
EXTINF
Refer to “Extent Matrix” on page 279.
FS Number of free control intervals per control area of a key-sequenced file.
IDACB
The ACB identifier is equal to x'A0'.
IDDOS
The DOS identifier is equal to x'28'.
KEYLEN
Full length of the prime key or alternate key field in every logical record
(depending on whether or not you access the base cluster via a path).
HALCRBA
High allocated RBA. The relative byte address (1 fullword) of the end of
the data component (OBJECT=DATA) or the index component
(OBJECT=INDEX) of the cluster opened by the related ACB.
LNEST
Local number of index levels.
LRECL
Maximum length of a logical record, or for an index, the index CI size
minus seven bytes.
NCIS Number of CI splits in the file from all previous sessions.
LNCIS
Local number of CI splits in the file, that is, the number calculated during
the current work session. When the file is closed, this number is added to
NCIS and LNCIS starts at zero for the next session.
NDELR
Number of data records deleted from the file from all previous sessions.
LNDELR
Local number of data records deleted from the file, that is, the number
calculated during the current work session. When the file is closed, this
number is added to NDELR and LNDELR starts at zero for the next
session.
NEXCP
Number of times EXCP was issued by VSE/VSAM I/O routines from all
previous sessions.
LNEXCP
Local number of EXCP issued by VSE/VSAM I/O routines, that is, the
number calculated during the current work session. When the file is
closed, this number is added to NEXCP and LNEXCP starts at zero for the
next session.
NEXT Number of logical extents, data spaces, or portions of data spaces, now
allocated to the data or index component.
NINSR
Number of data records inserted into the file from all previous sessions.
For a relative-record file, number of valid records (non-empty slots in the
file). For a key-sequenced file, number of records inserted between the
records, not records initially loaded or added to the end of the file.
LNINSR
Local number of data records inserted into the file, that is, the number
calculated during the current work session. For a relative-record file,
number of valid records (non-empty slots in the file). For a key-sequenced
file, number of records inserted between the records, not records initially
loaded or added to the end of the file.
When the file is closed, this number is added to NINSR and LNINSR starts
at zero for the next session.
NIXL Number of index levels in a key-sequenced file, including recent updates
to the referenced ACB.
NLOGR
Number of data records in the file from all previous sessions. For a
relative-record file, total number of slots (empty or non-empty) in the used
CIs.
LNLOGR
Local number of data records in the file, that is, the number calculated
during the current work session. For a relative-record file, total number of
slots (empty or non-empty) in the used CIs. When the file is closed,
LNLOGR number is added to NLOGR and LNLOGR starts at zero for the
next session.
NRETR
Number of data records retrieved from the file from all previous sessions.
LNRETR
Local number of data records retrieved from the file, that is the number
calculated during the current work session. When the file is closed, this
number is added to NRETR and LNRETR starts at zero for the next
session.
NSLOT
Number of relative record slots within each data control interval.
NSSS Number of data control-area splits in a key-sequenced file from all
previous sessions.
LNSSS
Local number of data control-area splits in a key-sequenced file, that is, the
number calculated during the current work session. When the file is
closed, this number is added to NSSS and LNSSS starts at zero for the next
session.
NUIW Number of write requests that VSE/VSAM was forced to do because
buffers were not available for reading the contents of a control interval
(CI). (NUIW is the number of write requests that were not initiated by the
user.) Applies for LSR with DFR only.
NUPDR
Number of data records updated in the file from all previous sessions.
LNUPDR
Local number of data records updated in the file, that is, the number
calculated during the current work session. When the file is closed, this
number is added to NUPDR and LNUPDR starts at zero for the next
session.
OPENOBJ
AMS flag byte. With the AMS flag you can determine whether the opened
object is a path, a base cluster, or an alternate index:
v x'80'=alternate index
v x'40'=access via path
v x'20'=access via base cluster
RKP Displacement of the prime key or alternate key field from the beginning of
a data record (depending on whether or not you access the base cluster via
a path); the same value is displayed whether the object is index or data.
SHAREOP
Share options byte.
SSRBA
RBA of the sequence-set index record which points to the logical beginning
of the data component.
STMST
System time stamp; the time and day (in microseconds) when the data or
index component was last closed. Bits 52 through 63 of the field are
unused.
STRMAX
Maximum number of requests which were concurrently active since the
resource pool was built. Used in shared resource applications (see “The
BLDVRP Macro” on page 219).
STRTOT
Total number of open ACB strings administered by the resource pool.
SYMU
Symbolic unit name of the volume.
UIW Number of all other write requests (those that are not counted in NUIW).
Applies for LSR only.
EQU X'80' If this AMDSB is for data component, this bit indicates
component is on FBA. If this AMDSB is for index component
(when both components are opened together), this bit indicates
that high-level index is on FBA.
EQU X'40' Used only when this AMDSB is for index component (when
both components are opened together). Indicates that sequence
set in on FBA.
EQU X'20' Reserved
EQU X'10' If this AMDSB is for data component, this bit indicates
component is on ECKD. If this AMDSB is for index component
(when both components are opened together), this bit indicates
that high-level index in on ECKD.
EQU X'08' Used only when this AMDSB is for index component (when
both components are open together). Indicates that sequence set
in on ECKD.
EQU X'04' Component is mixed architecture (both CKD and ECKD). This
bit is set only when a mixed architecture index is opened by
itself.
The SHOWCB macro is used to display the length and RBA of a record that has been
retrieved:
GET RPL=(4)
LTR 15,15
GNZ GETRR
SHOWCB RPL=(4),AREA=DISPLAY,LENGTH=8, x
FIELDS=(RECLEN,RBA)
LTR 15,15 SHOWCB successful?
BNZ SHOWERR No, go to error routine
.
.
DISPLAY DS 0F Align on fullword boundary
RECLEN DS F
RBA DS F
SHOWCB ACB=ACB1,AREA=AREA1,LENGTH=100,FIELDS=(IDACB,IDDOS, x
CDBUF,CIBUF,CIPCA,LNEST,BFREE,OPENOBJ,CNAME)
LTR 15,15
BNZ SHOWERR
.
.
AREA1 DS 0F
IDACB DS F
IDDOS DS F
CDBUF DS F
CIBUF DS F
CIPCA DS F
LNEST DS F
BFREE DS F
OPENOBJ DS F
CNAME DS 44CL
The statistics:
v Are available through an ACB that describes an open data set that uses a buffer
pool.
v Reflect the use of the buffer subpool from the time it was built up to the time
you issue SHOWCB.
v Are for a single buffer subpool. To get statistics for all buffer subpools, issue a
SHOWCB for each of the subpools.
SHOWCB ACB=(R6),AREA=SHOW,FIELDS=(BFRFND,BUFRDS,NUIW,UIW), x
LENGTH=16,OBJECT=INDEX
where:
v R6 must point to an ACB for an open data set.
v SHOW must be 16 bytes long. After processing of SHOWCB, the field SHOW
will contain all four counters (each being four bytes long).
v INDEX specifies that the statistics are to be taken from the LSR sub-pool that is
used by the index component of the data set.
LSR Matrix
Returned LSR matrix consists of three parts:
1. Header.
2. Share Pool Statistics Area. Includes string statistics area, which contains the
total number of LSR strings, and buffer matrix, which contains buffer statistics
for the requested share pool.
3. Cluster Matrix. Includes LSR string and buffer statistics for each VSE/VSAM
cluster assigned to a specified share pool.
Header
Header has a fixed size of 32 bytes and contains the following fields:
Field Length
Length of area supplied by user 4 bytes
Total length used (or required) by VSAM 4 bytes
Length of string statistics area 4 bytes
Number of rows in buffer matrix 4 bytes
Length of rows in buffer matrix 2 bytes
Number of rows in cluster matrix 4 bytes
Length of rows in cluster matrix 2 bytes
(reserved) 4 bytes
(reserved) 4 bytes
Field Length
Share pool number 2 bytes
Total number of strings 2 bytes
Number of active strings 2 bytes
Number of free strings 2 bytes
(reserved) 2 bytes
(reserved) 2 bytes
(reserved) 2 bytes
(reserved) 2 bytes
Field Length
Size of buffer 2 bytes
Type of buffer 1 byte
Flags 1 byte
Number of buffers 4 bytes
Number of modified buffers 4 bytes
Number of free buffers 4 bytes
Number of buffer reads 4 bytes
Number of retry requests without I/O 4 bytes
Number of user-initiated writes 4 bytes
Number of non-user-initiated writes 4 bytes
Size of buffer
the size of every buffer in the resource pool. See “The BLDVRP Macro” on
page 219 for how to define size of buffers, type of buffers, and number of
buffers in the resource pool.
Type of buffer
'D' means data, 'I' means index.
Flags
reserved field.
Number of buffer reads
number of requests for retrieval that required I/O operation, that is, the data
was not found in the buffer. Refer to a description of the BUFRDS attribute in
“Attributes of an Open File” on page 269.
Number of retry-requests without I/O
number of requests for retrieval that did not require I/O operation, that is, the
data was found in the buffer. Refer to a description of the BFRFND attribute in
“Attributes of an Open File” on page 269.
Number of non-user-initiated writes from buffer pool
number of write requests that VSE/VSAM was forced to do because buffers
were not available for reading the contents of a control interval (CI). This is the
number of write requests that were not initiated by the user. Refer to a
description of the NUIW attribute in “Attributes of an Open File” on page 269.
Number of user-initiated writes
number of all other write requests, those that are not counted in
non-user-initiated write requests. Refer to a description of the UIW attribute in
“Attributes of an Open File” on page 269.
Cluster Matrix
LSR string and buffer statistics for each cluster within a specified share pool. This
part contains fixed size rows, number of which equals number of clusters
associated with a specified share pool. The length of a row and the current number
of rows are contained in the header.
Field Length
DDNAME 8 bytes
Type of cluster 1 byte
Flags 1 byte
Number of active strings for this cluster 2 bytes
Size of data buffers 4 bytes
Number of data buffers used 4 bytes
Size of index buffers 4 bytes
Number of index buffers used 4 bytes
(reserved) 4 bytes
(reserved) 4 bytes
DDNAME
name of cluster in a specified share pool. Specifies a character string of up to
eight bytes and is the same as the file name parameter specified in the DLBL
statement that identifies the VSE/VSAM file or path to be processed.
Type of cluster
'B' means a base cluster, '00' means path.
Number of active strings for this cluster
number of active strings for a cluster with the name DDNAME.
Size of data buffers
size of data buffers in the resource pool.
Number of data buffers used
number of data buffers in the resource pool specified via BLDVRP Macro.
Size of index buffers
contains the size of index buffers in the resource pool.
Number of index buffers used
number of index buffers in the resource pool specified via BLDVRP Macro.
If length is not large enough for the whole output but more than 32 bytes,
VSE/VSAM returns as much information as fits, the return code 4, and the reason
code 9. Check the field "Total length used (or required) by VSAM" in the header
for the required space length and issue another SHOWCB call specifying length
large enough to contain all the matrix information.
In case user specifies length less than 32 bytes, VSE/VSAM will reject the request,
issue the return code 4 and the reason code 21. Recompile the program with length
bigger than 32 bytes.
Extent Matrix
The output matrix consists of the three parts:
1. Header.
2. Physical Device Characteristics Area which contains information about the
extents allocated for the specified cluster (ACB). Note that VSAM requires that
all extents for a specific cluster component reside on the same type of DASD.
For KSDS and VRDS clusters, the data and index can reside on different types
of DASD, so there will be two sets of physical device characteristics, one set
used for data and the other used for index.
3. Extent Information Area which contains information about each extent for the
requested VSAM cluster. Data extents will be listed first, marked with 'D',
followed by the index extents, marked with 'I'.
Header
Header has a fixed size of 32 bytes and contains the following fields:
Field Length
Length of area supplied by user 4 bytes
Total length used (or required) by VSAM 4 bytes
Length of physical device characteristics area 4 bytes
Number of data extents 4 bytes
Length of data extents row 2 bytes
Number of index extents 4 bytes
Length of data extents row 2 bytes
(reserved) 4 bytes
(reserved) 4 bytes
This part contains the physical device characteristics for the indicated cluster. Data
volume information is displayed first and is followed by index, if applicable. Each
48 bytes contain the following fields:
Field Length
Volume ID 6 bytes
Type of extent 1 byte
Flags 1 byte
Physical block size 4 bytes
Number of bytes per track 4 bytes
Number of bytes per control area 4 bytes
Field Length
Number of physical blocks per control 4 bytes
interval
Number of physical blocks per track 4 bytes
Number of tracks per control area 4 bytes
Number of tracks per cylinder 4 bytes
Number of physical blocks per control area 4 bytes
(reserved) 4 bytes
(reserved) 4 bytes
Volume ID
identifier of the volume where extents of the current cluster reside.
Type of extent
'D' if data, 'I' if Index.
Flags
reserved.
Number of bytes per track
for ECKD this number actually shows the number of bytes per track.
for FBA:
v first 2 bytes contain the number of replications of the control interval that fit
on a track.
v last 2 bytes contain number of the total 'logical' blocks per control area.
Number of tracks per control area
for ECKD this number actually shows number of tracks per control area.
for FBA this field shows the total number of physical blocks per control area.
Number of tracks per cylinder for ECKD
for FBA this field is undefined.
This part shows information about all extents for a specified file. This part consists
of fixed size rows, number of which equals the number of extents associated with
a specified cluster. The length of each row and the current number of rows can be
found in the header. The length of each row is calculated as number of data
extents plus number of index extents.
Field Length
Volser 6 bytes
Type of extent 1 byte
Flags 1 byte
Low extent (CCHH) 4 bytes
(reserved) 4 bytes
High extent (CCHH) 4 bytes
(reserved) 4 bytes
Low RBA 8 bytes
Field Length
High RBA 8 bytes
(reserved) 4 bytes
(reserved) 4 bytes
Volser
serial number of volume on which the extent resides. This is a label assigned
when a volume is prepared for use in a system.
Type of extent
'D' if data, 'I' if index.
Flags
The header is 32 bytes in length. If the value specified for length is large enough,
VSE/VSAM returns:
v header;
v physical device characteristics area;
v all rows of Extent Information Area. Their number is calculated as "Number of
data extents" plus "Number of index extents" fields of the header.
If length is not large enough for the whole output but more than 32 bytes,
VSE/VSAM returns as much information as fits, the return code 4, and the reason
code 9. Check the field "Total length used (or required) by VSAM" in the header
for the required space length, and issue another SHOWCB call specifying length
large enough to contain all the matrix information.
In case user specifies length less than 32 bytes, VSE/VSAM will reject the request,
issue the return code 4 and the reason code 21. Recompile the program with length
bigger than 32 bytes.
The following figure shows LSR input information. For information on ACB, RPL,
and BLDVRP macros, refer to Chapter 12, “Descriptions of VSE/VSAM Macros,”
on page 207.
LA R2,BLDVRPA
BLDVRP MF=(E,(R2))
-----------------------------------------------------------------------------
LSREA DS 0F
BLDVRPA BLDVRP KEYLEN=16, x
BUFFERS=(8192(20),512(4)), x
STRNO=20, x
MF=L, x
SHRPOOL=1
-----------------------------------------------------------------------------
ACB1 ACB DDNAME=KSDS,MACRF=(KEY,SEQ,OUT,LSR), x
STRNO=9,SHRPOOL=1,BUFND=03,BUFNI=03
RPL11 RPL ACB=ACB1,AREA=REC1,AREALEN=40,RECLEN=40,ARG=KEY1, x
OPTCD=(KEY,SEQ,NSP,KEQ,MVE)
0000012C 10 ...........
USER’S AREA=X’12C’
000000E0 00000060 00000001 00300000 00010030 00000000 00000000 E5E2C5D9 ...............-...............................VSER
VOLID=VSER02
RESERVED2
RESERVED1
LEN OF INDEX EXT ROW
IND EXTENTS=1
LEN OF DATA EXT ROW
DATA EXTENTS=1
FIXED AREA LEN=X’60'
VSAM NEEDS=X’E0'
F0F2C426 00000800 0000A800 0009D800 00000001 00000015 0000000F 0000000F 02D............y......Q.............................
TRACKS PER CYL=X’F’
TRACKS PER CA=X’F’
PHYS BLOCKS PER TRACK=X’15'
PHYS BLOCKS PER CI=X’1'
NUM BYTES PER CA=X’9D800'
NUM BYTES PER TRACK=X’A800'
PHYS BLOCK SIZE=X’800'
FLAGS=X’26'
TYPE OF EXT=’D’
0000A800 00000000 00000000 E5E2C5D9 F0F2C926 00000E00 0000B600 0000B600 ...y.............VSER02I.........................
NUM BYTES PER CA=X’0000B600'
NUM BYTES PER TRACK=X’0000B600'
PHYS BLOCK SIZE=X’E00'
FLAGS=X’26'
TYPE OF EXT=’I’
VOLID=VSER02
RESERVED2
RESERVED1
NUM PHYS BLOCKS PER CA (FBA only)
The TCLOSE macro cannot be used to change the processing mode for a file from
sequential load to retrieve in the same run.
The TCLOSE macro has no effect when the local shared resources (LSR) option is
in the ACB macro together with DFR (deferred write).
The return codes and error codes are identical to those of the CLOSE macro.
TCLOSE (1)
name address
name
one through eight characters that provide a symbolic name.
address
specifies up to 16 addresses of ACBs.
If an application chooses to place VSE/VSAM ACBs in 31-bit partition GETVIS,
the Open and Close macros can be used to open or close only one ACB in a
single invocation (Open or Close List). No DTFs can be included in an Open or
Close List containing an ACB residing in 31-bit partition GETVIS. You can
specify address:
v In register notation, using a register from 1 through 12. Specify within
parentheses.
Or
v With an expression that generates a valid relocatable A-type address
constant.
You cannot specify the address of DTFs with TCLOSE.
You can examine the condition code after issuing a TESTCB macro and examining
the return code in Register 15. For keywords specified as an option (such as A for
an operand of the EXLST macro), a test is for an equal or unequal comparison; for
keywords specified as an address or value, a test is for an equal, unequal, high,
low, not-high, or not-low comparison. In the comparison, A to B, B is the address,
value, or option that you specify in the TESTCB macro. For example, if you test for
a value in an ACB, a high comparison means the value in the block is higher than
the value you specified in the TESTCB macro.
When you issue a TESTCB macro, Register 13 must contain the address of a
72-byte save area that you are providing. When you issue a TESTCB macro from
within one of your exit routines such as LERAD or SYNAD, your program must
provide a second 72-byte save area for use by VSE/VSAM because the original
save area is still in use by the external VSE/VSAM routine.
,MF=L
keyword=value
ERET=address, ,MF= L
(E, address )
(1)
,OBJECT=DATA
,OBJECT=INDEX
name
one to eight characters that provide a symbolic name.
ACB│EXLST│RPL=address
This operand specifies whether you want to test an ACB, an EXLST, or an RPL
and specifies its address.
In the standard and list forms of TESTCB, you can omit this operand if you are
testing only the standard length of a control block or list (see “Length of a
Control Block or List” on page 289). With the execute form of TESTCB, you can
change the address of the block or list to be tested, but not the type.
AM=VSAM
specifies that this is a VSE/VSAM control block. You may want to specify this
operand for documentation purposes if your installation also uses VTAM.
ERET=address
specifies the address of a user-written routine that VSE/VSAM gives control if,
because of an error, it is unable to test for the condition you specified (return
code in Register 15 is not X‘00’). When the ERET routine receives control, it
should inspect the return code. If the return code is X‘04’, an error code will be
tested in Register 0. See “Return Codes from the Control Block Manipulation
Macros” on page 322 for the error codes that can be tested by TESTCB.
After completing its processing, the ERET routine can terminate the job or pass
control to a point in the processing program that it determines. It cannot return
to VSE/VSAM.
keyword=value
specifies a field and a value. The contents of the field are compared with the
value and the condition code is set. You can specify only one keyword at a
time. There are THREE groups of operands that you can code with the
TESTCB macro:
v The addresses, values, options, and names that you can code with the ACB,
EXLST, RPL, and GENCB macros
v The length of a control block or list
Note: If specified ACB is designated to the PATH, then the following keywords
refer to the values related to the corresponding Alternate Index (not the Base
Cluster): LRECL and ATRB.
NLOGR
Number of data records in the file. For a relative-record file, total number
of slots (empty or non-empty) in the used CIs.
NRETR
Number of data records retrieved from the file.
NSSS Number of control-area splits in a key-sequenced file.
NUPDR
Number of data records updated in the file.
RKP Displacement of the prime key or alternate key field from the beginning of
a data record (depending on whether or not you access the base cluster via
a path); the same value is displayed whether the object is index or data.
STMST
System time stamp; the time and day (in microseconds) when the data or
index component was last closed. Bits 52 through 63 of the fields are
unused.
Furthermore, you can determine whether the opened object is a path, a base
cluster, or an alternate index by coding:
OPENOBJ=PATH
Alternate index/base cluster pair (path)
OPENOBJ=BASE
Base cluster
OPENOBJ=AIX
Alternate index
Example 2: Uses TESTCB to determine whether the LERAD exit routine was entered
because of an end-of-file condition or a processing error. (The example assumes that no
EODAD exit routine was provided.)
Deferring writes saves I/O operations in cases where subsequent requests can be
satisfied by the data in the buffer pool. Processing speed improves if CIs are
updated several times.
You indicate that writes are to be deferred by coding the MACRF DFR option in
the ACB, along with MACRF=LSR:
ACB MACRF=(LSR,DFR,...)
NDF, the default, indicates that writes are not to be deferred for direct PUTs.
You can specify the DFR option in an ACB without using the WRTBFR to write
buffers. A buffer will be written when VSE/VSAM needs one to satisfy a GET
request, or all modified buffers will be written when the last of the files that uses
them is closed.
VSE/VSAM notifies the processing program when there are no more unmodified
buffers into which to read the contents of a CI. (VSE/VSAM would be forced to
write buffers when another GET or PUT request required an I/O operation.)
VSE/VSAM sets Register 15 to 0 and puts 12 (X‘0C’) in the feedback (FDBK) field
of the RPL that defines the request that detects the condition.
VSE/VSAM also notifies the processing program when there are no buffers
available to process your request. This is a logic error. Register 15 contains 8,
unless an exit is taken to a LERAD routine. The feedback (FDBK) field in the RPL
contains 152 (X‘98’). You may retry the request and it will get a buffer if one has
been freed.
In addition, VSE/VSAM will notify the processing program when the number of
active requests exceeds the STRNO value specified in the BLDVRP macro (Register
15=X‘08’; RPL FDBK=X‘40’).
name
one to eight characters that provide a symbolic name.
RPL=address
specifies the address of the request parameter list that defines the WRTBFR
request. An RPL need not be built especially for the WRTBFR; WRTBFR may
use an inactive RPL that defines other request(s) (GET, PUT, etc.) for a file that
is using the resource pool.
Only the ACB and the TRANSID operands of the RPL are meaningful for
WRTBFR; all other RPL operands are ignored. Unlike the other action macros
(GET, PUT, etc.), WRTBFR assumes that RPLs are not chained.
TYPE=ALL│DS│LRU(percent)│TRN
specifies what buffers are to be written.
ALL
specifies that all modified buffers in every buffer pool in the resource pool
are to be written. (Closing all of the files that use a resource pool has the
same effect.)
DS specifies that, for the file defined by the ACB to which the WRTBFRs RPL
is related all modified buffers are to be written.
LRU(percent)
specifies the percentage of the total number of buffers in every buffer pool
in the resource pool that are to be examined for possible writing. The least
// JOB ABCADR
// OPTION CATAL,NODUMP
PHASE ABCADR,*
// EXEC ASSEMBLY,SIZE=120K,PARM=’XREF’
ACBADR ACB EXLST=EXITS,
PASSWD=PASS,
BUFND=4,BUFNI=3,
BUFSP=11264,
MACRF=(KEY,SEQ,
DIR,OUT),
STRNO=2
EXITS EXLST EODAD=(ENDUP,N),
LERAD=LOGERR,
SYNAD=(IOERR,L),
EXCPAD=(OVERLP,A)
RETRVE RPL ACB=ACBADR,
AREA=WORK,
ARG=SEARCH,
AREALEN=125,
OPTCD=(DIR,NSP)
.
.
PASS DC FL1’6’,C’CHANGE’
WORK DS CL125
SEARCH DS CL4
IOERR DC C’PHYSICAL’
ENDUP End-of-file routine
.
.
LOGERR Logical-error routine
.
.
OVERLP I/O-overlap routine
.
.
/*
// IF $MRC GT 0 THEN
// GOTO ERRORS
// LIBDEF PHASE,CATALOG=USER.LIB
// EXEC LNKEDT
/*
/. ERRORS
// EXEC LISTLOG
/&
ACB Macro
Because the DDNAME operand is not specified, VSE/VSAM uses the name,
ACBADR, of the ACB as the name (file name) of the associated file.
BUFND:
Four I/O buffers for data CIs.
BUFNI:
Three I/O buffers for index CIs.
BUFSP:
The size of the buffer space is sufficient to accommodate four data control
intervals of 2048 bytes each and three index CIs of 1024 bytes each.
EXLST:
Specifies that the label of the exit list associated with this ACB is named
EXITS.
PASSWD:
Specifies the location of the password. The DC at PASS gives the
password's length in the first byte and the password itself in the
subsequent six bytes.
MACRF:
Specifies keyed-sequential and keyed-direct processing for both insertion
and update.
STRNO:
Specifies that two requests will require concurrent positioning.
EXLST Macro
EODAD:
The end-of-file routine is located at ENDUP and is not active.
LERAD:
The logic error routine is located at LOGERR and is active.
SYNAD:
The physical I/O error routine's name is located at IOERR.
EXCPAD:
The I/O-overlap routine is located at OVERLP and is active.
RPL Macro
ACB: Associates the RPL with the ACB named ACBADR.
AREA:
Address of work area is WORK.
AREALEN:
Length of work area is 125 bytes.
ARG: The search argument is defined at SEARCH. Because the KEYLEN operand
is omitted, VSE/VSAM uses the full key as search argument.
OPTCD:
Specifies direct processing with positioning at the next record for
subsequent sequential processing.
// JOB
// DLBL IJSYSCT,’AMASTCAT’,,VSAM
// DLBL ACBADR,’FILE1’,,VSAM
// EXEC progname,SIZE=AUTO
.
.
.
OPEN ACBADR
.
.
.
GET RPL=RETRVE
.
.
.
CLOSE ACBADR
.
.
.
/*
/&
FILE1 is the name of the file under which it is entered in the VSE/VSAM master catalog.
For your convenience in reading them, the examples show macros that generate
control blocks at assembly (ACB, EXLST, and RPL) at the beginning of the example
rather than at the end where they would normally be placed with program
constants. Every example assumes that the file has been opened and that it will be
closed. Only nominal checks for errors are shown. Exit routines to analyze errors
are not indicated.
Note: The continuation characters required in column 72 are not shown in the
examples, nor are the asterisks required in column 1 of the comment cards shown.
Errors
If extended user buffering was incorrectly used the request will be rejected as
logical error (R15=8) with error code 106 (X'6A').
Records moved to a work area. Fixed-length records, 100 bytes. Control blocks
generated at assembly.
Discussion
The records are retrieved in key sequence. No search argument has to be specified;
VSE/VSAM is positioned at the first record in key sequence when the file is
opened, and the next record is retrieved automatically as every GET is issued. The
branch to ERROR will also be taken if the end of the file is reached.
Variable-length records: they are processed in the I/O buffer. The search argument
is a full key, compared greater than or equal. Control blocks are generated at the
time of execution. Key length is eight bytes.
Discussion
The records are retrieved in key sequence, but some records are skipped. Skip
sequential retrieval is very similar to keyed direct retrieval (see Example 4), except
that you must retrieve records in ascending sequence (with skips) rather than in a
random sequence.
Internally, with skip sequential retrieval, VSE/VSAM uses only the sequence set of
the index to skip ahead; with direct retrieval it searches the index from top to
bottom to locate a record.
Many records are retrieved with one GET request. Records are moved to work
areas (only option); they are of fixed length, 20 bytes long. Chain of RPLs is
generated during execution.
Do the following 6 instructions 10 times to set up all of the request parameter lists. The
tenth time register 4 must be set to 0 to indicate the last request parameter list in the chain.
AR 4,3 Address of the next list.
MODCB RPL=(2), In every request parameter
NXTRPL=(4), list, indicate the address
AREA=(5),AREALEN=20 of the next list and the
address and length of the
work area.
LTR 15,15
BNZ CHECKO
AR 2,3 Address the next line.
LA 5,20(5) Address the next work area.
. Restore Register 2 to address
. the first list before
. continuing to process.
LOOP GET RPL=(2)
LTR 15,15
BNZ ERROR
. Process the ten records that
. have been retrieved by the
. GET.
B LOOP
CHECKO ...
ERROR ... Display the feedback field
(FIELDS=FDBK) of every
request parameter list to
find out which one had an
error.
WORKAREA DS CL200 Space for a work area for
each of the 10 request
parameter lists.
Discussion
The records are retrieved in entry sequence. In a key-sequenced file that has had
CI or control-area splits, it is likely that the entry sequence of the records is no
longer the same as their key sequence. Each of the ten RPLs in the chain identifies
a record to be retrieved by the GET. VSE/VSAM moves every record into the work
area provided for the request parameter list that identifies the record.
If an error occurred for one of the RPLs in the chain and you have supplied error
analysis routines, VSE/VSAM takes a LERAD or SYNAD exit before returning to
your program. Register 15 indicates the status of the request. A code of 0 indicates
that no error was associated with any of the RPLs. Any other code indicates that
an error occurred for one of the RPLs. Issue a SHOWCB for every RPL in the chain
to find out which one had an error. VSE/VSAM does not process any of the RPLs
beyond the one with an error.
Fixed-length records are processed in the I/O buffer. Key length is 15 bytes. The
search argument is a 5-byte generic key, compared equal. Control blocks are
generated during assembly.
Discussion
The generic key specifies a class of records. For example, if you search on the first
third of employee number, you get the first of presumably several records that
start with the specified characters. To retrieve all of the records in that class, either
switch to sequential access (see Example 7) or to a full-key search with
greater-than-or-equal comparison (Example 2), increasing the key of every record
you retrieve to the next possible key value.
Discussion
The RBA provided for a search argument must match the RBA of a record. Keyed
insertion and deletion of records in a key-sequenced file will probably cause the
RBAs of some records to change. Therefore, if you process a key-sequenced file by
addressed direct access (or by addressed sequential access using POINT), you need
to keep track of changes. You can use the JRNAD exit for this purpose.
Sequential access. The search argument (for positioning) is a full key of 5 bytes,
compared equal. Records are 50 bytes long. Control blocks are generated during
assembly.
Discussion
Records are moved to a work area. The search argument (for the direct request
preceding sequential requests) is a generic key, 8 bytes long, compared equal.
Records are of fixed-length, 100 bytes long. Positioning is requested for direct
requests. Control blocks are generated during assembly.
Discussion
With direct retrieval, VSE/VSAM does not remember its position for subsequent
retrieval unless you explicitly requested this (OPTCD=NSP). After a direct GET for
update (OPTCD=UPD), VSE/VSAM is positioned for a subsequent PUT,ERASE, or
sequential GET (if you modify OPTCD(DIR,UPD) to OPTCD=(SEQ,UPD)). If you
modify OPTCD=(DIR,NUP) to OPTCD=SEQ, you must issue a POINT to get
VSE/VSAM positioned for sequential retrieval, as NUP indicates that no
positioning is desired with a direct GET.
If you have chained many RPLs together, one position is remembered for the
whole chain. For example, if you issue a GET that gives the address of the first
RPL in the chain, the position of VSE/VSAM when the GET request is complete is
at the record following the one defined by the last RPL in the chain. Therefore,
modifying OPTCD=(DIR,NSP) in every RPL in a chain to OPTCD=SEQ implies
continuing with sequential access relative to the last of the direct RPLs.
Records are 50 bytes long. Retrieved records are moved to a work area. Three RPLs
are chained.
Discussion
If an error occurred for one of the RPLs in the chain and you have supplied
error-analysis routines, VSE/VSAM takes a LERAD or SYNAD exit before it
returns control to your program. Register 15 is set to indicate the status of the
request. A code of 0 indicates that no error was associated with any of the RPLs.
Any other code indicates that an error occurred for one of the RPLs. You should
issue a SHOWCB macro for every RPL in the chain to find out which one had an
error. VSE/VSAM does not process any of the RPLs beyond the one with an error.
There are three RPLs, all of which require VSE/VSAM to remember its position,
one only temporarily and two until VSE/VSAM is explicitly requested to forget its
position. VSE/VSAM can remember only two positions concurrently (STRNO=2).
Figure 36. Request Macro Example 9: Giving up Positioning for Other Request
Discussion
The use of ENDREQ illustrated here is to cause VSE/VSAM to forget its position
for one RPL so a request defined by another RPL can be issued. When PUT is
issued after a GET RPL=DIRUPD request, ENDREQ need not be issued, because
PUT causes VSE/VSAM to forget its position (the next GET with RPL=DIRUPD
does not depend on VSE/VSAM's remembering its position). You need to cause
VSE/VSAM to forget its position when you have issued requests for as many RPLs
requiring concurrent positioning as the number you specified for STRNO (in the
ACB macro) and you want to issue a request for yet another RPL. In the example,
a GET with RPL=DIRNUP cannot be reissued unless VSE/VSAM is freed from
remembering its position for either SEQ or DIRNUP. VSE/VSAM must be allowed
to remember its position for SEQ because requests against this RPL are sequential
and depend on VSE/VSAM's remembering its position.
Because VSE/VSAM remembers its position after a direct GET with OPTCD=UPD,
if no PUT or ENDREQ follows, you can switch to sequential access
(OPTCD=(SEQ,UPD) or OPTCD=SEQ) and use the positioning for a GET.
Records of variable length are moved from a work area (only option). These
records are up to 250 bytes long. Key length is 15 bytes. Some records are inserted
between existing records, others are added at the end of the file.
Discussion
You must use sequential storage (as opposed to skip sequential or direct storage)
when you load records into a file for the first time. Thereafter, you may use skip
sequential and direct storage, but you should use sequential storage when you are
inserting large numbers of records between two existing records or at the end of
the file.
When you store records sequentially beyond the highest key in the file,
VSE/VSAM automatically extends the file as though you were continuing to load
records. VSE/VSAM does not use distributed free space for these records, but
establishes new CAs at the end of the file.
Several records are inserted with one PUT request. The records are moved from a
work area (only option). They are fixed-length, 100 bytes long.
Discussion
You give no search argument for storage. VSE/VSAM knows the position of the
key field in every record and extracts the key from it. Skip sequential insertion
differs from keyed direct insertion in the sequence in which records may be
inserted (ascending non-consecutive sequence versus random sequence) and in
performance. With skip sequential insertion, VSE/VSAM uses only the sequence
set of the index to find the point of insertion; with keyed direct insertion,
VSE/VSAM searches from the top level of the index down to the sequence set.
With skip sequential insertion, if you insert two or more records into a CI,
VSE/VSAM does not write the contents of the buffer to direct-access storage until
you have inserted all records. With direct insertion, VSE/VSAM writes the contents
Records are moved from a work area (only option.) They have a fixed length of
100 bytes.
Discussion
VSE/VSAM extracts the key from every record's key field. You give no search
argument. Using keyed direct access is very similar to using skip sequential access.
About the only differences are specifying DIR instead of SKP in the MACRF and
OPTCD operands and being able to process records randomly instead of in
ascending key sequence (with skips).
Records are moved from work area (only option). They are of variable-length, up
to 100 bytes long.
Discussion
With addressed access, you cannot insert records into or add records to a
key-sequenced file, because the index is not used and VSE/VSAM cannot locate
the CI into which to insert the record. You can add records to, but not insert
records into, an entry sequenced-file. Every record is stored in the next position
after the last record in the file. You do not have to specify an RBA or do any
explicit positioning (with the POINT macro). Addressed addition of records is
always identical to loading a file. When the last CA is filled up, VSE/VSAM
extends the file and establish new CAs.
Records are updated in a work area (only option). They are fixed-length, 50 bytes
long. Not every record retrieved is also updated.
Discussion
A GET update (OPTCD=UPD) must precede a PUT for update. Besides retrieving
the record to be updated, GET positions VSE/VSAM at the record retrieved in
anticipation of the succeeding update (or deletion). It is not necessary to store back
(or delete) the record that you retrieved for update. VSE/VSAM's position at the
record previously retrieved allows you to issue another GET to retrieve the
following record (OPTCD=(SEQ,UPD) or OPTCD=SEQ). Then, however, the
position for update was not maintained because of the following GET.
This example requires the use of a work area because you cannot update a record
in the I/O buffer. Skip sequential retrieval (with OPTCD=UPD) can be used to
update. Compare this example with Example 2.
Records are moved to and from a work area (only option). They are of
variable-length, up to 120 bytes (with some lengths changed by update). The
search argument is a full key of five bytes, compared equal.
BNZ CHECKO
STORE PUT RPL=UPDATE
LTR 15,15
BNZ ERROR
B LOOP
ERROR ... Request was not accepted
or failed.
CHECKO ... Display or modification
. failed.
.
.
IN DS CL120 Work area for retrieving,
updating, and storing a
record
KEYAREA DS CL5 Search argument for
retrieving a record.
RLNGTH DS F Area for displaying the
length of a retrieved record.
Discussion
You cannot update records in the I/O buffer. A direct GET for update positions
VSE/VSAM at the record retrieved, in anticipation of storing back (or deleting) the
record. This positioning also allows you to switch to sequential access to retrieve
the next record.
You do not have to store back a record that you retrieve for update, but if you do
another retrieval, (using the same RPL). Or else, use two RPLs with STRNO=2.
One RPL is used solely for GET DIR with UPD.
Discussion
The RBAs of records in an entry-sequenced file are fixed and free space is not
distributed. Therefore, it is not possible to change the length of records in an
entry-sequenced file.
If you have inactive records in your entry-sequenced file, you may reuse the space
they occupy by retrieving the records for update and restoring a new record in
their place.
Records are processed in a work area (only option). They are fixed-length, 50 bytes
long. Not every record retrieved for deletion is deleted. The search argument is a
full key, 5 bytes long, compared equal.
Discussion
When you retrieve a record for deletion (OPTCD=UPD, same as retrieval for
update), VSE/VSAM is positioned at the record retrieved, in anticipation of a
following ERASE (or PUT) request for that record. You are not required to issue
such a request, however. Another GET request nullifies any previous positioning
for deletion or update.
Keyed sequential retrieval for deletion varies from direct in not using a search
argument (except for possible use of the POINT macro). Skip sequential retrieval
for deletion (OPTCD=(SKP,UPD) has the same effect as direct, but it is faster or
slower depending on the number of CIs separating the records to be retrieved.
Records are processed in a work area. They are fixed-length, 100 bytes long. Not
every record that is retrieved is deleted. Skipping is effected by issuing the POINT
macro.
Discussion
Since a READ request needs to be processed immediately and (on a PUT request)
the buffer cannot be copied from the user buffer, each VSE/VSAM request with
user buffering results in an immediate I/O for each single control interval.
If several RPLs are chained via the NXTRPL= option of the RPL, the situation is
unchanged, because each request as identified via each RPL is executed
independently. In addition, certain restrictions exist for use with RPL chaining.
To support extended user buffering, the options NBF and XBF are added to the
RPL macro OPTCD options:
OPTCD=(...,NBF,...)
OPTCD=(...,XBF,...)
NBF and XBF are also added as operands to the macros GENCB, MODCB, and
TESTCB.
OPTCD
Meaning
NBF Normal user buffering.
Each request as identified by an RPL is executed serially and
independently. This is the conventional processing of user buffering and
remains the default.
XBF Extended user buffering.
VSE/VSAM will execute the chain of RPLs as a single request, thereby
attempting to execute the requests with as few I/O requests as possible.
All control intervals residing in the same control area will usually be
processed in a single I/O.
When you gain control after a request, Register 15 contains one of the following
return codes:
Return Code
Meaning
X‘00’ Request completed successfully; the RPL might contain additional
(non-error) information about the request.
X‘04’ The request was not accepted because a request from another task is active
on the same RPL; no additional information is in the RPL.
X‘08’ Logic error; the error code in the RPL identifies the specific error.
End-of-file is considered a logic error (error code X'04').
X‘0C’ Uncorrectable I/O error; the error code in the RPL identifies the specific
error.
Note: For information on return and error codes, refer to z/VSE Messages and Codes,
Volume 2, SC34-2633.
As applicable, also refer to the descriptions of the request macros (GET, PUT,
POINT, ERASE, and ENDREQ).
Depending on the return code in Register 15 and your specification in the EXLST
macro, VSE/VSAM takes one of the following actions:
v When the RPL is in use (return code X'04'), retry the request.
v If the request is completed with a logic error (return code X'08') other than
end-of-file, your LERAD exit routine is entered if you specified the LERAD exit
in the EXLST and if it is active. If no LERAD exit routine is specified or if it is
inactive, control is returned to the instruction following the request macro that
raised the logic error condition with return code X'08' set.
When you reach end-of-file, your request completes with a logic error (return
code X'08' and error code X'04') and your EODAD exit routine is entered. If you
have no EODAD exit routine or if it is inactive, your LERAD exit routine is
entered. If no LERAD exit routine is specified or if it is inactive, control is
returned to the instruction following the request macro that raised the end-of-file
condition with return code X'08' set. Note, too, that if the EODAD exit is taken,
the LERAD exit is not.
v If the request completed with an I/O (physical) error (return code X'0C'), your
SYNAD exit routine is entered if you specified the SYNAD exit in the EXLST
and if it is active. If no SYNAD exit routine is specified or if it is inactive,
control is returned to the instruction following the request macro that raised the
I/O error condition with return code X'0C' set.
The feedback field in the RPL (FDBK operand in SHOWCB and TESTCB) is a
three-byte field with the following format:
0000xx
where:
xx is an error code that describes the error or, if the return code is zero,
additional information about the request.
Besides the return code (set in Register 15) and the error code (which you may
obtain by specifying FDBK in the SHOWCB macro) a function code is provided for
alternate-index processing. This function code is set on logical or physical errors
detected by VSE/VSAM and indicates whether the respective error condition
occurred during accessing the base cluster or the alternate index. In addition, the
function code indicates whether or not the upgrade set is still correct after the
request that failed. The function codes and their meanings are:
Function Code
Meaning
X‘00’ Condition occurred during accessing the base cluster. Upgrade set is
correct.
X‘01’ Condition occurred during accessing the base cluster. Upgrade set may be
incorrect as a consequence of this request.
X‘02’ Condition occurred during accessing the AIX over a base cluster. Upgrade
set is correct.
X‘03’ Condition occurred during accessing the AIX over a base cluster. Upgrade
set may be incorrect as a consequence of this request.
X‘04’ Condition occurred during upgrade processing. Upgrade set is correct.
X‘05’ Condition occurred during upgrade processing. Upgrade set may be
incorrect as a result as a consequence of this request.
You can display or test the function code by specifying the keyword FTNCD in the
SHOWCB or TESTCB macro, respectively.
If Register 15 contains X‘04’, an error code is set in Register 0, which indicates the
type of error. Make sure that, before issuing the macro, you save the contents of
Register 0 if you want to use its contents later on. For an explanation of the error
codes, refer to z/VSE Messages and Codes, Volume 2, SC34-2633.
The parameter list of the macro is created inline when MF=L is coded. This version
is not reenterable and register notation cannot be used for macro parameter
addresses.
When MF=(L,address...) is coded, the parameter list of the macro is created in the
area specified by address. This form is reenterable. You must supply the area by a
GETVIS macro when your program is executed. You can determine the size of the
parameter list by coding the third operand label. VSE/VSAM equates label to the
length of the list.
The execute form produces the executable code of the macros. The execute form is
also identical to the standard form, except that it includes the operand
MF=(E,address), where address points to the parameter list created by the list form
of the macro. All of the other operands of the macro are optional and are coded
only to change entries in the parameter list before the list is used. However, you
cannot use the execute form to add or delete entries from the parameter list or to
change the type of list.
Generate Form
The generate form of the macros allows you to make your program reenterable,
but it does not create shared parameter lists. The generate form is the same as the
standard form, except that you code MF=(G,address...). The parameter list is
created in an area pointed to by address. To ensure that the parameter list is
reenterable, address should be coded in register notation. You must obtain this area
by a GETVIS macro when the program is executed. You can determine the size of
the parameter list by coding the third operand label. VSE/VSAM equates label to
the length of the list.
In Figure 46 on page 324, MODCB is used to place the length of a record in the
RPL before the record is written. The list and execute forms are used so that only
one parameter list is created (though the macro is issued several times). This list
form is not reenterable.
v An expression of the form (*,scon); where scon is any expression valid for an
S-type address constant, including the base-displacement form. The address
specified by scon is indirect, that is, it points to the location that contains the
value of the keyword.
If indirect S-type address notation is used, the value it points to must meet
either of the following criteria:
– If the value is a numeric quantity, a bit string representing codes, or a pointer,
it must occupy a fullword of storage.
– If the value is an alphameric character string, it must occupy two words of
storage, be left aligned, and be padded on the right with blanks, if necessary.
Example of indirect S-type address notation for an operand that takes a numeric
value:
MODCB RPL=RPL,RECLEN=(*,RECLEN1) Set record length field
* in RPL to value specified
* in the fullword RECLEN1.
.
.
.
RECLEN1 DC F’400’
Example of indirect S-type address notation for an operand that takes a name
value:
MODCB ACB=ACB,DDNAME=(*,DDNAME1) Set ddname field in ACB
* to value specified in the
* 8-byte field DDNAME1.
.
.
.
DDNAME1 DC CL8’FILENAME’
Example of indirect S-type notation for an operand that takes an address value:
MODCB RPL=RPL,AREA=(*,ARCDAREA) Set area operand in RPL
* to the address pointed to
* be the pointer ARCDAREA.
.
.
.
ARCDAREA DC A(RCDAREA1)
Example of an expression valid for a relocatable A-type address constant:
MODCB RPL=RPL,AREA=RCDAREA Set area operand in RPL
* to address of RCDAREA.
The expressions that can be used depend on the keyword specified. Register and
S-type address notations cannot be used when MF=L is specified.
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 327
GENCB Macro Operands
* For a list of the operands you can specify in the FIELDS parameter, see “The
SHOWCB Parameter List” on page 338.
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 329
TESTCB Macro Operands
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 331
BLDVRP Macro Operands
Address
Absolute Character Indirect
Keyword Numeric Code String Register S-Type S-Type A-Type
TYPE=TRN - x - - - - -
Depending on the form of the macro, the internal parameter list is built as follows:
v The standard form of these macros builds a parameter list in-line and processes
it.
v The list form builds a parameter list in an area you specified.
v The execute form processes a previously built parameter list.
v The generate form (not for BLDVRP and SHOWCAT) builds a parameter list in
an area you specify and also processes it.
(Use of the different forms are discussed under “List, Execute, and Generate Forms
of the Control Block Manipulation Macros” on page 322.)
In the following, entries of Type 2 and Type 3 are described separately for GENCB,
MODCB, SHOWCB, and TESTCB. When VSE/VSAM receives control, register 1
must point to your parameter list.
The format of the BLDVRP and SHOWCAT parameter lists is different from the
above scheme. Refer to “The BLDVRP Parameter List” on page 342 and “The
SHOWCAT Parameter List” on page 343.
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 333
Parameter List: GENCB
Offset 0 1 2
Dec (HEX) Block or list
0 (0) X’01' Number of copies
See “(1) list”
Keyword Entries
The parameter list for GENCB contains no keyword entries if you are generating a
default ACB, EXLST, or RPL.
Offset 0 2
Dec (HEX) Keyword code
0 (0) (reserved)
See “(1) keyword code”
(2) option explanation: Indicates the options for MACRF, MACRF3, OPTCD, and
CLOSDSP with a 1 in a bit of the fullword:
(3) keywords explanation: The third fullword is required for the ACB operand
DDNAME, and for all of the EXLST operands, for which the third fullword
indicates A, N, and L:
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 335
Parameter List: MODCB
Offset 0 1 2
Dec (HEX) Block or list
0 (0) X’02' (reserved)
See “(1) list”
Keyword Entries
Offset 0 2
Dec (HEX) Keyword code
0 (0) (reserved)
See “(1) keyword code”
(2) option explanation: Indicates the options for MACRF, MACRF3, OPTCD, and
CLOSDSP with a 1 in a bit of the fullword:
With the MODCB macro, there are no defaults for these options. When you code a
bit for the OPTCD operand, the contrary bit that was previously set is turned off.
For example, if KEY was previously set, and you set ADR, KEY is turned off,
because a request parameter list can be set for only one type of access.
(3) keywords explanation: The third fullword is required for the ACB operand
DDNAME, and for all of the EXLST operands, for which the third fullword
indicates A, N, and L:
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 337
Parameter List: SHOWCB
Offset 0 1 2
Dec (HEX) Type of object
0 (0) Block or list
X’03' to be displayed
See “(1) list”
See “(2) displayed”
(2) displayed:
Keyword Entries
Offset 0 2
Dec (HEX) Keyword code
0 (0) (reserved)
See “(1) keyword code”
Offset 0 1 2
Dec (HEX) Type of object
0 (0) Block or list
X’04' to be tested
See “(1) list”
See “(2) tested”
12 (C) (reserved)
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 339
Parameter List: TESTCB
Keyword Entries
Offset 0 2
Dec (HEX) Keyword code
0 (0) (reserved)
See “(1) keyword code”
(2) option explanation: Indicate the options for MACRF, MACRF3 OPTCD,
CLOSDSP, ATRB, OFLAGS, AIXFLAG, and OPENOBJ: with a 1 in a bit of the
fullword:
(3) code explanation: The codes for ERROR and for FDBK are documented with
the appropriate macro instructions. (4) keywords explanation: The third fullword is
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 341
Parameter List: TESTCB
required for the ACB operands DDNAME and STMST, and for all of the EXLST
operands, for which the third fullword indicates A, N, and L:
0 1 2 3
buffersize n last
buffer
pool (n)
X’8000' (indicates the last
buffer pool) buffercount n
Appendix A. Operand Notation and Parameter Lists for VSE/VSAM Macros 343
Parameter List: SHOWCAT
Shows how IDCAMS can be invoked by a program through the use of the
CDLOAD macro instruction.
CDLOAD Address
The invoking program should branch to the address returned by CDLOAD plus 6.
Because IDCAMS uses MVS linkage conventions, the invoking program must
provide an 18 fullword area to be used as a save area by IDCAMS. On entry to
IDCAMS, Register:
v 1 should point to the argument list described in Figure 48 on page 346.
v 13 should point to the save area.
v 14 must contain the return address.
v 15 must contain the address of IDCAMS plus 6.
Figure 48 describes the argument list as it exists in the user's area that is passed to
the IDCAMS processor.
Explanation
The following explains Figure 48.
v (A) The Argument List
A maximum of four fullword addresses pointing to the various arguments. The
high-order bit of the last address must be set to one. Any argument you do not
wish to specify that precedes an argument you are specifying must be an
address pointing to a half word of binary zeros. If you do not specify IOLIST,
turn on the high-order bit in PAGE NUMBER.
v (B) The Page Number List
– LENGTH: Halfword that specifies the number of bytes in the PAGE NUMBER
field.
– PAGE NUMBER; Optional: Provides a way to specify the starting page
number for system output listing. If you do not wish to specify a starting
page number, you must set the length field to binary zeros.
PAGE NUMBER is a 1-4 byte character string that may specify the starting
page number of system output listing. This value is reset to the current page
number upon completion of the present invocation of the IDCAMS processor.
v (C) The Input/Output List
Optional. Provides the means of identifying those files for which the invoker
wishes to manage all I/O operations.
n: A fullword that specifies the number of groups of three fields that follows.
Every group consists of a DNAME address, an IOROUTINE address, and a
USER DATA address.
DNAME: Address of a character string that identifies a file that causes the
invocation of the associated IOROUTINE for all I/O operations (including
OPEN and CLOSE) against the file. The character string identifies the data
set as follows: A 10-byte character string, the first two characters are 'DD', the
next 8 characters are the DNAME field left-justified (padded with blanks if
necessary), which may appear in the FILE, INFILE, or OUTFILE parameters
of any IDCAMS command. The SYSIPT (DDSYSIPT) and SYSLST
(DDTSYSLST) DLBL names may also appear if the Invoker wishes to manage
these files.
IOROUTINE: Address of the program that is to be invoked to process I/O
operations upon the file associated with DNAME. This routine, instead of the
processor, is invoked for all operations against the file. For information on
linkage and interface conventions between the IOROUTINE and IDCAMS,
see “User I/O Routines,” below.
USER DATA: Address of a data area that the user may use for any purpose.
v (D) The Options List
Required. Provides a way to specify processing options. If you do not wish to
specify any options, you must set the length field to binary zeros.
LENGTH: Halfword that specifies the number of bytes in the options field.
OPTIONS: Character string that contains the processing options of the Access
Method Services (AMS) PARM command. The options must comply to the
parameter syntax of the IDCAMS PARM command.
v (E) The DNAMES List
Optional. This value must be a halfword of binary zeros.
v (F) USER DATA AREA
As long as no return or reason codes are inserted, the user data area (8 bytes)
contains the character string EXTRACT.
If return or reason codes are inserted, the meaning is as follows:
FF = Valid return or reason code follows.
xx = Catalog return code in hexadecimals.
yy = Catalog reason code in hexadecimals.
A user I/O routine is invoked by IDCAMS for all operations against the selected
files. The identification of the files and their associated I/O routines is via the
Input/Output list of the processor invocation parameter list ( Figure 48 on page
346).
When writing a user I/O routine, the user must be aware of three things. First, the
processor handles the user file as if it were a nonVSAM file that contains
undefined records (maximum record length is 32760 bytes) with a physical
sequential organization. The processor does not test for the existence of the file.
Second, the user must know the data format so that the user's routine can be
coded to handle the correct type of input and format the correct type of output.
Third, every user routine must handle errors encountered for files it is managing
and provide to the processor a return code in register 15. The processor uses the
return code to determine what to do next.
Figure 49 shows the argument list used in communication between the user I/O
routine and the IDCAMS processor. The user I/O routine is invoked by the
processor for OPEN, CLOSE, GET and PUT routines. The type of operation to be
performed is indicated via the IOFLAGS. The IOINFO field indicates, for OPEN
and CLOSE operations, the filename of the DLBL or TLBL statements for the file.
For GET and PUT operations, the IOINFO field is used to communicate the record
length and address.
REG 1 (A)
IOFLAGS
FLAGS (C)
IOINFO
CLOSE
DSNAME (D)
GET
or
PUT OPEN
Explanation
The following explains Figure 49.
v (A) Register 1
When IDCAMS gives control to the PUT I/O routine pointed to by the
IOROUTINE, Register 1 points to an IDCAMS argument list. Refer to Figure 48
on page 346.
v (B) User Data
The user data pointer is obtained from the input/output list of the processor
invocation parameter list. The user data area contains the character string
EXTRACT, or return or reason codes. Refer to Figure 48 on page 346.
v (C) Flags
Value or Bit
Byte Pattern Meaning
1* 0 OPEN
4 CLOSE
8 GET
12 PUT
2 1..... OPEN for Input
.1.... OPEN for Output
..1... On OPEN, indicates that IOINFO contains the
address of a DLBL or TLBL file name.
3, 4** 0 A normal data record is to be written.
N If an IDC message is to be written, the message
serial number converted to binary.
* Operation only.
** Record type for PUT only.
v (D) DSNAME
A 44-byte field, left justified, and padded with blanks if necessary. It contains the
name of the data set to be closed.
v (E) DNAME
An 8-byte field, left justified, and padded with blanks if necessary. It contains
the DLBL or TLBL file name.
v (F) RECORD and RECORD LENGTH
– For a GET: The information is returned to the processor by the user's I/O
routine in the 8-byte area passed to the routine. Where:
RECORD: Address of the retrieved record.
RECORD LENGTH: Fullword length of the retrieved record.
– For a PUT: The processor gives the information to the user's I/O routine.
Where:
RECORD: Address of the record to be written.
RECORD LENGTH: Fullword length of record to be written.
The information helps you to decide whether your existing ISAM processing
programs can use the ISAM Interface Program (IIP) to process files that have been
converted from ISAM format to VSE/VSAM format.
The IIP minimizes your conversion costs and scheduling problems by permitting
ISAM programs to process VSE/VSAM files. Also, through IIP, ISAM programs
can process ISAM files and VSE/VSAM files concurrently.
The extent to which you can use your existing ISAM processing programs to
process key-sequenced files relates to the similarities between ISAM and
VSE/VSAM, as well as to limitations of the IIP.
The following describes the similarities and differences between VSE/VSAM and
ISAM in the areas that you are familiar with from using ISAM, and outlines the
functions of VSE/VSAM that have no counterpart in ISAM.
Index Structure
The relation of a VSE/VSAM index to the direct access storage space whose
records it controls is quite different from the corresponding relation for ISAM, in
particular with regard to overflow areas for record insertion.
ISAM keeps a two-part index entry for every primary track on which a file is
stored. The first part of the entry indicates the highest-keyed record on the primary
track. The second part indicates the highest-keyed record from that primary track
that is in the overflow area, and gives the physical location in the overflow area of
the lowest-keyed overflow record from that primary track. All the records in the
overflow area from a primary track are chained together, from the lowest-keyed to
© Copyright IBM Corp. 1979, 2014 351
ISAM Interface Program
VSE/VSAM does not distinguish between primary and overflow areas. A control
interval (CI), whether used or free, has an entry in the sequence set, and after
records are stored in a free CI, it is processed in exactly the same way as other
used CIs. Data records are blocked in all CIs and addressed, without chaining, by
way of an index entry that contains the key (in compressed form) of the
highest-keyed record in a CI.
All VSE/VSAM files are defined in a catalog. Records are loaded into a file with
IDCAMS or with the processing program, in one execution or in stages. When
loading new records into an empty key-sequenced file, the index is built
automatically. IDCAMS does not merge input files. For a key-sequenced file,
however, input records are merged in key sequence with existing records of the
output file.
Deletion of Records
With ISAM, records cannot be deleted until the file is reorganized; you must mark
the records you want to delete.
When you define a VSE/VSAM file, you can specify the amount of direct access
storage space that is to be allocated automatically, when required, beyond the
primary space allocation. You can specify the amount of secondary space in
number of data records, or in number of blocks (for FBA), or tracks or cylinders
(for CKD).
With a multiple volume key-sequenced file, you can assign data to various
volumes according to the ranges of key values in the data records. For example, for
a file that resides on three volumes, you might assign keys A-E to the first volume,
F-M to the second volume, and N-Z to the third.
Automatic CLOSE
Job Control
ASSGN or EXTENT statements are not required for file access. The IIP supports
disposition processing (DISP parameter on DLBL statement) for reusable and
dynamic files.
With VSE/VSAM, you can retrieve and store the records of a key-sequenced file by
relative byte address (RBA), as well as by key. With ISAM you can position by
physical address, but you must retrieve in a separate request.
With VSE/VSAM, you can retrieve a record directly, not only with a full-key
search argument, but also with a generic search argument. ISAM can only position
a record by generic argument; you must retrieve the record separately.
A processing program can issue concurrent requests for a single ACB. The requests
can be sequential or direct, or both, for the same part or different parts of the file.
VSE/VSAM maintains a position in the file for every concurrent request.
The VSE/VSAM OPEN routine does not abnormally terminate the user program,
but returns an explanatory message in all cases where it cannot carry out a request
to open a file.
Instead of only one index, you can build several indexes (called alternate indexes)
for a single data file. Every index can access the file in a different way so that you
need not keep multiple copies of the same information organized differently for
different applications.
You can process a key-sequenced file sequentially and skip records automatically,
as though you were using direct access.
The following lists prerequisites for using the IIP, and those ISAM functions for
which there is no VSE/VSAM equivalent or which cannot be simulated by the IIP.
v The program must run successfully under ISAM. IIP does not check for
parameters that are invalid for ISAM.
v The program must use standard ISAM interfaces.
v Record ID processing of ISAM cannot be used because VSE/VSAM does not use
the record ID functions.
v VSE/VSAM does not return device-dependent information or the storage or disk
address of the record containing the error in the ERREXT parameter list.
v VSE/VSAM always assumes EXTEND mode when loading a file. If you try to
reload an existing file, VSE/VSAM returns a sequence error code to you. You
must DELETE and DEFINE the file (or specify DISP=NEW to reset a reusable
file) before reloading it.
v The ISAM program cannot open a DTF while another ISAM DTF or VSE/VSAM
ACB is already open for output processing for the same file unless VSE/VSAM
SHAREOPTIONS(3) was specified for the file. If you select SHAREOPTIONS (3),
you must accept the responsibility of maintaining file integrity.
SHAREOPTIONS(4) may also be valid if the records accessed concurrently are
not in the same CA.
v Files defined with SHAREOPTIONS(4) cannot be shared between IIP users in
different systems because IIP always opens a file for output. Note that another
system can open the file for input using native VSE/VSAM access.
Ensure that your existing ISAM programs comply with the restrictions described
above. If they comply, there is no need to assemble or link-edit these programs
again.
Data Space
You may define the file on a volume that already contains enough free VSE/VSAM
data space for it, or you may define data space when you define the file (unique
file).
Buffer Space
The BUFFERSPACE parameter in the DEFINE command specifies how much space
VSE/VSAM will have for I/O buffers. If you do not specify the BUFFERSPACE
parameter, the default is at least two data buffers and one index buffer. For better
performance, however, you can specify space for more than two data buffers and
one index buffer.
Reusable File
If you have a file that requires rebuilding, initially specify the REUSE parameter in
the DEFINE command. When reloading the file, specify DISP=NEW in the DLBL
statement.
For VSE/VSAM, some of the information given in the DTFIS parameters must be
specified correctly in the DEFINE command, because the value specified in the
command overrides the DTF. These parameters and the corresponding DEFINE
command options are:
The IIP uses the following DTFIS parameters (all other parameters are ignored):
ERREXT=YES (for a description of the ERREXT parameter
with IIP, see Table 41 on page 358)
IOAREAL=name (used when IOROUT=LOAD)
IOAREAS=name (used if SETL BOF is issued)
IOREG=(r)
IOROUT=LOAD, ADD, RETRVE, ADDRTR
KEYARG=name
RECFORM=FIXUNB, FIXBLK
WORKL=name
WORKR=name
WORKS=YES
Note:
1. Do not move files from ISAM to tape and then from tape to VSE/VSAM.
2. The REPRO procedure must be from disk to disk.
3. If you have records marked for deletion in the ISAM file and do not want them
copied into the VSE/VSAM file, you should use your ISAM load program,
because the REPRO command copies all records from the ISAM file, including
those marked for deletion.
4. REPRO of a fixed, unblocked ISAM file creates records consisting of the
original record preceded by its key. The IIP strips this leading key when a
program that specifies fixed unblocked ISAM is executed, and returns only the
original record to you. The leading key is returned with the record, however,
when the file is accessed in native VSE/VSAM mode.
One DLBL statement is required for the file; it connects the ISAM filename (IFN) to
the VSE/VSAM cluster name (MSTRFILE) stored in the catalog. The DLBL type
code parameter (VSAM) causes the ISAM Interface Program to be called. The same
VSE/VSAM job control statements are required regardless of the type of ISAM
program.
Most existing processing programs that use ISAM can process VSE/VSAM files
through the ISAM Interface Program (IIP) with little or no change.
Interpret Modified to
Convert
Each Satisfy
Files
Request Restrictions
New Key-Sequenced
Files ACCESS VSE/VSAM ACCESS ISAM Programs
Files Converted to
with Indexes VSE/VSAM
Programs (1)
(1) Converted to take advantage of
additional VSE/VSAM functions.
The IIP intercepts every subsequent ISAM request, analyzes it to determine the
equivalent keyed VSE/VSAM request, which it defines in the RPL constructed by
OPEN, and then initiates the request.
The IIP interprets VSE/VSAM's return codes and, if the VSE/VSAM condition
corresponds to an ISAM condition, turns on the respective bit in the filenameC
byte in the DTFIS. For irrecoverable errors that cannot be posted in the filenameC
byte, the IIP prints a message, closes the VSE/VSAM file (by the VSE/VSAM
CLOSE routine), and ends the job. If a physical I/O error occurs and ERREXT=YES
was specified in the DTFIS, the IIP transfers additional error information to the
processing program. Table 41 on page 358 shows the format of the ERREXT
parameter list.
Table 42 on page 358 and Table 43 on page 358 show the formats of the filenameC
byte for ISAM processing through the IIP.
Table 41. ERREXT Parameter List for ISAM Programs with IIP
Bytes Bits Contents
0-3 - DTF address
4-15 - Not supported by the IIP
16 0 Data
1 VSE/VSAM sequence set
2 VSE/VSAM index set
3-5 Not used
6 Read operation
7 Write operation
17 - Not supported by the IIP
FBA Support
Files on an FBA device cannot be processed by MVS. This does not affect the
processing of catalog entries or files for a CKD device.
Files on an FBA device can be transferred (through EXPORT and IMPORT) from
VSE/VSAM to a CKD device on an MVS system and vice versa.
Space class specifications are not supported by MVS, but a file, data space, or
volume with space classes under VSE/VSAM can be processed by MVS/VSAM.
Default Models
They allow users of IDCAMS to choose their own parameter defaults. Default
models are not supported by MVS/VSAM; however, the resultant file and catalog
data can be processed by MVS.
Default Volumes
They allow users to omit explicit volume lists in the DEFINE CLUSTER and
DEFINE ALTERNATEINDEX commands. Also, the parameter DEFAULTVOLUMES
is provided in the IMPORT command to allow users to override the exported
volumes list. The required volumes are selected from the volumes list associated
with the default model.
The command functions are not supported by MVS; however, the resulting file and
catalog data can be processed by MVS.
Multiple catalogs can own space on the same disk volume, providing that only one
catalog resides on that volume.
After you use VSE/VSAM to define, on one volume, several spaces belonging to
different catalogs, you can perform the following activities while running on MVS:
v Define or delete a file in the space belonging to any one of the catalogs.
v Access any file.
v Define additional space belonging to any one of the catalogs.
v Define a UNIQUE file belonging to any one of the catalogs.
v Delete a UNIQUE file.
This service examines VSE/VSAM catalogs containing DFSMSdfp files (alias and
generation data group), but it can validate only their horizontal and vertical
extension chains. It does not check associations or volume information for
DFSMSdfp files.
Backup/Restore
The IDCAMS commands BACKUP and RESTORE are not supported by IDCAMS
under MVS/VSAM.
Device Dependency
VSE/VSAM treats the IBM 3995 Model 151 Optical Library Dataserver as an IBM
3390 Model 2 direct access storage device. However, a VSE/VSAM catalog that
resides on an IBM 3995 Model 151 Optical Library Dataserver cannot be shared
with a DFSMSdfp system.
VSE/VSAM compressed files can be ported to an MVS system using the EXPORT
and IMPORT or REPRO functions. The portable data set will be in uncompressed
format.
Both access methods use an ACB. The VSE/VSAM ACB represents the file. In
VTAM, however, the ACB essentially represents an application program. Both
types of ACBs are objects of the OPEN macro instruction, and VSE/VSAM and
VTAM ACBs can be opened with one macro instruction.
Both types of ACBs can contain pointers to an exit list. Both VSE/VSAM and
VTAM exit lists contain addresses of routines to be entered when error conditions
occur (LERAD and SYNAD exit routines) and addresses of routines to be entered
when special situations occur.
Both access methods follow the same general I/O-request procedure. An I/O
macro instruction is issued that indicates an RPL. The RPL in turn contains
information about the request, such as the location of the I/O work area or
whether the request is to be handled synchronously or asynchronously.
Finally, both access methods use the same macro instructions (GENCB, MODCB,
TESTCB, and SHOWCB) to generate and manipulate their respective ACB, EXLST,
and RPL control blocks.
To make control blocks unique, a special parameter is used when the control block
is generated. By specifying AM=VTAM on the ACB, EXLST, or RPL macro
instruction, the control block is generated in VTAM form. Omitting this parameter
causes a VSE/VSAM control block to be built. A VSE/VSAM control block will
also be built if AM=VSAM is specified. If an installation uses both of these access
methods, it may be desirable to have AM=VSAM specified in VSE/VSAM
programs for documentation purposes.
Provides conceptual information on the labels that are used with VSE/VSAM for
identifying volumes, data space, and files. It explains how the labels are processed,
and includes definition examples relating to job control and IDCAMS commands.
VSE/VSAM uses a:
v Volume label (VOL1)
v Data space label and its continuation (format-1 and format-3)
v VTOC label (format-4)
User-standard labels are not supported. Neither is the F-5 label, but space is
reserved for it on the VTOC for the purpose of MVS/SP compatibility.
Volume Label
The volume label (VOL1) is generally written during initialization. At that time, a
permanent volume number is written on the volume as part of the label to give the
volume a permanent ID.
The VSE/VSAM format-1 VTOC label describes direct access space; the
characteristics of the logical files that occupy that space are described in the
VSE/VSAM catalog.
There is a format-1 label for every VSE/VSAM data space that is on the volume.
Every data space consists of one or more separate extents:
v Up to three extents are described in the format-1 label.
v Extents additional to the first three extents are described in a format-3 label; the
format-3 label is pointed to by the format-1 label. (Refer to “Space Continuation
Label” on page 364.)
A format-3 VTOC label is written whenever a VSE/VSAM data space occupies more
than three separate areas (extents) of a volume. It is used to supply the limits
(starting and ending addresses) of the additional extents. Thirteen separate extents
can be defined by one format-3 label. This label is pointed to by the format-1 label.
VTOC Label
A format-4 VTOC label defines the volume table of contents (VTOC). Also, if a volume
contains VSE/VSAM spaces, the label defines the volume as a VSE/VSAM volume.
The format-4 label is always the first record in the VTOC. The record is written
when you initialize your disk pack by using the IBM Device Support Facilities
(ICKDSF). For details, refer to the Device Support Facilities User's Guide and Reference.
The OPEN/CLOSE routines refer to the format-4 label to determine the extent of
the VTOC.
The format-1 and format-3 labels are stored in the VTOC and are processed as
described under “VTOC Label Processing” on page 365.
Location of Labels
Volume Layouts
Each volume has a VTOC that contains labels for the data spaces.
Figure 51 on page 365 shows two volumes that contain VSE/VSAM data spaces (1,
2, and 3). The figure illustrates the relationship between volumes, VSE/VSAM data
spaces, and labels in the VTOC. Specifically:
v The two volumes contain the VSE/VSAM data spaces 1, 2, and 3. Each volume
has a VTOC that describes the data spaces owned by VSE/VSAM. The files are
described in the VSE/VSAM catalog.
v Data Space 2 is occupied by File A; this file is assumed to be a unique file. If a
unique file occupies a data space, no other file can be suballocated in the data
space, and File A cannot be extended to any other data space.
v The 44-byte name field of the label for Data Space 2 contains the name (the
file-ID) of file A. The 44-byte name fields of the other data spaces contain the
data space name that is automatically generated by VSE/VSAM
Volume 1 Volume 2
VTOC VTOC
File B File D
Data
Space 1 File C
F-4 F-5 F-1 F-1 F-1 F-4 F-5 F-1 F-1 F-1
Even if it does not contain any files, a data space is owned by VSE/VSAM and is
not available for files of other access methods.
Label processing is done when data spaces (including catalogs and unique files)
are created or deleted, and during ALTER NEWNAME for unique files.
The format-1 and (if needed) format-3 VTOC labels are created and checked (for
overlap or duplicate name) only when data spaces are created (including data
spaces for unique files). If data spaces are deleted, their format-1 and format-3
labels are removed from the VTOC. Labels are also altered during RESETCAT
processing if the data in the label and the catalog do not agree. When VSE/VSAM
files are processed, the VSE/VSAM catalog is used for checking the location and
characteristics of the files.
VSE/VSAM Files
VTOC label processing takes place only for unique VSE/VSAM files that are
defined, deleted, or renamed.
VSE/VSAM files are normally defined after data spaces have been defined. The
direct access space for the files is suballocated by VSE/VSAM from one or more
data spaces. You may select the volume or volumes the file will reside on. You tell
VSE/VSAM how much space to suballocate to the file initially and, optionally,
how much additional space to suballocate when the file must be extended.
VSE/VSAM decides which data spaces or portions of data spaces to suballocate to
a file.
You can, however, specify the size and exact location of the file when you define it.
In this case, the file is called unique and occupies its own data space which is
defined when the file is defined. No other files can occupy that data space. If the
file extends across more than one volume, it occupies one data space on every
volume. The format-1 and format-3 labels still describe the data space(s) occupied
by the unique file. A key-sequenced unique file requires separate data spaces for
the data and the index components.
The file-ID parameter of the // DLBL statement (if specified) indicates the file you
want to process. It is the same as the name of the file, stored in the catalog, which
was specified in the NAME(entryname) parameter of the DEFINE statement. For
VSE/VSAM data spaces, the format-1 label contains a data space name that is
generated by VSE/VSAM.
A VTOC for an FBA is divided into control intervals (CIs) of the VSE/VSAM
relative record format; the VTOC labels reside in these CIs. There is a slot for the
VTOC label and its corresponding RDF in the CI. The CI size is a multiple of FBA
block size; a CI always starts on a block boundary. Specify VTOC size through the
DSF program.
The VOL1 label contains the VTOC CI size, the number of blocks per CI, and the
number of labels per CI. VTOC labels are referenced according to relative record
number (beginning with 1).
The VOL1 label, written by the IBM Device Support Facilities (ICKDSF) program,
contains a permanent volume number.
If any additional volume labels follow the VOL1 label, VSE/VSAM ignores them.
From the VOL1 label, VSE/VSAM determines the location of the VTOC.
// DLBL Statement
The // DLBL statement for defining a data space under VSE/VSAM requires only
the filename parameter and the VSE/VSAM code. The // DLBL filename is
identical to the dname specified in the FILE parameter of the DEFINE command.
The file-ID parameter is not required and is ignored if you specify it. The date
parameter can be specified, but it has no real function. VSE/VSAM data spaces
and files can be deleted only by using the DELETE command of IDCAMS.
// EXTENT Statement
The // EXTENT statement provides the starting address (relative address) and the
number of tracks (CKD) or blocks (FBA), which indirectly give the ending address.
The // EXTENT statement also provides the order in which this extent should be
processed in a multiple-extent unique file.
If all extents of the new unique file are valid, VSE/VSAM writes one (or two, for a
KSDS) format-1 label, and (if necessary) the format-3 label into an available
location in the VTOC.
For the data or the index of a unique file, you may specify a data space name in
the DEFINE command. If specified, this name is entered in the catalog and in the
label. Remember that even though the name of a unique file is entered in the labels
of the data space it occupies, the information describing the file is in the catalog.
Bytes 45-60, 63-75, 83-84, and 94 are written in the format-1 label for VSE/VSAM.
This information is for compatibility with the format-1 labels of other access
methods; during processing, VSE/VSAM uses the catalog, rather than using
information from the VTOC.
Bytes 106-115 define the first (or only) extent allocated to the unique file
component. If there is more than one extent, bytes 116-125 define the second
extent, and bytes 126-135 define the third extent. These fields are written from the
// EXTENT statements you supply.
If you have included more than three // EXTENT statements, VSE/VSAM writes a
format-3 label and writes the address of that label in the pointer field (bytes
136-140) of the format-1 label.
If the unique file is deleted, the format-1 label (and if present, the format-3 label) is
removed from the VTOC.
If more than three extents are required for the data space (or unique file),
VSE/VSAM sets up a format-3 label for the additional extents. A data space can
consist of up to 16 extents, so only one format-3 label is allowed. VSE/VSAM
processes the extent fields of the format-3 labels in the same manner as those of
the format-1 label.
If the data space is deleted, the format-3 label is removed from the VTOC, along
with the format-1 label.
The same date and time are entered in the catalog. VSE/VSAM OPEN routines
check if the volume time stamp matches the time stamp for it in the catalog. If
they do not match, processing continues, but an error code is issued to indicate
that the VTOC might not agree with the data space information in the volume's
catalog entry.
If all VSE/VSAM data space is deleted from a volume, the VSE/VSAM indicator
field (bytes 77-87) is erased. The deleted space can be used by other z/VSE access
methods.
VSE/VSAM Files
Defining a File: Suballocating Data Space (Non-Unique Files)
When a non-unique file is defined, the space for it can be suballocated from one or
more existing data spaces on one or more volumes. This is illustrated in Figure 53
on page 373. VTOC label processing is not performed for the following reasons:
v Information needed to set up the file is in the DEFINE command.
v Information about data spaces to be suballocated to the file is in the VSE/VSAM
catalog.
The resulting description of the file is entered in the catalog. The // DLBL and //
EXTENT statements are not required; they are ignored if specified for a catalog.
You indicate the volume(s) on which the file will reside, the amount of space to be
initially suballocated to the file and, optionally, the amount of space to be
suballocated if the file must be extended. VSE/VSAM selects the extent(s) on the
volume on which to write the file. If you specify more volumes than necessary for
the primary space, the additional volumes can be used when the file is extended, if
they contain free data space.
If none of the volumes contains free data space, new data spaces must be defined,
or volumes with free data space can be made available to the file through the
IDCAMS command ALTER. You can indicate in which order the volumes should
be used. You can also decide to place certain portions of the file (key ranges) on
certain volumes. If the file must be extended, VSE/VSAM can use only the
volumes you indicated. For further information, refer to “Multiple Volume
Support” on page 104.
Volume Mounting
The volume containing the catalog must be mounted, but the volumes on which
the file is defined need not be mounted. Additional information about volume
mounting requirements appears in “Using an Object as a Model” on page 58.
File Loading
Loading a file is a separate step from defining it. Records can be loaded into a file
by a VSE/VSAM processing program by using the PUT macro, or the IDCAMS
command REPRO.
The data space for a unique file is defined (implicitly) in the same DEFINE
command as the file itself. Characteristics of the file (such as logical record length)
are specified in the command, just as with a suballocated file. Space information is
taken from // DLBL and // EXTENT statements instead of from the DEFINE
command.
The data and index of a unique key-sequenced file or alternate index require
separate data spaces, and hence, separate // DLBL and // EXTENT statements.
A unique file cannot be extended. The extents of the file are the same as the
extents of the data spaces and, because they are described in the VTOC, cannot be
changed without deleting the file.
Label processing is performed for the data spaces of a unique file as described
under “VSE/VSAM Data Space” on page 367. The only difference is that the
44-byte names of the data and index are placed in the labels and in the file's
catalog entry. The data spaces of unique files are described in the VSE/VSAM
catalog as well as in the VTOC.
Processing a File
When a previously defined file is processed by a VSE/VSAM application program
or by a PRINT or REPRO command, a // DLBL statement is required for the file.
The statement is retrieved by VSE/VSAM OPEN from the label area. OPEN
obtains the // DLBL statement from the file name specified in the IDCAMS macro
ACB in the processing program. All the information required to process the file is
in the VSE/VSAM catalog or the label area; no VTOC processing is performed (see
Figure 55 on page 374).
// DLBL Statement
The // DLBL statement is used to find the 44-byte name of the file in the catalog.
The 44-byte name matches the file-ID parameter. For PRINT and REPRO and
VSE/VSAM application programs, the CAT parameter is required only if you want
to override the system's assumption that the job catalog, or, if there is none, the
master catalog, owns the file. The function of the job catalog is explained under
“Specifying a Job Catalog” on page 44.
Volume Mounting
If the volumes allocated to the file are not mounted, messages are issued to the
operator to mount the required volumes or cancel the job. A file can span a
maximum of 16 volumes. If a multivolume file is opened for direct or
keyed-sequential processing, all volumes must be mounted. If it is opened for
addressed-sequential processing, only one volume at a time need be mounted.
The first allocation made on every volume is always the primary allocation.
VSE/VSAM extends a suballocated file if:
v Secondary space allocation was specified when the file was defined.
v No secondary space allocation was specified, but overflow volumes are specified
in the VOLUMES parameter of the DEFINE CLUSTER command. In that case,
the primary allocation is taken.
v A volume that contains or can contain part of the file has unused data space of
the required class.
Use the IDCAMS command ALTER to make more volumes available to the file
after it has been defined.
The VOL1 label is checked to verify that the correct volume is mounted (volume
serial number), and the format-4 label is checked to verify that the catalog is at the
proper level (volume time stamp). Processing for these labels is described under
“VSE/VSAM Data Space” on page 367.
Note:
1. In Figure 53 on page 373 through Figure 54 on page 373, further parameters are
required in the DEFINE command to specify the characteristics (such as logical
record length) of the VSE/VSAM file. These parameters are not shown, because
they do not affect space allocation and label processing.
2. For the description of the IDCAMS command DEFINE, refer to the VSE/VSAM
Commands, SC33-8315. More information about the job control statements
required for VSE/VSAM is in “Use of z/VSE Job Control Statements for
VSE/VSAM” on page 25.
For the master catalog, a // DLBL statement is required. In the samples, assume
that the statement is in the label information area.
Figure 53. Example: Defining a VSE/VSAM File Suballocated from a Data Space
Describes the VSE/VSAM tools summarized in Table 44, below. The information is
primarily for system administrators. The descriptions emphasize running the tools,
rather than interpreting the output.
Under certain conditions, the IBM support representative might ask you to supply
the output of diagnosis tools.
Table 44. VSE/VSAM Diagnosis Tools
Tool Purpose
Catalog Check Service Aid To identify erroneous catalog records. Under certain
(IKQVCHK) conditions, VSE/VSAM automatically invokes the tool,
or you can invoke it yourself.
To print an error symptom infromation. You can
SNAP Trace Facility invoke a SNAP trace to provide an error code trace
(IKQVEDA) during program processing.
Maintain VTOC and VOL1 Utility To assists you in maintaining the VTOC and VOL1
(IKQVDU) labels on disk devices.
For information on other diagnosis tools available in the z/VSE environment (for
example, for producing various types of dumps), refer to the z/VSE Guide for
Solving Problems, SC34-2605.
Furthermore, you should run IKQVCHK to assess catalog integrity in the following
circumstances:
v After a system failure.
v When a file or catalog does not behave as expected.
v As part of regular system maintenance.
In Case of Errors
IKQVCHK issues error messages that identify missing or inconsistent information.
Perform the corrective action documented in z/VSE Messages and Codes, Volume 2,
SC34-2633.Take the action before contacting IBM for support. If the problem
persists, report it. Make IKQVCHK output available so that the system
administrator or your IBM support representative can assess the extent of catalog
damage and how much rebuilding is required.
where:
aaaa is the name (up to 44 characters) of
the catalog that is to be checked.
The entire catalog is checked.
If you omit the PARM parameter, the default catalog is checked. (The default
catalog is the job catalog if the IJSYSUC DLBL statement is specified. Otherwise, it
is the master catalog.)
Catalog errors are difficult to understand, because they involve internal catalog
records, data, and control blocks which most users do not see. The programmer
action associated with every message, however, does not require a full knowledge
of the error condition. Similarly, you do not have to understand the listing of
catalog records and the 512-byte catalog record dump that accompany the
messages.
For the full documentation of all error messages issued by IKQVCHK, refer to the
"IKQ-Prefix" in z/VSE Messages and Codes, Volume 2, SC34-2633.
IKQ0016I DATA SET NAME NOT SAME IN HIGH AND LOW KEY RANGE RECORDS
LKR REC WITH INVALID DATA :
0000 0000002E 01000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0020 00000000 00000000 00000000 C9015700 8FE7E7E7 E2F14BC9 D5C4C5E7 40404040 *............I....XXXS1.INDEX *
0040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40FFFFFF * ...*
0060 FFFFFFFF FF92057F 00000F20 F000FFFF FFFF0000 01000001 80000010 000000A0 *............0...................*
0080 00FFFFFF FF0000FF FFFFFFFF FFFFFF00 00000000 05000000 C0000000 00010100 *................................*
00A0 00620201 00006803 01000000 44010062 60000060 00040000 000A0000 000A0000 *................................*
00C0 00000000 00001000 00000FF9 00000000 00000000 00000000 00000000 00000000 *...........9....................*
00E0 A54E6475 B838FE02 00010001 00000001 00000000 00000000 00000000 00000000 *................................*
0100 00009000 00000000 00000000 0000000F 0006C300 002C0327 3010200E F1F1F1F1 *..................C.........1111*
0120 F1F10000 80010000 00000000 10000000 A0000000 1000000A 00010000 02000000 *11..............................*
0140 00001400 11000000 01000000 01000100 00000000 009FFF00 00000000 00000000 *................................*
0160 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0180 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01A0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01C0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01E0 00000000 00000000 00000000 00000000 00000000 00000000 000001F9 01F90000 *...........................9.9..*
ASSOCIATED HKR REC FOLLOWS:
NAME = KSDS1.INDEX CI = 00002E
The contents of CI 2 are printed just below the submessage ASSOC WITH
UNEQUAL TYPE. Field X‘2C’ of a catalog record always tells what type of catalog
record it is. In this case, the record type is X‘C3’ or C, meaning a cluster record,
which does not match the record type (D) in the group occurrence (the first
record).
IKQ0027I RECORD TYPE IN ASSOCIATION GROUP OCCURRENCE NOT EQUAL TO RECORD TYPE IN RECORD IT REFERENCES
IKQ0028I AFFECTED GROUP OCCURRENCE AT DISPLACEMENT 135 (X’087’)
REC WITH ERRONEOUS GO FOLLOWS:
0000 0000002F 01000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0020 00000000 00000000 00000000 C3008D00 6CD2E2C4 E2F24040 40404040 40404040 *............C....KSDS2 *
0040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40FFFFFF * ...*
0060 FFFFFFFF FF92057F 00000F00 00000000 00030000 00020100 00060202 00000044 *................................*
0080 010006C4 00003000 06C90000 31000000 00000000 00000000 00000000 00000000 *...D.....I......................*
00A0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
00C0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
00E0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0100 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0120 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0140 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0160 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0180 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01A0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01C0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01E0 00000000 00000000 00000000 00000000 00000000 00000000 000001F9 01F90000 *...........................9.9..*
ASSOC REC WITH UNEQUAL TYPE:
0000 00000031 01000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0020 00000000 00000000 00000000 C3015700 8FD2E2C4 E2F24BC9 D5C4C5E7 40404040 *............C....KSDS2.INDEX *
0040 40404040 40404040 40404040 40404040 40404040 40404040 40404040 40FFFFFF * ...*
0060 FFFFFFFF FF92057F 00000F00 6000FFFF FFFF0000 03000003 80000008 000001B0 *................................*
0080 00FFFFFF FF0000FF FFFFFFFF FFFFFF00 00000000 05000000 C0000000 00010100 *................................*
00A0 00620201 00006803 01000000 44010062 60080060 000C0000 000A0000 00120000 *................................*
00C0 00000000 00000800 000007F9 00000000 00000000 00000000 00000000 00000000 *...........9....................*
00E0 A54E6DEF 570E8C04 00010001 00000001 00000000 00000000 00000000 00000000 *................................*
0100 0001A800 00000000 00000000 00000005 0006C300 002F0327 3010200E F1F1F1F1 *..................C.........1111*
0120 F1F10000 80010000 00000000 08000001 B0000000 08000012 00010000 02000000 *11..............................*
0140 00001400 01000100 01000100 03000300 00000000 01AFFF00 00000000 00000000 *................................*
0160 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
0180 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01A0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01C0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 *................................*
01E0 00000000 00000000 00000000 00000000 00000000 00000000 000001F9 01F90000 *...........................9.9..*
ASSOCIATED HKR REC FOLLOWS:
NAME = KSDS2 CI = 00002F
Output of a Check
Figure 58 on page 379 shows catalog data that was produced by a run of
IKQVCHK against a catalog named VSAM.MCAT.
Figure 58. Example: Output from the Catalog Check Service Aid (IKQVCHK)
Note:
1. High-Key-Range Catalog Records
Each USED HKR-RECORD is a 47-byte “true name record”. It relates the
NAME (as specified in DEFINE CLUSTER or AIX), or the volume number (as
specified in DEFINE SPACE) to the CI number of the catalog record that
describes the object.
2. Low-Key-Range Catalog Records
The output line FORMATTED RECORDS shows the sum of formatted records
in the low-key range of the catalog (it equals the total of all fields below the
output line). Every low-key-range record occupies a full CI.For explanations to
the formatted records, refer to Table 45.
3. Depending on the circumstances, one of the following summary statements
appears at the bottom of the catalog data:
NO ERRORS WERE FOUND IN THIS CATALOG
MINOR ERRORS WERE FOUND AND CORRECTED IN THIS CATALOG
SERIOUS ERRORS WERE FOUND IN THIS CATALOG
The statement is preceded by messages that identify the catalog errors that
were found.
There is one volume record for every volume owned by the catalog.
VOLUME EXTENSION W A volume extension record provides the same data as a volume record. When a
RECORDS volume record becomes full, a volume extension record is created for it. There
are as many volume extension records as necessary to contain overflow
information.
NONVSAM RECORDS A A nonVSAM record describes a nonVSAM file. There is one nonVSAM record
for every nonVSAM file defined in the catalog.
EXTENSION RECORDS E An extension record contains overflow information from another catalog record
(except type V or F). There are as many extension records as necessary to
contain overflow information.
AIX RECORDS G An AIX record describes an alternate index. There is one AIX record for every
alternate index defined in the catalog.
PATH RECORDS R A path record describes a path. There is one path record for every path defined
in the catalog.
ALIAS RECORDS X Alias; applies to DFSMSdfp objects only.
UPGRADE RECORDS Y An upgrade record describes a set of alternate indexes that are to be upgraded
(kept up to date) when their base cluster is modified.
USER-CAT RECORDS U A user cat record describes a user catalog. The master catalog contains one user
cat record for every user catalog defined in it.
UNAVAILABLE An unavailable record is one that exists but is inaccessible because one or more
RECORDS pointers to it were destroyed.
v OPEN error trace (prints control blocks if an error occurs during OPEN
processing)
v CLOSE control block dump (at the beginning of CLOSE processing)
v Managed-SAM OPEN and CLOSE control block trace (when OPEN
processing is complete and at the beginning of CLOSE Processing)
0004 VSE/VSAM I/O trace
0005 I/O error trace
0006 Available for future development
0007 Available for future development
0008 Catalog management I/O trace (prints all I/O operations done by
VSE/VSAM catalog management)
0009 Record management error trace (prints control blocks for any error
detected by VSE/VSAM record management)
0010 Redirector trace
0011 Available for future development
0012 Reserved for diagnostic purposes
0013 In-core wrap trace for trace points within VSE/VSAM Record Management
0014 Level2 SNAP013 Trace (I/O, EXCPAD and z/VSE Lock Activity)
0015 Level3 SNAP013 Trace (Buffer Management)
0016 Produce a printout (PDUMP) each time the SNAP013 Trace Table wraps.
Note: Depending on which SNAP013 level was selected and the amount of
system activity, this might produce a lot of SYSLST output. Consider using
the DDNAME= parameter to limit the number of files traced. The
DDNAME= parameter is not supported by SNAP Traces 0001 and 0008.
0001 To Console
0002 - 0005 To SYSLST
0006, 0007 Future Development
0009, 0010 To SYSLST
0011 Future Development
0012 Reserved
0013 - 0015 In-core
0016 To SYSLST
With the MSHP PATCH command, the trace output can be limited to specific
elements. Your IBM support representative can give you further details.
where SYSnnn specifies the LU from which the SNAP commands are entered:
SYSLOG - SNAP commands are entered from the system console
(this is the default if PARM is omitted)
SYSIPT - SNAP commands are read from SYSIPT
PARM is optional. If the input is to be entered from the console, the system
responds with:
ENTER FUNCTION ENABLE │ DISABLE │ END │ HELP
where yy is the partition (BG or Fn) in which the SNAP is to be enabled. If PART
is omitted, the SNAP is enabled for the issuing partition. SNAP013 has an
additional parameter: SIZE=nnK, which specifies the size of the in-core wrap trace.
Note that the SNAP trace becomes effective immediately (without re-IPL), and only
for the partition which you have specified (or defaulted).
To keep the SNAP option that you just selected (ENABLE) in effect, and to go on
to run your program, enter:
END
If you want to activate the HELP function (which produces explanatory messages
on the console), enter:
HELP
Note that for a dynamic partition, the trace must be enabled while the
VSE/POWER job that is to be traced is already active. At the end of the
VSE/POWER job, the SNAP traces will be lost.
Notes:
1. Input from SYSIPT: If the input is to be read from SYSIPT, you must prepare
your input records in advance and place them on SYSIPT before the EXEC
command is entered (either on SYSLOG or SYSRDR). The format of these
records must be the same as described above for the console input. The last
command must be END. All messages are issued on SYSLOG.
2. After enabling or disabling a SNAP trace, the message IKQ0082I is issued. The
message lists all SNAP traces that are currently enabled for the partition.
Activating
You must now activate SNAP 0001 in your program. Do this by including one of
three UPSI statements in your job stream.
The UPSI job control statement specifies under which conditions the SNAP code
should be executed. Because user programs can also use the UPSI byte, make sure
that there is no conflict between the UPSI setting for SNAP and the UPSI
requirements for any program running in the same partition. Using UPSI, you can
specify that the error symptom message be printed under one of the following
conditions. If you do not specify an UPSI value, 00000000 is the default.
// UPSI 0
When the catalog management return code is not 0, 40, 68, or 160, or if
LISTCAT issued a return code not equal to 8. (These codes occur during
normal processing.)
// UPSI 1
When the catalog management return code is not zero.
// UPSI 11
For all catalog management return codes, including zero.
// UPSI 01
Same as 1 but with operator reply required.
// UPSI 011
Same as 11 but with operator reply required.
// UPSI 0111
Same as 0 but with operator reply required.
// UPSI 00001
Compression control services trace requires operator reply when a request
failed.
// UPSI 000011
Compression control services trace requires operator reply.
The error symptom string is preceded by the partition identifier (for example, BG,
F1, F2).
Figure 59 on page 385 is an example of the console listing for a job in which a
cluster and two alternate indexes are defined:
Note: This utility changes information in the VTOC only; it does not change
catalog entries. If you want to redefine a VSE/VSAM data space or UNIQUE file,
you must first issue a DELETE command to erase the file's catalog information.
PROCEDURE 1
PROCEDURE 1
PROCEDURE 2
PROCEDURE 3
PROCEDURE 3
When the console responds with ENTER DSN, reply with the data set name of the
VTOC label to be modified.
RESET SECURITY Causes the security bit in the F1 label to be reset.
When the console responds with ENTER DSN, reply with the data set name of the
VTOC label to be modified.
SCRATCH DSN=dsname Causes the VTOC label with the specified file name to be scratched. If the file is a
VSE/VSAM data space or a UNIQUE VSE/VSAM file, run an IDCAMS DELETE
SPACE or DELETE CLUSTER command to delete the catalog information for the
object(s) you just scratched. Specify the FORCE parameter if necessary.
SCRATCH VTOC Causes the entire VTOC to be scratched except for file names starting with the
characters “DOS.”, “VSE.”, and “PAGE”. In addition, an operator-authorization
prompt will be issued if the VTOC label is security-protected or describes a catalog.
If the VTOC contained VSE/VSAM data spaces, run an IDCAMS DELETE SPACE
command to delete the catalog information for the volume you just scratched.
Specify the FORCE parameter if necessary.
When the console responds with ENTER OLD DSN, reply with the file name of the
VTOC label to be changed. Be sure to enter the correct OLD DSN. No error checking
is performed if an invalid name is specified.
When the console responds with ENTER NEW DSN, reply with the new file name.
ALLOCATE Causes a new label to be created and written in the VTOC. To use this function, a
DLBL/EXTENT job control statement must be provided.
When the console responds with ENTER FILENAME, reply with the same file name
as that in the DLBL statement referred to above.
When the console responds with ENTER NEW DSN, reply with the file name of the
file to be created.
When the console responds with DO YOU WISH TO SECURITY PROTECT THIS
DATA SET? reply YES or NO. A reply of YES causes the data security bit to be set in
the F1 VTOC label. A reply of NO causes the data security bit to be reset.
RESTART Causes processing to be reinitiated with a READY prompt. This keyword can be used
as a response to any operator prompt.
CLIP LABEL=DISPLAY Causes the volume serial number to be displayed on the system console.
CLIP LABEL=SER=n..n Causes the existing volume serial number to be changed to the one specified as n..n.
END Causes processing to terminate.
where:
nnn is the code (for example: 020)
condition describes the problem (for example: VTOC FULL)
The following shows the code (nnn), the associated condition, and the action
required to correct the condition.
004 I/O ERROR WHILE READING VOLUME LABEL
Action: If the problem was not caused by a hardware error, restore the
volume.
008 VOLUME NOT MOUNTED
Action: Mount the correct volume.
012 I/O ERROR ON VTOC
Action: If the problem was not caused by a hardware error, restore the
volume.
016 DUPLICATE NAME ON VOLUME
Action: Choose another file name or scratch the original file from the
volume. If duplication is because of key ranges, ensure every UNIQUE key
range is on a separate volume.
Describes the VSAM Redirector Connector, which enables you to use your existing
applications (for example COBOL programs) without any changes to work with data
on any Java-enabled platform (for example, Linux on System z).
Related Topics:
The VSAM Redirector Connector handles requests to VSAM datasets and redirects
them to a different:
v Java platform (for example Linux on System z, Windows NT, Windows 2000,
Windows XP).
v file system (for example DB2 or flat files).
The saved changes can later be accessed via the Java-based connector by Java
programs running on the remote platform. Loader programs are also provided to
load and process the captured data from the VSAM delta cluster (for example, to
apply the changes to a database).
The EXCPAD user exit is enabled automatically under the following conditions:
1. a VSE/VSAM cluster is enabled for the Redirector,
2. the EXCPAD exit is defined during the OPEN request.
VSAM will attach only one Redirector subtask per partition even if multiple
redirected files are opened in the partition with an active EXCPAD.
If the EXCPAD exit is not active within the user’s application exit list, then the
Redirector will function in a normal way within the same running task as the
application.
The Redirector call is performed through the IKQVEX01 module’s exit logic. If you
provide your own IKQVEX01 exit, then the EXCPAD function support is applicable
to this exit as well.
access control table (DTSECTAB). A table that is used APA. All points addressable.
by the system to verify a user's right to access a certain
resource. APAR. Authorized Program Analysis Report.
access list. A table in which each entry specifies an appendage routine. A piece of code that is physically
address space or data space that a program can located in a program or subsystem, but logically and
reference. extension of a supervisor routine.
access method. A program, that is, a set of commands application profile. A control block in which the
(macros) to define files or addresses and to move data system stores the characteristics of one or more
to and from them; for example VSE/VSAM or VTAM. application programs.
account file. A disk file that is maintained by application program. A program that is written for or
VSE/POWER containing accounting information that is by a user that applies directly to the user's work, such
generated by VSE/POWER and the programs running as a program that does inventory control or payroll. See
under VSE/POWER. also batch program and online application program.
addressing mode (AMODE). A program attribute that AR/GPR. Access register and general-purpose register
refers to the address length that a program is prepared pair.
to handle on entry. Addresses can be either 24 bits or
31 bits in length. In 24 bit addressing mode, the ASC mode. Address space control mode.
processor treats all virtual addresses as 24-bit values; in
ASI (automated system initialization) procedure. A
31 bit addressing mode, the processor treats all virtual
set of control statements, which specifies values for an
addresses as 31-bit values. Programs with an
automatic system initialization.
addressing mode of ANY can receive control in either
24 bit or 31 bit addressing mode. attention routine (AR). A routine of the system that
receives control when the operator presses the
administration console. In z/VSE, one or more
Attention key. The routine sets up the console for the
consoles that receive all system messages, except for
input of a command, reads the command, and initiates
those that are directed to one particular console.
the system service that is requested by the command.
Contrast this with the user console, which receives only
those messages that are directed to it, for example
messages that are issued from a job that was submitted
Common Connector Framework (CCF). Is part of connector. In the context of z/VSE, a connector
IBM's Visual Age for Java, and allows connections to provides the middleware to connect two platforms:
remote hosts to be created and maintained. The CCF Web Client and z/VSE host, middle-tier and z/VSE
classes are contained in the VSEConnector.jar file and host, or Web Client and middle-tier.
are used internally by the VSE JavaBeans. CCF is
important for multitier architectures where, for connector (e-business connector). A piece of software
example, servlets run on a middle-tier platform. that is provided to connect to heterogeneous
Because CCF allows open connections to be kept in a environments. Most connectors communicate to
pool, this avoids the time that is involved in opening non-z/VSE Java-capable platforms.
and closing TCP/IP connection to the remote z/VSE
host each time a servlet is invoked. container. Is part of the JVM of application servers
such as the IBM WebSphere Application Server, and
CMS. Conversational monitor system running on facilitates the implementation of servlets, EJBs, and
z/VM. JSPs, by providing resource and transaction
management resources. For example, an EJB developer
common library. A library that can be interactively must not code against the JVM of the application
accessed by any user of the (sub)system that owns the server, but instead against the interface that is provided
library. by the container. The main role of a container is to act
as an intermediary between EJBs and clients, Is the host
part of the VSE JavaBeans, and is started using the job
Glossary 397
STARTVCS, which is placed in the reader queue during record during data transfer between a PC and its host.
the installation of z/VSE. Runs by default in dynamic The DCDF defines the record fields of a particular file
class R. and also to manage multiple EJB instances. for both, the PC and the host environment.
After EJBs have been written, they must be stored in a
container residing on an application server. The data import. The process of reformatting data that was
container then manages all threading and used under one operating system such that it can
client-interactions with the EJBs, and co-ordinate subsequently be used under a different operating
connection- and instance pooling. system.
control interval (CI). A fixed-length area of disk Data Interfile Transfer, Testing, and Operations
storage where VSE/VSAM stores records and (DITTO) utility. An IBM program that provides
distributes free space. It is the unit of information that file-to-file services for card I/O, tape, and disk devices.
VSE/VSAM transfers to or from disk storage. For FBA The latest version is called DITTO/ESA for VSE.
it must be an integral multiple to be defined at cluster
definition, of the block size. Data Language/I (DL/I). A database access language
that is used with CICS.
control program. A program to schedule and
supervise the running of programs in a system. data link. In SNA, the combination of the link
connection and the link stations joining network noes,
conversational monitor system (CMS). A virtual for example, a z/Architecture channel and its
machine operating system that provides general associated protocols. A link is both logical and physical.
interactive time sharing, problem solving, and program
development capabilities and operates under the data security. Is the host part of the VSE JavaBeans,
control of z/VM. and is started using the job STARTVCS, which is placed
in the reader queue during installation of z/VSE. Runs
count-key-data (CKD) device. A disk device that store by default in dynamic class R. See access control.
data in the record format: count field, key field, data
field. The count field contains, among others, the data set header record. In VSE/POWER abbreviated
address of the record in the format: cylinder, head as DSHR, alias NDH or DSH. An NJE control record
(track), record number, and the length of the data field. either preceding output data or, in the middle of input
The key field, if present, contains the record's key or data, indicating a change in the data format.
search argument. CKD disk space is allocated by tracks
data space. A range of up to 2 gigabytes of contiguous
and cylinders. Contrast with FBA disk device. See also
virtual storage addresses that a program can directly
extended count-key-data device.
manipulate through ESA/370 instructions. Unlike an
cross-partition communication control. A facility that address space, a data space can hold only user data; it
enables VSE subsystems and user programs to does not contain shared areas, system data, or
communicate with each other; for example, with programs. Instructions do not execute in a data space,
VSE/POWER. although in a program can reside in a data space as
nonexecutable code. Contrast with address space.
cryptographic token. Usually referred to simply as a
token, this is a device, which provides an interface for data terminal equipment (DTE). In SNA, the part of a
performing cryptographic functions like generating data station that serves a data source, data sink, or
digital signatures or encrypting data. both.
deblocking. The process of making each record of a disk sharing. An option that lets independent
block available for processing. computer systems uses common data on shared disk
devices.
dedicated (disk) device. A device that cannot be
shared among users. disposition. A means of indicating to VSE/POWER
how a job input or output entry is to be handled:
device address. according to its local disposition in the RDR/LST/PUN
1. The identification of an input/output device by its queue or its transmission disposition when residing in
device number. the XMT queue. A job might, for example, be deleted
2. In data communication, the identification of any or kept after processing.
device to which data can be sent or from which
data can be received. distribution tape. A magnetic tape that contains, for
example, a preconfigured operating system like z/VSE.
device driving system (DDS). A software system This tape is shipped to the customer for program
external to VSE/POWER, such as a CICS spooler or installation.
PSF, that writes spooled output to a destination device.
DITTO/ESA for VSE. Data Interfile Transfer, Testing,
Device Support Facilities (DSF). An IBM supplied and Operations utility. An IBM program that provides
system control program for performing operations on file-to-file services for disk, tape, and card devices.
disk volumes so that they can be accessed by IBM and
user programs. Examples of these operations are DSF. Device Support Facilities.
initializing a disk volume and assigning an alternative
track. DSH (R). Data set header record.
device type code. The four- or five-digit code that is dummy device. A device address with no real I/O
used for defining an I/O device to a computer system. device behind it. Input and output for that device
address are spooled on disk.
dialog. In an interactive system, a series of related
inquiries and responses similar to a conversation duplex. Pertaining to communication in which data
between two people. For z/VSE, a set of panels that can be sent and received at the same time.
can be used to complete a specific task; for example,
defining a file. DU-AL (dispatchable unit - access list). The access
list that is associated with a z/VSE main task or
dialog manager. The program component of z/VSE subtask. A program uses the DU-AL associated with its
that provides for ease of communication between user task and the PASN-AL associated with its partition. See
and system. also PASN-AL.
digital signature. In computer security, encrypted dynamic class table. Defines the characteristics of
data, which is appended to or part of a message, that dynamic partitions.
enables a recipient to prove the identity of the sender.
dynamic partition. A partition that is created and
Digital Signature Algorithm (DSA). The Digital activated on an 'as needed' basis that does not use fixed
Signature Algorithm is the US government-defined static allocations. After processing, the occupied space
standard for digital signatures. The DSA digital is released. Dynamic partitions are grouped by class,
signature is a pair of large numbers, computed using a and jobs are scheduled by class. Contrast with static
set of rules (that is, the DSA) and a set of parameters partition.
such that the identity of the signatory and integrity of
Glossary 399
dynamic partition balancing. A z/VSE facility that exit routine.
allows the user to specify that two or more or all 1. Either of two types of routines: installation exit
partitions of the system should receive about the same routines or user exit routines. Synonymous with exit
amount of time on the processor. program.
2. See user exit routine.
dynamic space reclamation. A librarian function that
provides for space that is freed by the deletion of a extended addressability. See 31 bit addressing. The
library member to become reusable automatically. ability of a program to use virtual storage that is
outside the address space in which the program is
running. Generally, instructions and data reside in a
E single address space - the primary address space.
However, a program can have data in address spaces
ECI. See CICS ECI. other than the primary or in data spaces. (The
instructions remain in the primary address space, while
emulation. The use of programming techniques and
the data can reside in another address space, or in a
special machine features that permit a computer system
data space.) To access data in other address spaces, a
to execute programs that are written for another system
program must use access registers (ARs) and execute in
or for the use of I/O devices different from those that
access register mode (AR mode).
are available.
extended recovery facility (XRF). In z/VSE, a feature
emulation program (EP). An IBM control program
of CICS that provides for enhanced availability of CICS
that allows a channel-attached 3705 or 3725
by offering one CICS system as a backup of another.
communication controller to emulate the functions of
an IBM 2701 Data Adapter Unit, or an IBM 2703 External Security Manager (ESM). A priced vendor
Transmission Control. product that can provide extended functionality and
flexibility that is compared to that of the Basic Security
end user.
Manager (BSM), which is part of z/VSE.
1. A person who makes use of an application
program.
2. In SNA, the ultimate source or destination of user F
data flowing through an SNA network. Might be an
application program or a terminal operator. FASTCOPY. See VSE/Fast Copy.
Enterprise Java Bean. An EJB is a distributed bean. fast copy data set program (VSE/Fast Copy). See
"Distributed" means, that one part of an EJB runs inside VSE/Fast Copy.
the JVM of a web application server, while the other
part runs inside the JVM of a web browser. An EJB fast service upgrade (FSU). A service function of
either represents one data row in a database (entity z/VSE for the installation of a refresh release without
bean), or a connection to a remote database (session regenerating control information such as library control
bean). Normally, both types of an EJB work together. tables.
This allows to represent and access data in a
standardized way in heterogeneous environments with FAT-DASD. A subtype of Large DASD, it supports a
relational and non-relational data. See also JavaBean. device with more than 4369 cylinders (64 K tracks) up
to 64 K cylinders.
entry-sequenced file. A VSE/VSAM file whose
records are loaded without respect to their contents and FCOPY. See VSE/Fast Copy.
whose relative byte addresses cannot change. Records
are retrieved and stored by addressed access, and new fence. A separation of one or more components or
records are added to the end of the file. elements from the remainder of a processor complex.
The separation is by logical boundaries. It allows
Environmental Record Editing and Printing (EREP) simultaneous user operations and maintenance
program. A z/VSE base program that makes the data procedures.
that is contained in the system record file available for
further analysis. fetch.
1. To locate and load a quantity of data from storage.
EPI. See CICS EPI. 2. To bring a program phase into virtual storage from
a sublibrary and pass control to this phase.
ESCON Channel (Enterprise Systems Connection 3. The name of the macro instruction (FETCH) used to
Channel). A serial channel, using fiber optic cabling, accomplish 2. See also loader.
that provides a high-speed connection between host
and control units for I/O devices. It complies with the Fibre Channel Protocol (FCP). A combination of
ESA/390 and System z I/O Interface until z114. The hardware and software conforming to the Fibre
zEC12 processors do not support ESCON channels. Channel standards and allowing system and peripheral
index.
H 1. A table that is used to locate records in an indexed
sequential data set or on indexed file.
hard wait. The condition of a processor when all 2. In, an ordered collection of pairs, each consisting of
operations are suspended. System recovery from a hard a key and a pointer, used by to sequence and locate
wait is impossible without performing a new system the records of a key-sequenced data set or file; it is
startup. organized in levels of index records. See also
alternate index.
hash function. A hash function is a transformation
that takes a variable-size input and returns a fixed-size input/output control system (IOCS). A group of IBM
string, which is called the hash value. In cryptography, supplied routines that handle the transfer of data
the hash functions should have some additional between main storage and auxiliary storage devices.
properties:
v The hash function should be easy to compute. integrated communication adapter (ICA). The part of
v The hash function is one way; that is, it is impossible a processor where multiple lines can be connected.
to calculate the 'inverse' function.
v The hash function is collision-free; that is, it is integrated console. In z/VSE, the service processor
impossible that different input leads to the same console available on IBM System z server that operates
hash value. as the z/VSE system console. The integrated console is
typically used during IPL and for recovery purposes
hash value. The fixed-sized string resulting after when no other console is available.
applying a hash function to a text.
Interactive Computing and Control Facility (ICCF).
High-Level Assembler for VSE. A programming An IBM licensed program that serves as interface, on a
language providing enhanced assembler programming time-slice basis, to authorized users of terminals that
support. It is a base program of z/VSE. are linked to the system's processor.
home interface. Provides the methods to instantiate a interactive partition. An area of virtual storage for the
new EJB object, introspect an EJB, and remove an EJB purpose of processing a job that was submitted
instantiation., as for the remote interface is needed interactively via VSE/ICCF.
because the deployment tool generates the
Glossary 401
Interactive User Communication Vehicle (IUCV). charging the users of the system, for planning new
Programming support available in a VSE supervisor for applications, and for supervising system operation
operation under z/VM. The support allows users to more efficiently.
communicate with other users or with CP in the same
way they would with a non-preferred guest. job accounting table. An area in the supervisor where
accounting information is accumulated for the user.
intermediate storage. Any storage device that is used
to hold data temporarily before it is processed. job catalog. A catalog made available for a job by
means of the file name IJSYSUC in the respective DLBL
IOCS. Input/output control system. statement.
IPL. Initial program load. job entry control language (JECL). A control language
that allows the programmer to specify how
irrecoverable error. An error for which recovery is VSE/POWER should handle a job.
impossible without the use of recovery techniques
external to the computer program or run. job step. In 1 of a group of related programs complete
with the JCL statements necessary for a particular run.
IUCV. Interactive User Communication Vehicle. Every job step is identified in the job stream by an
EXEC statement under one JOB statement for the whole
job.
J
job trailer record (JTR). As VSE/POWER parameter
JAR. Is a platform-independent file format that JTR, alias NJT. An NJE control record terminating a job
aggregates many files into one. Multiple applets and entry in the input or output queue and providing
their requisite components (.class files, images, and accounting information.
sounds) can be bundled in a JAR file, and then
downloaded to a web browser using a single HTTP
transaction (much improving the download speed). The K
JAR format also supports compression, which reduces
the files size (and further improves the download key. In VSE/VSAM, one or several characters that are
speed). The compression algorithm that is used is fully taken from a certain field (key field) in data records for
compatible with the ZIP algorithm. The owner of an identification and sequence of index entries or of the
applet can also digitally sign individual entries in a records themselves.
JAR file to authenticate their origin.
key sequence. The collating sequence either of records
Java application. A Java program that runs inside the themselves or of their keys in the index or both. The
JVM of your web browser. The program's code resides key sequence is alphanumeric.
on a local hard disk or on the LAN. Java applications
might be large programs using graphical interfaces. key-sequenced file. A VSE/VSAM file whose records
Java applications have unlimited access to all your local are loaded in key sequence and controlled by an index.
resources. Records are retrieved and stored by keyed access or by
addressed access, and new records are inserted in the
Java bytecode. Bytecode is created when a file file in key sequence.
containing Java source language statements is
compiled. The compiled Java code or "bytecode" is KSDS. Key-sequenced data sets. See key-sequenced file.
similar to any program module or file that is ready to
be executed (run on a computer so that instructions are
performed one at a time). However, the instructions in
L
the bytecode are really instructions to the Java Virtual
label.
Machine. Instead of being interpreted one instruction at
1. An identification record for a tape, disk, or diskette
a time, bytecode is instead recompiled for each
volume or for a file on such a volume.
operating-system platform using a just-in-time (JIT)
2. In assembly language programming, a named
compiler. Usually, this enables the Java program to run
instruction that is generally used for branching.
faster. Bytecode is contained in binary files that have
the suffix.CLASS label information area. An area on a disk to store
label information that is read from job control
Java servlet. See servlet.
statements or commands. Synonymous with label area.
JHR. Job header record.
Language Environment for z/VSE. An IBM software
job accounting interface. A function that accumulates product that is the implementation of Language
accounting information for each job step, to be used for Environment on the VSE platform.
linkage stack. An area of protected storage that the LPAR mode. Logically partitioned mode. The CP
system gives to a program to save status information in mode that is available on the Configuration (CONFIG)
a branch or a program call. frame when the PR/SM feature is installed. LPAR
mode allows the operator to allocate the hardware
link station. In SNA, the combination of hardware resources of the processor unit among several logical
and software that allows a node to attach to and partitions.
provide control for a link.
Glossary 403
process a set of statements that are defined It is the origin or the destination of information that is
previously in the macro definition. transmitted by the path control network. Each NAU
2. A sequence of VSE/ICCF commands that are has a network address that represents it to the path
defined to cause a sequence of certain actions to be control network. See also network name, network address.
performed in response to one request.
Network Control Program (NCP). An IBM licensed
maintain system history program (MSHP). A program that provides communication controller
program that is used for automating and controlling support for single-domain, multiple-domain, and
various installation, tailoring, and service activities for interconnected network capability. Its full name is
a VSE system. ACF/NCP.
main task. The main program within a partition in a network definition table (NDT). In VSE/POWER
multiprogramming environment. networking, the table where every node in the network
is listed.
master console. In z/VSE, one or more consoles that
receive all system messages, except for those that are network name.
directed to one particular console. Contrast this with 1. In SNA, the symbolic identifier by which users refer
the user console, which receives only those messages to a NAU, link, or link station. See also network
that are specifically directed to it, for example messages address.
that are issued from a job that was submitted with the 2. In a multiple-domain network, the name of the
request to echo its messages to that console. The APPL statement defining a VTAM application
operator of a master console can reply to all program. This is its network name, which must be
outstanding messages and enter all system commands. unique across domains.
Glossary 405
queue file. A direct-access file that is maintained by program must reside in the 24-bit addressable area
VSE/POWER that holds control information for the (below 16 megabytes), RMODE ANY indicates that the
spooling of job input and job output. program can reside anywhere in 31-bit addressable
storage (above or below 16 megabytes).
real address area. In z/VSE, processor storage to be RPG II. A commercially oriented programming
accessed with dynamic address translation (DAT) off language that is specifically designed for writing
application programs that are intended for business
real address space. The address space whose data processing.
addresses map one-to-one to the addresses in processor
storage.
S
real mode. In VSE, a processing mode in which a
program might not be paged. Contrast with virtual SAM ESDS file. A SAM file that is managed in
mode. VSE/VSAM space, so it can be accessed by both SAM
and VSE/VSAM macros.
recovery management support (RMS). System
routines that gather information about hardware SCP. System control programming.
failures and that initiate a retry of an operation that
failed because of processor, I/O device, or channel SDL. System directory list.
errors.
search chain. The order in which chained sublibraries
refresh release. An upgraded VSE system with the are searched for the retrieval of a certain library
latest level of maintenance for a release. member of a specified type.
relative-record file. A VSE/VSAM file whose records second-level directory. A table in the SVA containing
are loaded into fixed-length slots and accessed by the the highest phase names that are found on the
relative-record numbers of these slots. directory tracks of the system sublibrary.
release upgrade. Use of the FSU functions to install a Secure Sockets Layer (SSL). A security protocol that
new release of z/VSE. allows the client to authenticate the server and all data
and requests to be encrypted. SSL was developed by
relocatable module. A library member of the type Netscape Communications Corp. and RSA Data
object. It consists of one or more control sections Security, Inc..
cataloged as one member.
segmentation. In VSE/POWER, a facility that breaks
relocating loader. A function that modifies addresses list or punch output of a program into segments so that
of a phase, if necessary, and loads the phase for printing or punching can start before this program has
running into the partition that is selected by the user. finished generating such output.
remote interface. In the context of z/VSE, the remote selection panel. A displayed list of items from which
interface allows a client to make method calls to an EJB a user can make a selection. Synonymous with menu.
although the EJB is on a remote z/VSE host. The
container uses the remote interface to create client-side sense. Determine, on request or automatically, the
stubs and server-side proxy objects to handle incoming status or the characteristics of a certain I/O or
method calls from a client to an EJB. communication device.
remote procedure call (RPC). sequential access method (SAM). A data access
1. A facility that a client uses to request the execution method that writes to and reads from an I/O device
of a procedure call from a server. This facility record after record (or block after block). On request,
includes a library of procedures and an external the support performs device control operations such as
data representation. line spacing or page ejects on a printer or skip some
2. A client request to service provider in another node. tape marks on a tape drive.
residency mode (RMODE). A program attribute that service node. Within the VSE unattended node
refers to the location where a program is expected to support, a processor that is used to install and test a
reside in virtual storage. RMODE 24 indicates that the master VSE system, which is copied for distribution to
service program. A computer program that performs socks server. A circuit-level gateway that provides a
function in support of the system. See with utility secure one-way connection through a firewall to server
program. applications in a nonsecure network.
service refresh. A form of service containing the source member. A library member containing source
current version of all software. Also referred to as a statements in any of the programming languages that
system refresh. are supported by VSE.
service unit. One or more PTFs on disk or tape split. To double a specific unit of storage space (CI or
(cartridge). CA) dynamically when the specified minimum of free
space gets used up by new records.
shared area. In z/VSE, shared areas (24 bit) contain
the Supervisor areas and SVA (24 bit) and shared areas spooling. The use of disk storage as buffer storage to
(31 bit) the SVA (31 bit). Shared areas (24 bit) are at the reduce processing delays when transferring data
beginning of the address space (below 16 MB), shared between peripheral equipment and the processor of a
area (31 bit) at the end (below 2 GB). computer. In z/VSE, this is done under the control of
VSE/POWER.
shared disk option. An option that lets independent
computer systems use common data on shared disk Spool Access Protection. An optional feature of
devices. VSE/POWER that restricts individual spool file entry
access to user IDs that have been authenticated by
shared memory objects. An option that lets having performed a security logon.
independent computer systems uses common data on
shared disk devices. spool file.
1. A file that contains output data that is saved for
shared partition. In z/VSE, a partition that is later processing.
allocated for a program (VSE/POWER, for example) 2. One of three VSE/POWER files on disk: queue file,
that provides services and communicates with data file, and account file.
programs in other partitions of the system's virtual
address spaces. stacked tape. An IBM supplied product-shipment tape
containing the code of several licensed programs.
shared spooling. A function that permits the
VSE/POWER account file, data file, and queue file to standard label. A fixed-format record that identifies a
be shared among several computer systems with volume of data such as a tape reel or a file that is part
VSE/POWER. of a volume of data.
shared virtual area (SVA). In z/VSE, a high address stand-alone program. A program that runs
area that contains a list system directory list (SDL) of independently of (not controlled by) the VSE system.
frequently used phases, resident programs that are
shared between partitions, and an area for system startup. The process of performing IPL of the
support. operating system and of getting all subsystems and
applications programs ready for operation.
SIT (System Initialization Table). A table in CICS that
contains data used the system initialization process. In start option. In VTAM, a user-specified or IBM
particular, the SIT can identify (by suffix characters) the specified option that determines conditions for the time
version of CICS system control programs and CICS a VTAM system is operating. Start options can be
tables that you have specified and that are to be predefined or specified when VTAM is started.
loaded.
static partition. A partition, which is defined at IPL
skeleton. A set of control statements, instructions, or time and occupying a defined amount of virtual
both, that requires user-specific information to be storage that remains constant. See also dynamic partition.
inserted before it can be submitted for processing.
storage director. An independent component of a
socksified. See socks-enabled. storage control unit; it performs all of the functions of a
storage control unit and thus provides one access path
Socks-enabled. Pertaining to TCP/IP software, or to a to the disk devices that are attached to it. A storage
specific TCP/IP application, that understands the socks control unit has two storage directors.
protocol. "Socksified" is a slang term for socks-enabled.
Glossary 407
storage fragmentation. Inability to allocate unused system sublibrary. The sublibrary that contains the
sections (fragments) of storage in the real or virtual operating system. It is stored on the system residence
address range of virtual storage. volume (SYSRES).
sublibrary directory. An index for the system to locate time event scheduling support. In VSE/POWER, the
a member in the accessed sublibrary. time event scheduling support offers the possibility to
schedule jobs for processing in a partition at a
submit. A VSE/POWER function that passes a job to predefined time once repetitively. The time event
the system for processing. scheduling operands of the * $$ JOB statement are used
to specify the wanted scheduling time.
SVA. See shared virtual area.
track group. In VSE/POWER, the basic organizational
Synchronous DataLink Control (SDLC). A discipline
unit of a file for CKD devices.
for managing synchronous, code-transparent,
serial-by-bit information transfer over a link connection. track hold. A function that protects a track that is
Transmission exchanges might be duplex or half-duplex being updated by one program from being accessed by
over switched or non-switched links. The configuration another program.
of the link connection might be point-to-point,
multipoint, or loop. transaction.
1. In a batch or remote batch entry, a job or job step. 2.
SYSRES. See system residence volume. In CICS TS, one or more application programs that
can be used by a display station operator. A given
system control programming (SCP). IBM supplied,
transaction can be used concurrently from one or
non-licensed program fundamental to the operation of
more display stations. The execution of a
a system or to its service or both.
transaction for a certain operator is also referred to
system directory list (SDL). A list containing directory as a task.
entries of frequently used phases and of all phases 2. A given task can relate only to one operator.
resident in the SVA. The list resides in the SVA.
transient area. An area within the control program
system file. In z/VSE, a file that is used by the that is used to provide high-priority system services on
operating system, for example, the hardcopy file, the demand.
recorder file, the page data set.
Turbo Dispatcher. A facility of z/VSE that allows to
System Initialization Table (SIT). A table in CICS that use multiprocessor systems (also called CEC: Central
contains data that is used by the system initialization Electronic Complexes). Each CPU within such a CEC
process. In particular, the SIT can identify (by suffix has accesses to be shared virtual areas of z/VSE:
characters) the version of CICS system control supervisor, shared areas (24 bit), and shared areas (31
programs and CICS tables that you have specified and bit). The CPUs have equal rights, which means that any
that are to be loaded. CPU might receive interrupts and work units are not
dedicated to any specific CPU.
system recorder file. The file that is used to record
hardware reliability data. Synonymous with recorder file.
U
system refresh. See service refresh.
UCB. Universal character set buffer.
system refresh release. See refresh release.
universal character set buffer (UCB). A buffer to hold
system residence file (SYSRES). The z/VSE system UCS information.
sublibrary IJSYSRS.SYSLIB that contains the operating
system. It is stored on the system residence volume user console. In z/VSE, a console that receives only
DORSES. those system messages that are specifically directed to
it. These are, for example, messages that are issued
system residence volume (SYSRES). The disk volume from a job that was submitted with the request to echo
on which the system sublibrary is stored and from its messages to that console. Contrast with master
which the hardware retrieves the initial program load console.
routine for system startup.
VIO. See virtual I/O area. VSE (Virtual Storage Extended). A system that
consists of a basic operating system and any IBM
virtual address. An address that refers to a location in supplied and user-written programs that are required
virtual storage. It is translated by the system to a to meet the data processing needs of a user. VSE and
processor storage address when the information stored hardware it controls form a complete computing
at the virtual address is to be used. system. Its current version is called z/VSE.
virtual addressability extension (VAE). A storage VSE/Advanced Functions. As part of VSE Central
management support that fives the user of VSE Functions, a base program of z/VSE. A program that
multiple address spaces of virtual storage. provides basic system control and includes the
supervisor and system programs such as the Librarian
virtual address space. A subdivision of the virtual and the Linkage Editor.
address area available to the user for the allocation of
private, nonshared partitions. VSE Connector Server. Is the host part of the VSE
JavaBeans, and is started using the job STARTVCS,
virtual disk. A range of up to 2 gigabytes of which is placed in the reader queue during installation
contiguous virtual storage addresses that a program of z/VSE. Runs by default in dynamic class R.
can use as workspace. Although the virtual disk exists
in storage, it appears as a real FBA disk device to the VSE/DITTO (VSE/Data Interfile Transfer, Testing, and
user program. All I/O operations that are directed to a Operations Utility). An IBM licensed program that
virtual disk are intercepted and the data to be written provides file-to-file services for disk, tape, and card
to, or read from, the disk is moved to or from a data devices.
space.
VSE/ESA (Virtual Storage Extended/Enterprise
Like a data space, a virtual disk can hold only user
Systems Architecture). The predecessor system of
data; it does not contain shared areas, system data, or
z/VSE.
programs. Unlike an address space or a data space,
data is not directly addressable on a virtual disk. To VSE/Fast Copy. A utility program for fast copy data
manipulate data on a virtual disk, the program must operations from disk to disk and dump/restore
perform I/O operations. operations via an intermediate dump file on magnetic
tape or disk.
virtual I/O area (VIO). An extension of the page data
set; used by the system as intermediate storage, VSE/FCOPY (VSE/Fast Copy Data Set program). An
primarily for control data. IBM licensed program for fast copy data operations
from disk to disk and dump/restore operations via an
virtual mode. The operating mode of a program can
intermediate dump file on magnetic tape or disk. There
be paged.
is also a stand-alone version: the FASTCOPY utility.
virtual partition. In VSE, a division of the dynamic
VSE/ICCF (VSE/Interactive Computing and Control
area of virtual storage.
Facility). An IBM licensed program that serves as
virtual storage. Addressable space image for the user interface, on a time-slice basis, to authorized users of
from which instructions and data are mapped into terminals that are linked to the system's processor.
processor storage locations.
VSE/ICCF library. A file that is composed of smaller
virtual tape. In z/VSE, a virtual tape is a file (or data files (libraries) including system and user data, which
set) containing a tape image. You can read from or can be accessed under the control of VSE/ICCF.
Glossary 409
VSE JavaBeans. Are JavaBeans that allow access to all 64-bit addressing. Provides addressability for address
VSE-based file systems (VSE/VSAM, Librarian, and spaces up to 2 gigabytes and above. See also 24-bit
VSE/ICCF), submit jobs, and access the z/VSE operator addressing.
console. The class library is contained in the
VSEConnector.jar archive. See also JavaBeans.
W
wait for run subqueue. In VSE/POWER, a subqueue
of the reader queue with dispatchable jobs ordered in
execution start time sequence.
Numerics
24-bit addressing. Provides addressability for address
spaces up to 16 megabytes.
Index 413
commands (IDCAMS) (continued) commands (IDCAMS) (continued) control area, splitting of (continued)
BACKUP, use of 138 transporting files between monitoring, means for 115
BUFFERSPACE and BUFSP VSE/VSAM and MVS/VSAM 52 overheads 115
relationship 29 transporting files between placement of records 116
BUFND relationship 29 VSE/VSAM systems 52 rules 116
BUFNI relationship 29 types of commands 9 sequential processing 116
catalog, defining files in 43 with SAM ESDS 156 control block display macro (SHOWCB)
considerations for IDCAMS commands (other than IDCAMS) operand notation 329
operations 127 ASI, specifications for 23 parameter list 338
data integrity 135 IPL, specifications for 23 control block generate macro (GENCB)
DEFINE and file-ID relationship 29 lock file, defining 23 operand notation 326
DEFINE CLUSTER 48 master catalog, assigning device parameter list 334
DEFINE CLUSTER (use in data to 23 control block manipulation macros 195
integrity) 135 supervisor buffers, specifying number control block modify macro (MODCB)
DEFINE SPACE 48 of 24 operand notation 328
DEFINE SPACE (use in data communicate with VSE/VSAM, how parameter list 336
integrity) 135 to 9 control block test macro (TESTCB)
DEFINE USERCATALOG (use in data compatibility operand notation 329
integrity) 136 ACF/VTAM with VSE/VSAM 361 parameter list 339
defining SAM ESDS file DFSMSdfp VSAM ICF catalogs with control information definition field
explicitly 162 VSE/VSAM 361 (CIDF) 115
deleting empty data space 127 VSE/VSAM files to DFSMSdfp control interval (CI)
deleting non-empty data space 127 VSAM 359 and index record size 88
deleting protected file entry from VSE/VSAM Version 2 and 6 15 block size computation for data
catalog 127 with other IBM products 359 component 90
DTFIS (ISAM) related to compressed data, introduction 67 buffer space (SAM ESDS) 171
DEFINE 355 compressed files, working with 67 for data component, performance
DTFIS (ISAM), support for 355 Compression Control Data Set 67 considerations 94
expiration date relationship to // Compression Control Data Set, Defining free space, specifying 114, 115
DLBL 29 the 70 handling CIs 125
explicit catalog specification 45 compression control services trace 380 password parameter 125
EXPORT command, use of 138 compression facility, ESA/390 67 physical block size computation for
EXPORTRA command, use of 138 compression management services control data component 90
file access, considerations for 127 block trace 380 relationship to block size 90
file name, specifying 29 compression prediction 72 size calculations 95
functional commands 10 compression states 69 size defaults 90
IMPORT command, use of 138 concurrent I/O requests 209 size in a data component 92
IMPORTRA command, use of 138 connecting a file for processing 242 size in an index component 94
job control statements required for control area (CA) size of 5
files 27 allocation limits for CKD devices 88 size relation to block size (for data
listing catalog entries 127 and index record size 88 component) 92
migrating catalogs from device to content of 5 size relation to track space (for data
device 55 crossing boundaries 88 component) 92
migrating files from one device type disk storage size (CKD devices) 89 size relationship to other
to another 56 disk storage size (FBA devices) 89 specifications 90
migrating files from one volume to fixed-size blocks (FBA devices) 88 size, displaying actual settings 94
another 56 free space, specifying 114, 115 size, effect on buffer size 96
modal commands 11 maximum size 88 size, performance considerations 94
MODEL subparameter 58 maximum size, relationship to specifying size 90
name of catalog, specifying 26 cylinder size 88 statistical information 123
operations and passwords 127 minimum size 88 statistical information not
overview 9 minimum size, relationship to track updated 123
password authorizations 127 size 88 unused free space 116
password incorrect, prompt on 127 preformatting before inserting what it is 5
PRINT and CAT relationship 29 records 113 control interval, splitting of
REPRO and CAT relationship 29 size of 5 direct processing 116
REPRO command, use of 138, 139 size, influencing 88 examples of record insertion 117
RESTORE 3 size, performance implications 88 placement of records 116
RESTORE, use of 138 specifying space 88 rules 116
SAM ESDS files, support for 156 statistical information 123 sequential processing 116
SAM ESDS files, using with 175 statistical information not CONTROLPW (control interval password
time stamp entry, when updated 51 updated 123 parameter) 125
transporting catalogs between unused free space 116 converting ISAM files to VSE/VSAM
VSE/VSAM systems 52 what it is 5 files 1
transporting files between control area, splitting of converting SAM files to VSE/VSAM
VSE/VSAM and DFSMSdfp direct processing 116 files 1
VSAM 52 examples of record insertion 117 cross-system sharing 133
Index 415
delete VSE/VSAM resource pool disk storage devices, capacities of 89 DTFSD information (implicit define SAM
(DLVRP) macro 225 diskette extent information 41 ESDS work file) 167
deleting DISP specification 29 DTFSD MOUNTED=SINGLE information
access authority 125 disposition of a file 209 (implicit define SAM ESDS work
cluster 385 disposition of files 32 file) 167
data space 49 disposition, close 209 DTFSD support for SAM ESDS 155
data space, effect on VTOC 366 distributed free space 114 duplicate data condition, recover
data space, how to 49, 385 DLBL statement (job control) from 146
empty data space 127 alternative specification for catalog dynamic files 112
empty user catalog 126 name 26 dynamic space allocation
files (SAM ESDS) 175 and catalog search order 46 advantages 112, 156
information from catalog 142 and defining files 48 basics 5
information from VTOC 142 avoiding loss of data 38 device independence 1
labels from VTOC 366 BLK specification 29 dynamic file, advantages 112
non-empty data space 127 buffer number, specifying 29 dynamic file, specifying 112
objects (command overview) 10 buffer space for index records 122 dynamic file, what it is 112
protected file entry from catalog 127 buffer space size 98 example (SAM ESDS) 182
records 116 buffer space, specifying 29 EXCP support (SAM ESDS) 169
space using DELETE SPACE CAT=filename specification 29 for files 112
FORCE 142 CYL specification 29 how it works 5, 112, 156
unprotected files 127 DISP (disposition) specification 29 job control (SAM ESDS) 156
VTOC label 385 disposition control (SAM ESDS) 159 making a file a dynamic file 112, 182
deletion, addressed sequential 318 explicit catalog specification 45 NOALLOCATION, use of 112
deletion, keyed direct 317 file disposition, specifying 29 performance 112, 169
device file name for catalog owning a primary allocation 158
assignment when mounting file 29 restrictions 112
volume 24 file name, specifying 29 REUSE with NOALLOCATION,
automatic assignment to volume 24 file-ID specification 29 purpose of 182
block size related to CI size 92 files with UNIQUE attribute, how to SAM ESDS files, specifying for 169
disk storage size (FBA devices) 89 define 48 secondary allocation 158
fixed-size blocks (FBA devices) 88 for file processing 370 specifying for work files 165
limits of CA allocation 88 for job catalog 44 unallocated dynamic file 33
SCSI 80 for master catalog 25 with SAM ESDS files 156
storage capacities for CKD 89 for unique files 367 work files (SAM ESDS), specifying
support for 80 for user catalog 44 for 158
track space related to block size 92 format of 29
track space related to CI size 92 information for implicit define (SAM
track/cylinder size for CKD 88
device dependencies 16, 77
ESDS) 168
job catalog, how to define 44
E
empty
Device Support Facilities (DSF) master catalog, how to define 43
CAs/CIs and FREESPACE
initialize disk pack (format-4 label options of the ACB macro 209
parameter 115
creation) 363 record allocation number (SAM
data space (non-empty), deleting 127
specify VTOC size 367 ESDS), specifying 29
data space, deleting 127
when used 363 record allocation size (SAM ESDS),
deallocate a file, meaning of 32
DFSMSdfp VSAM specifying 29
dynamic file and
compatibility of ICF catalogs with RECORDS specification 29
EXPORT/EXPORTRA support 112
VSE/VSAM 361 RECSIZE specification (SAM
file, open failure 36
transporting files to VSE/VSAM 52 ESDS) 29
object, backup 3, 138
diagnosis tools required when using IDCAMS
object, restore 3
catalog check program commands 26
object, what it is 3, 56
(IKQVCHK) 375 user catalog, how to define 44
objects, backup 55
maintain VTOC/VOL1 labels virtual storage for buffer space 29
objects, restore 55
(IKQVDU) 385 DLF (IPL command) 23
reset a file, meaning of 32
overview 375 DLVRP (delete VSE/VSAM resource
user catalog, deleting 126
SNAP trace program pool) macro 225
empty file (SAM ESDS), treatment
(IKQVEDA) 380 DLVRP macro format 225
of 171
diagnostics (processing option dname (file name) specification 29
end-of-file processing 197, 229
PARM) 39 downlevel type data, recovery of 141
ending a processing request (ENDREQ
dialogs (z/VSE) DSN (in ACB macro) 204
macro) 226
overview 12 DSN structure 215
ENDREQ macro format 226
dictionary 67 DSN structure, GETVIS space
Enterprise Storage Server (ESS) 10, 89
dictionary building block 68 requirement 16
environments for VSE/VSAM 15
direct processing 253 DSN=dsname (scratch VTOC label for a
EODAD (end of data address) exit 197,
direct retrieval 253 specified file) 385
229
directory mismatch 150 DTFPH support for SAM ESDS 155, 169
ERASE macro
disability xiv DTFSD information (implicit define SAM
description 227
disk extent information 41 ESDS file) 167
format 227
Index 417
ESDS file (VSE/VSAM) (continued) exit list (EXLST) macro 197 file disposition (continued)
format differences to SAM ESDS exit list macro (EXLST) on closing files 36
file 183 positioning if I/O error occurs 234 on opening files 33
examples exit, security-verification 130 specification for OPEN/CLOSE
allocation for multiple volumes (an EXLST macro 227 processing 29
exercise) 110 EXLST macro format 228 states at OPEN 33
alternate index 8 expiration date 29 status at CLOSE 36
CA splits 117 explicit where to specify 32
catalog check program allocation model 58 file processing, close 223
(IKQVCHK) 376 allocation model (example) 59 file protection
CI splits 117 catalog specification 45 back up considerations 138
data space class 86 define cluster (SAM ESDS) 162 BACKUP command, use of 138
data spaces, define 371 defining file (SAM ESDS) 162 data secure file bit, setting of 48
defining catalogs through job modeling (SAM ESDS) 156 EXPORT command, use of 138
control 44 modeling, specifying the model 58 EXPORTRA command, use of 138
explicit catalog specification 45 models 58 IMPORT command, use of 138
explicit models (allocation) 59 models (allocation) 59, 61 IMPORTRA command, use of 138
explicit models (noallocation) 61 NOALLOCATION model 58 REPRO command, use of 138
file, define 373 NOALLOCATION model RESTORE command, use of 138
file, process 373 (example) 61 user-written back up programs 138
implicit models (allocation) 61 opening of file 27 file space
invoke IDCAMS, how to 39 specifications when migrating objects dynamic allocation 112
job catalog, use of 44 to other device 57 NOALLOCATION parameter 112
job streams 371 EXPORT (IDCAMS command) file types supported 4
macro operands, notation of 325 dynamic file support 112 file, connecting for processing 242
maintain VTOC/VOL1 labels 385 use of 138 files
PARM parameter 39 using with SAM ESDS files 175 // DLBL statement 25
SAM ESDS file, define default export file (SAM ESDS) 175 adding records, considerations
model 181 EXPORTRA (IDCAMS command) for 114
SAM ESDS file, define dynamic 182 dynamic file support 112 altering definitions in
SAM ESDS file, define implicitly 181 use of 138 password-protected catalog 126
SAM ESDS file, loading 179 extended user buffering option 250 and lock facility 131
SNAP trace program extended-addressed KSDS 246, 250, 252, authorization verification routine 130
(IKQVEDA) 383 253, 260, 289, 319 back up and recovery
space allocation on multiple extent information, when to specify 41 considerations 137, 138
volumes 106 Extent matrix 279 back up methods 138
unique file, define 373 extent overlap, action on 367 block, allocation size (SAM ESDS) 29
volume layout (data spaces, files, EXTENT statement (job control) block, relative 41
VTOC) 364 and defining files 48 blocks, allocating number of 41
exclusive control, preventing deadlock define files with UNIQUE buffer space, specifying 29
in 104 attribute 48 buffers, specifying number of 29
EXCPAD (EXCP address) exit 197, 230, for unique files 367 cataloging 48
393 for unique files, validation 367 CLOSE disposition 36
EXEC statement (job control) format of 41 cross-system sharing 133
catalog check program information for implicit define SAM cylinder, allocation size (SAM
(IKQVCHK) 376 ESDS file 168 ESDS) 29
coding rules 39 logical unit of volume 41 data space records, where located 48
format of 39 number of blocks/tracks for file 41 data space suballocation 366, 369
GETVIS for non-SVA-eligible relative block/track of extent 41 define unique (example) 373
phases 39 serial number of volume 41 defining 48
invoke IDCAMS, how to 39 extents of data space, where recorded 48 defining and DLBL/EXTENT
job termination, how to avoid 39 EXTRACT codes 345 statements 48
non-SVA-eligible phases, GETVIS defining in catalog 43
for 39 defining with UNIQUE attribute 48
PARM parameter, advantages of
using 39
F defining, what it means 7
delete, how to 385
Fast Copy utility (VSE)
PARM parameter, examples of 39 deleting protected file entry from
backup copy, creating a 139
processing options 39 catalog 127
backup copy, restoring a 139
real mode, execute program in 39 directory mismatch 150
use in protecting resources 134
size to load a program 39 disposition, basic information on 32
fast recovery of files, preparing for 153
SIZE=AUTO recommended 39 disposition, specifying 29
FAT DASD 77
SNAP trace program duplicate file for back up,
Fibre Channel Protocol (FCP) 80
(IKQVEDA) 382 creating 138
file closing, temporarily 286
VTOC/VOL1 label maintain program entries in catalog 137
file disposition
(IKQVDU) 385 entries in catalog, purpose of 47
basic information 32
execute form of GENCB, MODCB, extents mismatch 150
considerations (DLBL, ACB, DTF) 38
SHOWCB, TESTCB 323 file-ID, specifying 29
DISP parameter, default of 32
Index 419
generic back up 56 implicit (continued) ISAM Interface Program (IIP)
generic restore 56 information from DLBL statement defining a VSE/VSAM file 355
GET macro 238 (SAM ESDS) 168 DTFIS related to DEFINE 355
GET macro format 239 model, specifying name 61 ERREXT format 357
GETVIS space modeling, choosing the model 58 error handling 357
default adjustment 19 models 58 filenameC format 357
failure correction 388 NOALLOCATION model 58 ISAM compared to VSE/VSAM 351
for buffers 16, 39 NOALLOCATION model job control statements, changing 356
for control blocks 16, 39 (example) 61 loading ISAM file into VSE/VSAM
for IDCAMS 20 opening of file 27 file 356
for IDCAMS, where to specify 20 IMPORT (IDCAMS command) processing explained 357
for non-SVA-eligible phases 39 data space class 86 storage requirements 20
for non-SVA-eligible routines 16 key compression 95 using, prepare for 354
for users of the VSE/VSAM Space using with SAM ESDS files 175 using, prerequisites for 354
Management for SAM Function 38, import file (SAM ESDS) 175 VSE/VSAM functions available 352
171 IMPORTRA (IDCAMS command)
minimum for files 16 using with SAM ESDS files 156
non-GETVIS space for job control
routines 19
in-core wrap trace 380
inaccessible file, recover from 147
J
job
specifying for users of the incomplete write to disk, recover
cancellation (VOL1 label
VSE/VSAM Space Management for from 146
incorrect) 367
SAM Function 19 index
end-of-job disposition (managed-SAM
usage, keeping small 19 component 5
access) 36
component, CI size of 94
end-of-job disposition (VSE/VSAM
key compression 95
access) 36
H keys, reducing size of 95
options 8
running a job 38
hardware compression facility, running a job step 38
with VSE/VSAM 8
ESA/390 67 step, start of 38
index options
hierarchy of catalog search 46 termination, how to avoid 39
AIX portions on different
high RBA mismatch 150 job catalog // DLBL statement 25
volumes 122
job control
buffer space required 122
access VSE/VSAM files 12
file portions on different
I volumes 122
and IDCAMS commands 26
catalogs, defining 42
I/O areas for a VSE/VSAM file 209, 260 key ranges 122
for files 48
I/O buffers, managing 291 with KSDS and ESDS files 8
for job catalog 44
I/O operations, overlapping of 230 index records
for master catalog 43
I/O routines, user 347 in storage, methods of specifying 122
for user catalog 44
ICF (Integrated Catalog Facility 361 size to accommodate CAs and CIs 88
GETVIS space for managed-SAM
ICF catalogs, compatibility with initial program load (IPL)
access 19
VSE/VSAM catalogs 361 automatic device assignment to
invoke IDCAMS 39
IDCAMS BACKUP 188 volume 24
job control and IDCAMS
IDCAMS commands security 128 commands for VSE/VSAM 23
commands 26
IDCAMS IMPORT CONNECT 188 lock file, defining 23
linkage editor, processing of control
IDCAMS SNAP 188, 189 master catalog, assigning device
statements 38
IDCAMS utility program to 23
mounting volumes 24
GETVIS, where to specify 20 supervisor buffers, specifying number
non-GETVIS space for managed-SAM
how to invoke (job control) 39 of 24
access 19
job termination, how to avoid 39 volumes, ways of mounting 24
parameters 12
password authorizations 127 inserting records in a file 114
requirements 25
password prompt 127 insertion, keyed direct 312
SAM in VSE/VSAM data space 156
storage requirements 20 insertion, keyed-sequential 309
simplified job control in using SAM
use in protecting resources 134 insertion, skip-sequential 310
ESDS 156
use of 9 Integrated Catalog Facility (ICF) 361
job control statements
IGNOREERROR parameter and catalog integrity of data, tools for 142
// DLBL (VSE/VSAM) 28
check 375 Interrogation in data compression 68
// DLBL, where to specify 25
IJSYSCT (name of master catalog) 43 introduction to VSE/VSAM 1
// EXEC (VSE/VSAM) 20, 38
IKQPRED invoke IDCAMS (job control), how to 39
// EXTENT (VSE/VSAM) 41
overview 72 invoking IDCAMS from a program 325
access VSE/VSAM files 12
IKQVCHK (diagnosis tool) 375 invoking macro instructions 345
alternative specification for //
IKQVDU (diagnosis tool) 375 ISAM (indexed-sequential access method)
DLBL 26
IKQVEDA (diagnosis tool) 375 compared to VSE/VSAM 351
and IDCAMS commands 26
implicit converting to VSE/VSAM 1
avoiding job termination with
define file (SAM ESDS) 156 files, convert to VSE/VSAM 1
IDCAMS 39
delete file (SAM ESDS) 156 performance improvements,
avoiding loss of data 38
file definition (SAM ESDS), allocation possible 351
defining catalogs (// DLBL) 43
size 29
defining files 48
Index 421
macros (VSE/VSAM) mismatch problem (continued) non-shared resources (NSR) (continued)
coding, ways of 207 high RBA mismatch 150 read/write integrity 204
descriptions 207 key range 150 space calculation 17
display file statistics 123 minimizing catalog mismatches 150 non-unique files, defining 54, 366, 369
operand notations explained 325 recovery procedures 146 nonVSAM file, unloading a catalog
overview 11 space map 150 to 139
parameter lists explained 333 volume entry 150 number of blocks for file, allocate 41
purpose 11 volume information mismatch 150 number of tracks for file, allocate 41
syntax 207 MODCB (modify control block)
test file parameters 123 macro 201, 240
unique control block, generating 361
VTAM control block, generating 361
MODCB macro format 240
modeling
O
object (tasks, commands)
maintain VTOC/VOL1 labels program access authority 125
alter (command overview) 10
(IKQVDU) advantages of 58
backup (command overview) 10
actions on error discovery 388 allocation of space 112
BACKUP command, use of 138
error message explained 388 default models, using 61
backup empty object 3, 138
execution, setting up for 385 default volumes 66
backup multiple objects 56
output of 388 explicitly (allocation) 59
backup operations on 3
purpose and use 385 explicitly (noallocation) 61
backup to tape or disk 56
return codes explained 388 for SAM ESDS 156
build alternate index (command
running 385 implicitly (allocation) 61
overview) 10
UPSI job control statement, setting job termination, avoiding 58
cancel job (command overview) 10
of 385 MODEL subparameter 58
cancel job step (command
managing I/O buffers 291 overriding system defaults 58
overview) 10
manipulation macros processing by VSE/VSAM 62
copying to another volume 56
overview 195 restrictions for 63
data space, suballocating 86
parameter list, internal 333 SAM ESDS file (example) 181
define (command overview) 10
specifying 205 types 58
delete (command overview) 10
mass insertion of records 114 modifying VSE/VSAM control
empty object, what it is 3
master catalog // DLBL statement 43 blocks 240
empty, what it is 56
MASTERPW (master password) 125 mounting need for volumes 51
first one on a volume 47
max CA per volume (CKD devices) 89 move mode 250, 260
generated names 50
max CA per volume (FBA devices) 89 multiple extents (SAM ESDS) 156
generic names, use of 56
max CA, what it is 88 multiple LSR pools 206
interactive interface 12
message area (OPEN/CLOSE/ multiple volumes
levels of protection 125
TCLOSE) 217 DEFINE parameters for 104
list command 10
message format 217 ORDERED specification 106
migrating catalogs 55
messages performance notes 104
migrating files, methods for 56
catalog check program space allocation 104
migrating, methods for 53
(IKQVCHK) 376 space allocation (an exercise) 110
MODEL subparameter 58
maintain VTOC/VOL1 labels space allocation (with key range) 105
modeling of 58
(IKQVDU) 388 space allocation (without key
modeling, advantages of 58
migrating range) 105
modeling, default volume lists 66
catalogs from one device type to space allocation, examples of 106
modeling, restrictions with 63
another 53 support 104
modeling, types of 58
files from one device type to UNORDERED specification 105
move data (commands overview) 10
another 53 with SAM ESDS files 156
password-protected objects, operating
files from one volume to another 56 multivolume files 137
on 126
ISAM files to VSE/VSAM MVS, transfer files from VSE to 7
passwords, protection by 1
control 351 MVS/VSAM
performance, controlling 86
SAM files to VSE/VSAM control 160 data space class 86
print (commands overview) 10
to SCSI device 56 moving VSE/VSAM files to 1
print command 10
transporting files between transporting files to VSE/VSAM 52
restore (command overview) 10
systems 52
RESTORE command, use of 138
min CA per cylinder (CKD devices) 89
restore empty object 3
min CA per max CA (FBA devices) 89
min CA, what it is 88
N restore multiple objects 56
names for data spaces 50 restore operations on 3
mismatch problem
NOALLOCATION parameter 112 restrictions for master catalog 51
catalog entries do not match
non-empty data pace, deleting 127 suballocate data space for 47
description of volumes 150
non-shared resources (NSR) verify (command overview) 10
causes 150
buffer allocation 19 open disposition
data space group 150
buffer space for CIs 96 explained 33
extents mismatch 150
considerations 101 of files 33
file directory mismatch 150
I/O buffer sharing 204 states with 33
file statistics mismatch 150
I/O operations 204 OPEN macro
files mismatch 150
master catalog 133 connecting a file for processing 242
guide to solving problems 150
partition virtual storage 16 description 242
Index 423
planning (continued) PRINT (IDCAMS command) (continued) processing end request macro (ENDREQ)
for VSE/VSAM 15 using with SAM ESDS files 175 cancellation of the position for
for VSE/VSAM Backup/Restore printed output (processing option) 39 processing request 226
Function 21 procedures ending a processing a request 226
for VSE/VSAM Space Management catalog cannot be opened, recover giving up the position for an
for SAM Function 19 from 149 RPL 226
GETVIS for IDCAMS 20 catalog unusable, recover from 140, processing of file, close 223
local shared resource, space 148 processing options (PARM
calculations 18 catalog volume unusable, recover parameter/command) 39
non-shared resource, space from 150 processing options, summary of 196, 252
calculations 17 data management 47 processing shared data 131
partition space for non-SVA-eligible defining data space 48 processor independence (SAM ESDS
routines 16 defining files 48 work files) 158
performance considerations 67, 85 deleting data space 49 program execution, start of 38
quick recovery, considerations duplicate data condition, recover program load, storage for 39
for 153 from 146 prompting code 126
resources protection, considerations file cannot be opened, recover protection of resources
for 125 from 147 avoiding loss of data at CLOSE
space for real mode operation 16 file completely unreadable, recover disposition 38
SVA required for VSE/VSAM 15 from 147 back up considerations (catalogs) 139
VSE/VSAM Backup/Restore Function file inaccessible, recover from 147 back up considerations (files) 137
with user-generated supervisor 21 file not properly closed, recover back up considerations
POINT macro format 244 from 146 (volumes) 137
portability of data 1 file partially unreadable, recover catalog check program, when to
portability of VSE/VSAM files to from 147 run 375
DFSMSdfp VSAM 359 files cannot be opened, recover catalog content relating to
position for processing macro (POINT) from 149 files/volumes 137
positioning VSE/VSAM at a wanted incorrect high RBA, recover from 146 catalogs 139
record 244 ISAM to VSE/VSAM, converting control interval (CI) access 125
positioning VSE/VSAM for from 354 cross-system data, specifying share
processing 244 migrating catalogs 55 options 133
positioning VSE/VSAM for processing migrating catalogs from device to data integrity tools 134
requests device 53 data integrity, commands for 135
activation of requests 209 migrating files from device to data space classification 86
active requests 246 device 56 DEFINE CLUSTER command 135
at a wanted record 244 migrating SAM files 160 DEFINE SPACE command 135
backward processing 244 modeling objects 58 DEFINE USERCATALOG
cancellation of the position 226 quick recovery of files 153 command 136
chain of RPLs, positioning recognizing names in the VTOC 50 explained 125
information 246 recovery of resources 146 Fast Copy utility 134
ending a request 226 relating names in VTOC (generated file access, considerations for 127
for sequential or skip sequential and user-specified) 50 file sharing, degrees of 131
processing 244 running catalog check program file unprotected, deletion of 127
forward processing 244 (IKQVCHK) 376 files 136
if I/O error with data CI occurs 234 running SNAP trace program IDCAMS operations, considerations
keeping for sequential or skip (IKQVEDA) 382 for 127
sequential processing 239 running VTOC/VOL1 labels maintain levels of access to resources 125
loss of positioning 234 program (IKQVDU) 385 levels of access, relationship 125
OPTCD values in RPL for space management 47 lock facility, use of 131
macros 239 space ownership, releasing from master access (MASTERPW
positioning if OPTCD=(KEY,DIR,NSP) catalog 49 parameter) 125
in RPL 245 transporting catalogs between master catalog and user catalog,
positioning information VSE/VSAM systems 52 relationship of 126
maintained 209 transporting files between operating on password-protected
positions for request macros in VSE/VSAM and DFSMSdfp objects 126
process 239 VSAM 52 password check 126
records into RBA if positioning not transporting files between password relationship between catalog
established 246 VSE/VSAM and MVS/VSAM 52 and files 126
sequential positioning 246 transporting files between password verification routine
primary allocation of file (SAM ESDS) VSE/VSAM systems 52 (user-written) 130
blocks 29 volume inaccessible, recover passwords, use of 125
cylinders 29 from 152 quick recovery, preparing for 153
records 29 volume ownership, removing from read access 125
primary index catalog 49 recovery considerations
how generated 8 work files on virtual disk 51 (catalogs) 139
PRINT (IDCAMS command) write to disk incomplete, recover recovery considerations (files) 137
overview 10 from 146
Index 425
SAM access (managed) (continued) serial-number of volume containing snapshots, of entire disk volumes 188
considerations for access to files 171 extent 41 space
considerations for access to work shared resource (LSR) option in allocation (dynamic file),
files 171 ACB 215 suppressing 112
differences to unmanaged-SAM shared resources 203 allocation (dynamic) with SAM
access 170 SHAREOPTIONS parameter ESDS 156, 169
DTF specifications, dependencies control file sharing 131 allocation for multiple volumes 105
on 32 degrees of file sharing 131 allocation for multiple volumes (an
GETVIS space, specifying 171 purpose of 131 exercise) 110
modeling managed-SAM file 61 where to specify 131 allocation options 111
purpose of 169 with SAM ESDS files 170 allocation parameters 111
requirements 19 SHAREOPTIONS(4) 101, 102, 133, 170, defaults 95
steps in obtaining managed-SAM 230 determination 95
access 160 sharing dynamic allocation 5, 112
SAM access (unmanaged) catalogs across systems 133 GETVIS space (SAM ESDS),
considerations 170 cross-system data, specifying share specifying 171
differences to managed-SAM options 133 management 7, 47
access 170 cross-system user catalogs, map, mismatch of 150
disk-independence 171 specifying 133 ownership 47
steps in changing to managed-SAM DASDs, establish environment 131 partition for time-dependent
access 160 data across system 133 programs 39
SAM file data set names, advantages 204 suballocate data space 47
converting to VSE/VSAM 1 data, protection of 131 unused, cause of 116
creating back up 138 file control blocks 204 utilization and CI size 92
creating SAM ESDS files, requirement files 131 SPACE FORCE command 142
for 155 files across systems 133 spanned record, what it is 5
defining for use in VSE/VSAM data files and use of z/VSE LOCK spanned records, handling 231, 250, 252
space 156 facility 131 SPEED parameter 113
migrating to VSE/VSAM control 160 files, protection for 131 standard volume label (VOL1 label) 367
VSE/VSAM functions available 156 I/O buffers 204 statistical information not updated 123
SAM file (managed) integrity when opening a file through statistics mismatch 150
// DLBL date parameter 29 different ACBs 204 statistics on files 123
disposition at CLOSE 32 master catalog with shared user statistics provided by SHOWCB
GETVIS space, adjusting 38 catalogs 133 macro 274
modeling 61 options 131 storage
options at OPEN 32 sharing of data set name 204 above/below the 16MB line 19
partition size, adjusting 38 SHOWCAT (display catalog) macro 201, capacities of CKD devices 89
possible restrictions 172 260 capacities of FBA devices 89
steps in obtaining managed-SAM SHOWCAT macro format 260 for loading programs 39
access 160 SHOWCB GETVIS for non-SVA-eligible
SAM file (unmanaged) Extent matrix 279 routines 16
advantages in changing to SAM ESDS LSR matrix 276 space for buffers (due to CIs) 96
files 156 SHOWCB (display control block) storage requirements
steps in changing to managed-SAM macro 201, 266 buffers 16
access 160 SHOWCB macro 123 considerations 15
SAM files and data compression 71 SHOWCB macro format 267 control blocks 16
SAM files to VSE/VSAM, convert 1 SHR(4) 230 for index records 122
Sampling in data compression 68 SHRPOOL parameter in ACB 209 IDCAMS 20
scratch VTOC label for a specified skip sequential insertion 253 if LSR is specified 18
file 385 skip sequential retrieval 253 if NSR is specified 17
SCSI disk devices skip-sequential retrieval 299 ISAM Interface Program (IIP) 20
FBA disk devices 80 SNAP (IDCAMS command) 10, 142, 192 non-SVA-eligible routines 16
migration using BACKUP 56 SNAP (IDCAMS) 188, 189 real mode operation 16
migration using RESTORE 56 SNAP command 187 SVA for VSE/VSAM 15
restrictions 82 SNAP trace program (IKQVEDA) VSE/VSAM 16
search order of catalogs 46 activating 382 VSE/VSAM Backup/Restore
second close disposition 209 disabling 382 Function 21
secondary allocation of file (SAM ESDS) enabling 382 VSE/VSAM Space Management for
blocks 29 examples 383 SAM Function 19
cylinders 29 execution, setting up for 383 suballocation of data space 112, 366
records 29 output of 384 supervisor buffers, specifying 24
secondary allocation, minimize 135 purpose 380 support of 3390-9 disk device 77
security-verification exit 130 running 382 switching from direct to keyed-sequential
sequential positioning 246 trace numbers 380 retrieval 305
sequential processing 253 types of traces 380 SYNAD exit routine 197, 234
sequential retrieval 253 UPSI job control statement, setting synonym list 188
of 383 syntax checking (processing option) 39
Index 427
VSE/VSAM catalogs
FlashCopy of 191
VSE/VSAM Compression Prediction Tool
(IKQPRED)
examples 72
interpreting results 73
invocation 72
output description 73
process 73
VSE/VSAM data
FlashCopy of 191
VSE/VSAM device dependencies 77
VSE/VSAM extended user buffering
new support 319
overview 319
using 320
VSE/VSAM Space Management for SAM
Function
BLK specification for SAM ESDS
files 29
creating/using SAM ESDS files 155
CYL specification for SAM ESDS
files 29
GETVIS space default 38
IDCAMS commands, using 175
partition requirements 39
partition size 38
RECORDS specification for SAM
ESDS files 29
RECSIZE specification for SAM ESDS
files 29
storage requirements 19
use of 3, 156
VSE/VSAM support of Large DASD 77
VSE/VSAM virtual tape 83
VSE/VSAM Virtual Tape 83
VTAM similarities with VSE/VSAM 361
VTOC utility (IKQVDU) 134, 385
W
work files on virtual disk 51
wrap trace 380
write operations, deferring 291
WRITECHECK
data integrity 135
default when modeling 63
performance with
NOWRITECHECK 113
purpose of 113, 142
with ALTER command 175
writing buffers 292
WRTBFR (write buffer) macro 292
WRTBFR macro format 293
Z
z/VSE Interactive Interface for users 12
z/VSE LOCK facility, use of 131
We appreciate your comments about this publication. Please 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, please 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.
Comments:
If you would like a response from IBM, please fill in the following information:
Name Address
Company or Organization
_ _ _ _ _ _ _Fold
_ _ _and
_ _ _Tape
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Please
_ _ _ _ _do
_ _not
_ _ staple
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Fold
_ _ _and
_ _ Tape
______
NO POSTAGE
NECESSARY
IF MAILED IN THE
UNITED STATES
_________________________________________________________________________________________
Fold and Tape Please do not staple Fold and Tape
Cut or Fold
SC34-2742-00 Along Line
Printed in USA
SC34-2742-00