Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Copyright © 2011 Tata Consultancy Services Limited Virtual Access Storage Method (VSAM) and Numeric Intrinsic Functions (NUMVAL and NUMVAL-C) LG - TMF148.

Similar presentations


Presentation on theme: "1 Copyright © 2011 Tata Consultancy Services Limited Virtual Access Storage Method (VSAM) and Numeric Intrinsic Functions (NUMVAL and NUMVAL-C) LG - TMF148."— Presentation transcript:

1 1 Copyright © 2011 Tata Consultancy Services Limited Virtual Access Storage Method (VSAM) and Numeric Intrinsic Functions (NUMVAL and NUMVAL-C) LG - TMF148 Team - Dingari Sreeram 856204 Shweta Kulkarni 827972

2 2 CONTENTS  Introduction to VSAM  VSAM Dataset Types  Data Set Organization Control Interval (CI) Control Area (CA)  Numeric Intrinsic Functions NUMVAL NUMVAL-C  Conclusion

3 3 VSAM is an integral part of MVS. It is a high- performance access method used in OS/390, MVS/ESA and z/OS. It operates in virtual environment. It is a method used to move data between Disk and Main Storage. VSAM acts like an interface between : - Operating Systems and Application Program. Operating Systems and Application Program. INTRODUCTION - Interface between Main Storage and Disk.

4 4 VSAM Features VSAM supports three types of data access: Sequential, Random (Direct access) and Skip Sequential. Quick and efficient retrieval of data. A multifunction service program (IDCAMS) for setting up catalog records and maintaining data sets. Insertion and Deletion of records is made easier by use of embedded free space. Protection of data against unauthorized access is an inherent part of VSAM. VSAM data sets are device and operating system independent.

5 5 Entry Sequenced Data Set (ESDS) - ESDS contains record in order in which they are entered. - Records are added to the end of the data set, that is, records are sequenced by the order of their entry in the data set. - Existing records cannot be deleted. If a record is needed to be deleted we must flag that record as inactive. - A record can be accessed sequentially or directly by its RBA. VSAM - Dataset Types

6 6 - KSDS contains records in ascending collating sequence. - Records can be accessed by a field called key, a Relative Byte Address (RBA) or sequentially. - Logical records in a KSDS organization can be fixed or variable length records. - In KSDS access is used to add, update, retrieve and delete the records in an existing data set. Key Sequenced Data Set (KSDS)

7 7 - An RRDS consists of a number of pre- formatted fixed-length slots. - RRDS contains records in order of relative record number. - These records can be accessed only by relative record number. - Free space is not provided as entire data set is divided into fixed-length slots. Variable Relative Record Data Set (VRRDS) - A VRRDS is similar to a fixed-length RRDS, except that it contains variable-length records. VRRDS has no slots. - VRRDS is a KSDS processed as an RRDS, so an index will be created. Relative Record Data Set (RRDS)

8 8 - LDS contains data that has no boundaries. - The manipulation of data is completely controlled by the user. - Like the ESDS and RRDS, an LDS contains a data component only. - LDS are most effective for specialized applications like, Data In Virtual (DIV), Customer Information Control System (CICS). Linear Data Set (LDS)

9 9 Data Set Organization VSAM data set contains following major components: - CLUSTER (Catalog entity) - INDEX - DATA (Actual Data) Control Interval (CI): Smallest information storage unit of VSAM is called Control Interval. It can be from 512 bytes to 32KB. It may contain 1 or more records. Control Intervals are part of larger storage structure called CA Control Area(CA): Control Area is fixed length area of auxiliary storage space in which VSAM stores records. Size of VSAM file is always a multiple of its control area. It can be from 1 track to 1 cylinder.

10 10 CONTROL INTERVAL Control Interval consists of following parts: Logical Records (LR) Free Space (FS) Control Information Field Record Definition Field Control Interval Definition Field

11 11 CONTROL INTERVAL Logical Records: Unit of information used to store data in VSAM data set. It can be fixed or variable size. Group of Logical Records form CI. Free Space: Space reserved within CI for inserting new records in KSDS or for lengthening the existing record. It is given in percent of control interval size. Control Information Definition Field: It is a 4 byte field which contains the Offset (where) and amount of free space. Record Definition Field: It is a 3 byte field which has data about how many records have same length.

12 12 CONTROL AREA Control Area (CA): Control Intervals in VSAM data sets are grouped in Control Area. VSAM data set or file is always a multiple of CA. Control Areas are needed to implement concept of Splits. Control Interval Split: When a new record is inserted in the present control area and if there is not enough storage space then they are rearranged by splitting into two control areas with more free space, this is termed as split. Control Areas are always larger than Spanned Records Spanned Records: SR are logical records that are larger than CI size which are allowed to extend across or span control interval boundaries. SR cannot share CI with any other record.

13 13 NUMERIC INTRINSIC FUNTIONS Intrinsic Functions are used to convert Character or String data items to several other data formats such as Conversion of Upper Case letters to Lower Case letters, Conversion of String to Number. Various Intrinsic Functions are 1. Number Handling 2. Date and Time Handling. 3. Finance Handling4. Mathematics ( Sum, Percent etc) 5. Statistics ( Mean, Median etc) Numeric Intrinsic Functions are Intrinsic Functions which return a number after performing function. Return Value can be Alphanumeric, Boolean, Date- time value, Numeric or Double byte character set. These are generally considered as temporary numeric data items. These functions save time during arithmetic calculations.

14 14 NUMVAL and NUMVAL-C FUNCTIONS NUMVAL and NUMVAL-C are Numeric Intrinsic Functions which return a floating (decimal) number as return value. These functions convert Character or String containing alphanumeric or national literals to a number. Maximum 18 characters are allowed in the string for conversion NUMVAL : Used for 1 Alphanumeric string conversion. String must contain number and it may include sign or comma. It is converted to floating decimal number of given format. NUMVAL-C : Used for 1 or 2 Alphanumeric string conversion. String may contain national literals, comma and currency signs. It also gives output as a floating decimal number SYNTAX: FUNCTION NUMVAL-C(IDENTIFIER)

15 15 NUMVAL-C PROGRAM

16 16 OUTPUT OF NUMVAL-C PROGRAM

17 17 CONCLUSION In this presentation we have covered the following topics 1. Basics of VSAM 2. Types of VSAM data sets. 3.Control Interval and Control Area. 4. Numeric Intrinsic Functions : NUMVAL and NUMVAL-C

18 18 QUERIES

19 THANK YOU


Download ppt "1 Copyright © 2011 Tata Consultancy Services Limited Virtual Access Storage Method (VSAM) and Numeric Intrinsic Functions (NUMVAL and NUMVAL-C) LG - TMF148."

Similar presentations


Ads by Google