Using IDCAMS to Manage VSAM Data Sets



Similar documents
Buffering, Record Level Sharing, and Performance Basics for VSAM Data Sets

FDRSOS (Safeguard Open Storage)

IAM: Improving Performance for VSAM Applications

CA Integrated Agent Services

Utility Mainframe System Administration Training Curriculum

CA Application Quality and Testing Tools

VSAM-ADMIN. VSAM data set organisation. fair software associates die faire Alternative für Systemsoftware

Program Product. Open System Backup

7XWRULDO 5(;;6FULSWLQJ/DQJXDJH

An Introduction to z/os DASD Backup and Archiving

CA Log Analyzer for DB2 for z/os

CA Workload Automation EE r11.3 Report Server. Fred Brisard

Beyond the Software Life Cycle

FASTFIND LINKS. Document Organization Product Version Getting Help Contents MK-96RD646-02

Effective Backups: Selecting the Right Backup Mechanism to Match the Business Requirement

Database Recovery Control (DBRC) in Practice by Peter Armstrong

CICS Transactions Measurement with no Pain

IMS Disaster Recovery

Destiny system backups white paper

Interactive System Productivity Facility (ISPF)

CA Chorus for Security and Compliance Management

File System Management

Utilities: SyncSort UFIT. UF Information Technology. EI&O Document ID: D0073 Last Updated: 06/27/2002

Together with SAP MaxDB database tools, you can use third-party backup tools to backup and restore data. You can use third-party backup tools for the

DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

TSO and ISPF/PDF The University of Georgia

Teradata Utilities Class Outline

Secure Database Backups with SecureZIP

CA Endevor Software Change Manager

Software Product Description

DBAs having to manage DB2 on multiple platforms will find this information essential.

Chancery SMS Database Split

How To Backup A Database In Navision

CHAPTER 17: File Management

Principles of Database Management Systems. Overview. Principles of Data Layout. Topic for today. "Executive Summary": here.

Forensic Analysis of Internet Explorer Activity Files

A Computer Glossary. For the New York Farm Viability Institute Computer Training Courses

Moving Files from TSO to a PC

DB2 for z/os: Disaster Recovery for the Rest of Us

12. User-managed and RMAN-based backups.

Computer Associates BrightStor CA-Vtape Virtual Tape System Software

CCF/CCF-II/MDH Transmission Guides

This article Includes:

12 NETWORK MANAGEMENT

CA High Performance Recovery for IMS for z/os

Database Administration with MySQL

System i and System p. Customer service, support, and troubleshooting

Dynamics NAV/SQL Server Configuration Recommendations

Utilities for Partitioned Data Sets

ASG-Rochade Backing up Rochade Databases Quick Start Guide

Once the RTO and RPO objectives are known, the customer is able to determine which disaster recovery methodology works best for their needs.

Backing up and restoring HP Systems Insight Manager 6.0 or greater data files in a Windows environment

Backup and Disaster Recovery Restoration Guide

File Server Migration

CA View r11.7. Business value. Product overview. Delivery approach

DB2 backup and recovery

DB2 for z/os System Level Backup Update

CA ARCserve Backup for Windows

SMF Digital Signatures in z/os 2.2. Anthony Sofia Software Engineer at IBM August 14 th 2015

DSK MANAGER. For IBM iseries and AS/400. Version Last Updated September Kisco Information Systems 7 Church Street Saranac Lake, NY 12983

Moving the Web Security Log Database

Two Parts. Filesystem Interface. Filesystem design. Interface the user sees. Implementing the interface

How To Backup A Database On An Apa Database On A Pc Or Mac Or Mac (For A Mac) On A Mac Or Pc Or Pc (For An Ipa) On An Ipad Or Mac On A Microsoft Database On Pc Or

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

File-System Implementation

DB2 9 DBA exam 731 prep, Part 6: High availability: Backup and recovery

CA ARCserve Backup for Windows

Continuous Data Protection for DB2

The Comeback of Batch Tuning

Accounts Receivable System Administration Manual

Backup and Recovery Procedures

CA Database Management Solutions for IMS for z/os

CPSC 2800 Linux Hands-on Lab #7 on Linux Utilities. Project 7-1

Backup and Recovery. Presented by DB2 Developer Domain

File Manager base component

SHARE Lunch & Learn #15372

MapGuide Open Source Repository Management Back up, restore, and recover your resource repository.

BrightStor ARCserve Backup

VIT University Vellore , Tamil Nadu, India

SAP Note FAQ: SAP HANA Database Backup & Recovery

Program Directory for IBM Tivoli License Compliance Manager for z/os V Program Number 5698-A80 FMID HAUD320.

Physical Data Organization

Understanding Disk Storage in Tivoli Storage Manager

MAX_RMAN_08137_IGNORE=5 DISK_RETENTION_POLICY='RECOVERY WINDOW OF 7 DAYS'

SEIZE THE DATA SEIZE THE DATA. 2015

Best Practices for Using BMC Recovery Manager to Meet Data Retention Regulations

CA Deliver r11.7. Business value. Product overview. Delivery approach. agility made possible

Mail 2 ZOS FTPSweeper

Backing Up and Restoring Software

SecureDoc Disk Encryption Cryptographic Engine

UNDELETE 7.0 USER GUIDE

Open Systems SnapVault (OSSV) Best Practices Guide

EMC DOCUMENTUM xplore 1.1 DISASTER RECOVERY USING EMC NETWORKER

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Ontrack PowerControls V7.3 ExtractWizard ReadMe

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

Transcription:

Using IDCAMS to Manage VSAM Data Sets Session 12998 Presented by Michael E. Friske

IDCAMS Manual The IDCAMS commands can be found in the DFSMS Access Method Services (AMS) for Catalogs manual. This manual is available on the IBM publications web site.

Invoking IDCAMS Environments IDCAMS can be used in Batch TSO Call within a program SYSPRINT and SYSIN DD statements are required In batch, the commands must begin in column 2 to 72

IDCAMS Commands for VSAM DEFINE CLUSTER DEFINE ALTERNATEINDEX DEFINE PATH BLDINDEX ALTER DELETE EXPORT IMPORT REPRO LISTCAT PRINT VERIFY

DEFINE CLUSTER Command This command is used to create a new VSAM data set The parameters can be specified on the Cluster Data Component Index Component Any of the above DEFINE CLUSTER parameters

Defining VSAM Data Sets Using IDCAMS //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER( - NAME(PROD.PAYROLL.MASTER) DATACLAS(EXTAVSAM) INDEXED KEY(9,0) - CYLINDERS(500,50) FREESPACE(10,0) - RECORDSIZE(150,150) SHAREOPTIONS(2,3) - SPEED) DATA(CONTROLINTERVALSIZE(4096)) INDEX(CONTROLINTERVALSIZE(2048))

Required Parameters for the DEFINE CLUSTER Command NAME(entryname) CYLINDERS TRACKS KILOBYTES MEGABYTES RECORDS Example CYLINDERS(primary secondary) VOLUMES Specify an * for each volume required for SMS managed data sets

Specifying the Type of VSAM Data Set INDEXED NONINDEXED NUMBERED LINEAR - KSDS - ESDS - RRDS - LDS

Describing the Records to be Loaded RECORDSIZE(average, maximum) NONSPANNED or SPANNED KEYS(length, offset)

CONTROLINTERVALSIZE For NONSPANNED, the CI size must be at least 7 bytes larger than the max record size CI size can be 512 to 8192 bytes in 512 byte increments or 8KB to 32KB in 2KB increments For Linear data sets, the CI size can be 4096 to 32768 in 4096 increments VSAM will adjust if a valid size is not specified Usually different sizes for DATA and INDEX component FREESPACE(CI% CA%)

CI Size and Disk Utilization DATA CI Size Disk Utilization (%) Non-EF CI/CA Extended Format Disk Utilization (%)Extended Format CI/CA Non-EF 512 735 45 720 46 1024 495 61 495 63 1536 390 72 375 72 2048 315 78 315 81 2560 255 79 255 82 3072 225 83 225 87 3584 195 84 195 88 4096 180 89 180 92 4608 150 83 150 87 5120 135 83 135 87 5632 135 92 135 95 6144 120 89 120 92 6656 105 84 105 88 7168 105 91 105 94 7680 90 83 90 87 8192 90 89 90 92 10240 75 93 75 96 12288 60 89 60 92 14336 52 90 45 81 16384 45 89 45 92 18432 45 100 40 88 20480 37 91 37 95 22528 33 90 33 93 24576 30 89 30 92 26624 30 96 30 100 28672 26 90 22 81 30720 25 93 25 86 32768 22 87 22 92

FREESPACE(25 20) Control Area 102 103 108 Control Area 143 144 145 113 115 124 146 149 151 127 129 130 152 154 155 131 139 141 157 158 159

FREESPACE Is Not Free VSAM KSDS: DATA CISZ = 4096 CI/CA = 180 FREESPACE(15,20) Total bytes in CA = 4096 * 180 = 737,280 CA Free Space = (180 *.2) * 4096 = 147,456 CI Free Space = 4096 *.15 * (180 *.8) = 88,560 Percentage of each CA reserved for Free Space = (147,456 + 88,560) / 737,280 = 32%

SPEED vs. RECOVERY RECOVERY tells VSAM to pre-format each DATA CI before loading data into it SPEED tells VSAM not to pre-format the data component s space during the load process RECOVERY is the default, so always specify SPEED (or use a DATACLAS definition that specifies SPEED)

REUSE vs. NOREUSE REUSE When the data set is opened for OUTPUT (Load Mode), the High Used Relative Byte Address (HURBA) is reset to zero NOREUSE When the data set is opened for OUTPUT, it must be empty

DEFINE ALTERNATEINDEX This command is used to create an alternate index over a KSDS or an ESDS The KEY parameter specifies the key length and the offset where the key begins in the data record Most parameters for an alternate index are the same as the parameters for a KSDS An alternate index can be define with UPGRADE or NOUPGRADE The AIX can be defined with either UNIQUEKEY or NONUNIQUEKEY

DEFINE ALTERNATEINDEX Example //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE AIX( - NAME (PROD.PAYROLL.MASTER.AIX) - RELATE (PROD.PAYROLL.MASTER) - RECORDSIZE(24,74) - KEYS(10,76) - NONUNIQUEKEY - CYL(25,5) - FREESPACE(00,05) - SHAREOPTIONS(2 3) - UPGRADE) - DATA ( - NAME(PROD.PAYROLL.MASTER.AIX.DATA) - VOLUMES(* *) - CISZ(4096)) - INDEX ( - NAME(PROD.PAYROLL.MASTER.AIX.INDEX)) VOLUMES(*) CISZ(1536))

DEFINE PATH Command A PATH defines a relationship between a base cluster and an alternate index UPDATE - specifies that, when records in the base cluster are modified or deleted, or when records are added to the base cluster, each alternate index in the base cluster's upgrade set is modified to reflect the change in the cluster's data NOUPDATE - specifies that, when opening the path, the path's base cluster is to be allocated and the base cluster's upgrade set is not to be allocated

BLDINDEX Command The BLDINDEX command loads the alternate index If the AIX is defined with NONUNIQUEKEY, the CISIZE for the AIX needs to be large enough to contain pointers to all of the records for each alternate index key

ALTER Command The ALTER command is used to change the logical characteristics of a VSAM data set The physical characteristics of a VSAM data set cannot be changed with the ALTER command The ALTER command is used to rename VSAM data sets and their associated components

DELETE Command The DELETE command can be used to VSAM base clusters, alternate indexes, and path definitions When an alternate index is deleted, the associated path is also deleted When a base cluster is deleted, all of the associated alternate indexes and paths are also deleted

EXPORT Command The EXPORT command can be used to create a backup of a VSAM data set The backup data set is in a proprietary format that can only be used by the IMPORT command

EXPORT Examples //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DDNAME1 DD DSN=PROD.EXPORT.PAYROLL.MASTER(+1), // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(500,50),RLSE) //SYSIN DD * EXPORT PROD.PAYROLL.MASTER - OUTFILE(DDNAME1) PERMANENT //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INDD DD DSN=PROD.PAYROLL.TAXFORMS,DISP=SHR //OUTDD DD DSN=PROD.EXPORT.PAYROLL.TAXFORMS, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(500,50),RLSE) //SYSIN DD * EXPORT INFILE(INDD) - OUTFILE(OUTDD) TEMPORARY

IMPORT Command The IMPORT command recovers the data for a VSAM data set from an EXPORT backup

IMPORT Command Examples //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DDNAME1 DD DSN=STORAGE.EXPORT.SMALLDS.VHSM049,DISP=OLD //SYSIN DD * IMPORT INFILE(DDNAME1) - OUTDATASET(HSM.SMALLDS.VHSM049) //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DDNAME1 DD DSN=STORAGE.SCDS.UNLOAD.G0282V00,DISP=SHR //SYSIN DD * IMPORT IFILE(DDNAME1) ODS(SMS.PROD.SCDS.RECOVER) - OBJECTS( - (SMS.PROD.SCDS - NEWNAME(SMS.PROD.SCDS.RECOVER)) - (SMS.PROD.SCDS.DATA - NEWNAME(SMS.PROD.SCDS.RECOVER.DATA)))

REPRO Command The REPRO command can be used to copy some or all of the records from a VSAM data set to either another VSAM data set or a sequential data set The REPRO command can also be used to copy records from a sequential data set into a VSAM data set

REPRO Command Example #1 //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INDD1 DD DSN=HSM.PROD.MCDS,DISP=SHR //OUTDD1 DD DSN=STORAGE.MCDS1.UNLOAD, // DISP=(NEW,CATLG,DELETE), // DATACLAS=EXTENDED, // SPACE=(CYL,(1500,500),RLSE), // DSORG=PS,RECFM=VB,LRECL=2044,BLKSIZE=0 //SYSIN DD * REPRO INFILE(INDD1) OUTFILE(OUTDD1)

REPRO Command Example #2 //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //OUTDD1 DD DSN=TEST.TESTDATA.UNLOAD, // DISP=(NEW,CATLG,DELETE), // AVGREC=U,SPACE=(80,(50,10),RLSE), // DSORG=PS,RECFM=FB,LRECL=80,BLKSIZE=0 //SYSIN DD * REPRO IDS(TEST.VSAM.TESTDATA) - OUTFILE(OUTDD1)

REPRO Command Example #3 //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //INDD1 DD DSN=PROD.CUSTOMER.MASTER,DISP=SHR //OUTDD1 DD DSN=TEST.CUSTOMER.UNLOAD.SUBSET, // DISP=(NEW,CATLG,DELETE), // SPACE=(TRK,(20,3),RLSE), // DSORG=PS,RECFM=FB,LRECL=520,BLKSIZE=0 //SYSIN DD * REPRO IFILE(INDD1) OUTFILE(OUTDD1) SKIP(1000) COUNT(5000)

REPRO Command Example #4 //STEP030 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO IDS(PROD.CHECK.FILE.UPDATES) ODS(PROD.CHECK.FILE.D080212) FROMKEY(2012215) TOKEY(2012216)

PRINT Command The PRINT command can be used to print records in a VSAM data set

PRINT Command Examples //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DDNAME1 DD DSN=PROD.SHIFT.STAFFING,DISP=SHR //DDNAME2 DD DSN=PROD.PARTS.INVENTRY,DISP=SHR //VSAMDS1 DD DSN=PROD.CUST.MASTER.AIX02,DISP=SHR //VSAMDS2 DD DSN=PROD.STAFF.CONTACTS,DISP=SHR //SYSIN DD * PRINT IFILE(DDNAME1) CHARACTER PRINT IFILE(DDNAME2) HEX FROMKEY('KE7 025429') COUNT(5) PRINT IDS(PROD.USPS.ZIPCODES) DUMP COUNT(300) PRINT IFILE(VSAMDS1) DUMP - FROMADDRESS(16220160) TOADDRESS(17694720) PRINT INFILE(VSAMDS2) CHAR FROMKEY(X'F1') TOKEY(X'F2')

VERIFY Command The VERIFY command is used to correctly reflect the end of the VSAM data set that was not closed properly The RECOVER parameter can be specified to fix errors caused by an incomplete CA reclaim

VERIFY Command Examples //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * VERIFY DATASET(CICSV.TCPIP32.CISORDT.EZACONFG) //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //VSAMFILE DD DSN=TEST.RUN04.CHECKS.Y,DISP=SHR //SYSIN DD * VERIFY FILE(VSAMFILE) //STEP010 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * VERIFY DATASET(PROD.CROSSREF.LEVEL3) RECOVER

Using IDCAMS LISTCAT Provides extensive information about VSAM data sets including: Data set attributes SMS information RLS information Allocation information (like primary and secondary space requested, CI size, split information, etc.) Volume and extent information Sphere information

Selecting Entries to List LISTCAT ENTRIES(PAYROLL.PROD.ACTIVE) LISTCAT LEVEL(QA.BALANCE) LISTCAT LEVEL(ACCT.PROD.GRP%N) LISTCAT ENT(HR.PROD.EMPLID) ALL OUTFILE(OUTDD)

What Information to List LISTCAT ENT(entname) NAME LISTCAT ENT(entname) HISTORY LISTCAT ENT(entname) ALLOCATION LISTCAT ENT(entname) VOLUME LISTCAT ENT(entname) ALL

Output from LISTCAT Cluster Information LISTCAT ENT(MRKT.PROD.DMPIIMST) ALL CLUSTER ------- MRKT.PROD.DMPIIMST IN-CAT --- CAT.PROD01 HISTORY DATASET-OWNER-----(NULL) CREATION--------2013.031 RELEASE----------------2 EXPIRATION------0000.000 SMSDATA STORAGECLASS ---STANDARD MANAGEMENTCLASS-ONLINE DATACLASS ------EXTAVSAM LBACKUP ---0000.000.0000 CA-RECLAIM----------(YES) EATTR-------------(NULL) BWO STATUS------00000000 BWO TIMESTAMP---00000 00:00:00.0 BWO---------------(NULL) RLSDATA LOG ------------------NONE RECOVERY REQUIRED --(NO) FRLOG ------------(NULL) VSAM QUIESCED -------(NO) RLS IN USE ---------(NO) LOGREPLICATE-------------(NO) LOGSTREAMID-----------------------------(NULL) RECOVERY TIMESTAMP LOCAL-----X'0000000000000000' RECOVERY TIMESTAMP GMT-------X'0000000000000000' PROTECTION-PSWD-----(NULL) RACF----------------(NO) ASSOCIATIONS DATA-----MRKT.PROD.DMPIIMST.DATA INDEX----MRKT.PROD.DMPIIMST.INDEX

Output from LISTCAT DATA Component DATA ------- MRKT.PROD.DMPIIMST.DATA IN-CAT --- CAT.PROD01 HISTORY DATASET-OWNER-----(NULL) CREATION--------2013.031 RELEASE----------------2 EXPIRATION------0000.000 ACCOUNT-INFO-----------------------------------(NULL) PROTECTION-PSWD-----(NULL) RACF----------------(NO) ASSOCIATIONS CLUSTER--FSVP.FBSI.DMPIMSTD ATTRIBUTES KEYLEN-----------------8 AVGLRECL-------------100 BUFSPACE------------6144 CISIZE--------------1024 RKP-----------------------0 MAXLRECL-------------100 EXCPEXIT----------(NULL) CI/CA----------------495 STRIPE-COUNT-----------1 SHROPTNS(2,3) SPEED UNIQUE NOERASE INDEXED NOWRITECHK UNORDERED NOREUSE NONSPANNED EXTENDED EXT-ADDR STATISTICS REC-TOTAL-----------15006 SPLITS-CI----------------23 EXCPS------------------49 REC-DELETED-------------0 SPLITS-CA-----------------2 EXTENTS----------------1 REC-INSERTED------------0 FREESPACE-%CI--------0 SYSTEM-TIMESTAMP: REC-UPDATED-------------0 FREESPACE-%CA-------0 X'CADB0E18220D0706' REC-RETRIEVED-------4851 FREESPC-----------101376 ALLOCATION SPACE-TYPE------CYLINDER HI-A-RBA---------1520640 SPACE-PRI---------------3 HI-U-RBA---------1519616 SPACE-SEC--------------1 VOLUME VOLSER------------M1P072 PHYREC-SIZE---------1024 HI-A-RBA---------1520640 EXTENT-NUMBER----------1 DEVTYPE------X'3010200F' PHYRECS/TRK-----------33 HI-U-RBA--------1519616 EXTENT-TYPE----------X'40' VOLFLAG------------PRIME TRACKS/CA-------------15 EXTENTS: LOW-CCHH-----X'00420000' LOW-RBA---------------------0 TRACKS----------------150 HIGH-CCHH----X'00C1000E' HIGH-RBA---------5070848

Output from LISTCAT INDEX Component INDEX ------ MRKT.PROD.DMPIIMST.INDEX IN-CAT --- CAT.PROD01 HISTORY DATASET-OWNER-----(NULL) CREATION--------2013.031 RELEASE----------------2 EXPIRATION------0000.000 PROTECTION-PSWD-----(NULL) RACF----------------(NO) ASSOCIATIONS CLUSTER--FSVP.FBSI.DMPIMSTD ATTRIBUTES KEYLEN-----------------8 AVGLRECL---------------0 BUFSPACE---------------0 CISIZE--------------4096 RKP----------------------0 MAXLRECL------------4089 EXCPEXIT----------(NULL) CI/CA-----------------12 SHROPTNS(2,3) SPEED UNIQUE NOERASE NOWRITECHK UNORDERED NOREUSE EXTENDED EXT-ADDR STATISTICS REC-TOTAL-------------11 SPLITS-CI--------------0 EXCPS-----------------59 INDEX: REC-DELETED------------0 SPLITS-CA--------------0 EXTENTS----------------1 LEVELS-----------------3 REC-INSERTED-----------0 FREESPACE-%CI----------0 SYSTEM-TIMESTAMP: ENTRIES/SECT----------22 REC-UPDATED------------0 FREESPACE-%CA----------0 X'CADB0E18220D0706' SEQ-SET-RBA----------------0 REC-RETRIEVED----------0 FREESPC-------------4096 HI-LEVEL-RBA------------8192 ALLOCATION SPACE-TYPE---------TRACK HI-A-RBA-----------49152 SPACE-PRI--------------1 HI-U-RBA-----------45056 SPACE-SEC--------------1 VOLUME VOLSER------------M1P072 PHYREC-SIZE---------4096 HI-A-RBA-----------49152 EXTENT-NUMBER----------1 DEVTYPE------X'3010200F' PHYRECS/TRK-----------12 HI-U-RBA-----------45056 EXTENT-TYPE--------X'00' VOLFLAG------------PRIME TRACKS/CA--------------1 EXTENTS: LOW-CCHH-----X'0041000B' LOW-RBA----------------0 TRACKS-----------------1 HIGH-CCHH----X'0041000B' HIGH-RBA-----------49151